Skip to content

Conversation

@randyy179
Copy link

@randyy179 randyy179 commented Nov 3, 2025

Summary

This PR adds configurable verbose logging functionality to help developers debug and monitor AI agent behavior during trading sessions.

Changes

  • Add verbose parameter to BaseAgent and BaseAgent_Hour for detailed execution logging
  • Enable LangChain verbose and debug modes when verbose=true
  • Attach StdOutCallbackHandler to agent for real-time callback monitoring
  • Add verbose config option to default_config.json (default: true)
  • Display loaded tool names and LLM API call notifications in verbose mode
  • Support multiple LangChain versions with fallback import logic for StdOutCallbackHandler

Benefits

  • Exposes LangChain's internal execution flow for debugging
  • Shows tool invocations and reasoning steps in real-time
  • Configurable via JSON config file (easy on/off switch)
  • Non-intrusive to existing functionality

Test plan

  • Tested with verbose=true: detailed logs appear correctly
  • Tested with verbose=false: normal operation without extra output
  • Verified compatibility with LangChain version in requirements.txt
  • No breaking changes to existing code

Related Issues

Closes #68 - This PR addresses the need for better debugging capabilities by adding comprehensive verbose logging that exposes the agent's decision-making process, tool calls, and internal state changes.

- Add verbose parameter to BaseAgent and BaseAgent_Hour for detailed execution logging
- Enable LangChain verbose and debug modes when verbose=true
- Attach StdOutCallbackHandler to agent for real-time callback monitoring
- Add verbose config option to default_config.json (default: true)
- Display loaded tool names and LLM API call notifications in verbose mode
- Support multiple LangChain versions with fallback import logic for StdOutCallbackHandler

This feature helps developers debug and monitor AI agent behavior during trading sessions by exposing LangChain's internal execution flow, tool invocations, and reasoning steps.
@randyy179 randyy179 force-pushed the feat/verbose-logging branch from ee3f4f4 to b17493d Compare November 4, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool calling logs

1 participant