Commit Graph

353 Commits

Author SHA1 Message Date
ahmet guzererler 73cb317120
Merge pull request #98 from aguzererler/copilot/add-trades-with-stop-loss
Add stop_loss and take_profit to BUY trade records
2026-03-24 01:11:37 +01:00
ahmet guzererler 383b414698
Merge pull request #97 from aguzererler/copilot/optimize-llm-round-trips
Parallel pre-fetch for analyst agents to reduce LLM round-trips
2026-03-24 01:11:19 +01:00
copilot-swe-agent[bot] 8e48bb4906 Add stop_loss and take_profit fields to Trade entries in database, API, and UI
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/3b6a6fcc-30ac-48fa-970f-995a3bed80ed
2026-03-23 21:12:01 +00:00
copilot-swe-agent[bot] 9c014a8038 Parallel pre-fetch for analyst agents to reduce LLM round-trips
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/a8c6b73e-9694-4e34-8767-36e475deb12f
2026-03-23 21:08:15 +00:00
copilot-swe-agent[bot] 8567f08b91 Initial plan 2026-03-23 21:02:05 +00:00
copilot-swe-agent[bot] 2c3efd0f87 Initial plan 2026-03-23 20:56:33 +00:00
ahmet guzererler e568cec68c
Merge pull request #96 from aguzererler/copilot/fix-report-saving-in-runs
Copilot/fix report saving in runs
2026-03-23 21:10:48 +01:00
ahmet guzererler aa4e9395bf
Merge pull request #95 from aguzererler/copilot/add-tests-for-langgraph-engine
Add unit tests for LangGraphEngine run modes (run_scan, run_pipeline, run_portfolio, run_auto)
2026-03-23 21:09:34 +01:00
ahmet guzererler 1c7de894ff
Merge pull request #94 from aguzererler/copilot/fix-langgraph-bug-reporting
Fix LangGraphEngine: final_state capture fallback, portfolio state shape, JSON serialization
2026-03-23 21:09:15 +01:00
ahmet guzererler b7d44f32b6
Merge pull request #93 from aguzererler/copilot/fix-json-serialization-error
Fix TypeError: LangChain message objects not JSON-serializable in ReportStore
2026-03-23 21:08:52 +01:00
copilot-swe-agent[bot] 69a2d72e60 Add tests for LangGraphEngine run modes (run_scan, run_pipeline, run_portfolio, run_auto)
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/ba209f7b-e985-42bb-bdce-95e73bc67bfc
2026-03-23 20:06:27 +00:00
copilot-swe-agent[bot] c0d13b9207 Fix langgraph engine: fallback ainvoke, portfolio state shape, JSON serialization
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/43d04354-154a-442c-8bfc-ede05860e7f9
2026-03-23 19:57:35 +00:00
copilot-swe-agent[bot] 73e5527afa Initial plan 2026-03-23 19:56:18 +00:00
copilot-swe-agent[bot] 90c49dc1f4 Initial plan 2026-03-23 19:50:13 +00:00
copilot-swe-agent[bot] 981cf7f1b1 Fix JSON serialization of LangChain message objects in ReportStore
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/bed5160f-805a-417e-b563-461e8bfca683
2026-03-23 19:37:41 +00:00
copilot-swe-agent[bot] 9956420717 Initial plan 2026-03-23 19:32:42 +00:00
ahmet guzererler 36a6b17a22
Merge pull request #92 from aguzererler/copilot/fix-report-saving-in-runs
Fix report persistence, run status tracking, auto-mode stock sourcing, and portfolio context loading
2026-03-23 19:55:42 +01:00
copilot-swe-agent[bot] 9187a69ce2 Fix report saving, event storing, auto tickers, portfolio report loading, and state propagation
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/9fff2f5e-b384-4b0a-8e23-ede31af12fe2
2026-03-23 18:33:11 +00:00
copilot-swe-agent[bot] 6b1bc27dac Initial plan 2026-03-23 18:08:57 +00:00
ahmet guzererler 41681e0f9e
Merge pull request #91 from aguzererler/fix-analyst-tool-loop-18174774985345323969
fix: use run_tool_loop instead of invoke in analyst agents
2026-03-23 18:36:33 +01:00
google-labs-jules[bot] 3721aab110 test: add unit tests for analyst agents tool looping
Added comprehensive unit tests for `fundamentals_analyst`, `market_analyst`,
`social_media_analyst`, and `news_analyst` to verify that they correctly
handle recursive tool calling via `run_tool_loop`. A MockLLM was created
to simulate a two-turn conversation (tool call request followed by a final
report generation) to ensure the `.invoke()` bug does not regress. Added
missing `build_instrument_context` imports to those agents to prevent
NameErrors.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-23 17:22:28 +00:00
google-labs-jules[bot] 9cf3a023fa fix: use run_tool_loop instead of invoke in analyst agents
This commit updates the `fundamentals_analyst`, `market_analyst`,
`social_media_analyst`, and `news_analyst` files to use `run_tool_loop`
instead of `.invoke()`. Using `.invoke()` resulted in the LLM execution
stopping immediately upon a tool call request without executing the tool,
returning an empty report or raw JSON. The `run_tool_loop` function
ensures tools are executed recursively and the final text content is
returned.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-23 17:00:35 +00:00
ahmet guzererler 5bdd42f818
Merge pull request #90 from aguzererler/copilot/check-upstream-changes
docs: upstream PR triage and evaluation (2026-03-23)
2026-03-23 17:48:24 +01:00
copilot-swe-agent[bot] 4c186a55e8 merge: sync with upstream TauricResearch/TradingAgents v0.2.2
Merges upstream/main into our fork, bringing in:
- Security: Remove chainlit (CVE-2026-22218), patch LangGrinch vulnerability
- Bug fixes: debate state init, UTF-8 encoding, stock data parsing, debate round config
- Features: OpenAI Responses API, five-tier rating scale, Anthropic effort support,
  exchange-qualified tickers, yfinance retry with exponential backoff
- Refactor: risk_manager renamed to portfolio_manager

Conflicts resolved preserving our fork's:
- Per-tier LLM config (quick/mid/deep think with provider overrides)
- Separate tool files (fundamental_data_tools, core_stock_tools, etc.)
- Custom tools (get_ttm_analysis, get_peer_comparison, get_sector_relative, get_macro_regime)
- Dynamic Ollama model fetching
- Enhanced fundamentals analyst prompt with TTM analysis
- Hardened stockstats/yfinance data pipeline (_load_or_fetch_ohlcv)
- AgentOS observability layer, scanner pipeline, portfolio management

Tests: 727 passed, 14 skipped
2026-03-23 12:17:25 +00:00
copilot-swe-agent[bot] f3025a9768 docs: add upstream PR review with evaluations and recommendations (2026-03-23)
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/140fed95-3b4f-4d92-a410-ca550f93866a
2026-03-23 11:53:53 +00:00
copilot-swe-agent[bot] f990153866 Initial plan 2026-03-23 11:48:46 +00:00
ahmet guzererler 6ae6eb6435
Merge pull request #31 from aguzererler/copilot/create-information-flow-models
docs: add agent data flow documentation with context window budget
2026-03-23 12:06:03 +01:00
ahmet guzererler 075b52453c
Merge pull request #87 from aguzererler/feat/agent-os-observability
feat: AgentOS - Visual Observability & Command Center
2026-03-23 12:00:46 +01:00
ahmet guzererler d5f1c8fa22
Merge pull request #89 from aguzererler/copilot/add-prompts-to-backend-frontend
Fix AgentOS node persistence, add event content streaming, update packages
2026-03-23 11:53:09 +01:00
copilot-swe-agent[bot] e808031aa6 docs: update docs/agent/ with AgentOS architecture, components, conventions, and ADR 013
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/7cf1fa1a-8cb0-46b4-bc20-525aa3d38d7d
2026-03-23 10:48:49 +00:00
copilot-swe-agent[bot] 1b5aee572a fix: portfolio field mapping (shares→quantity, cash→cash_balance) and pipeline recursion limit
- Map backend Holding.shares → frontend quantity, include market_value/unrealized_pnl
- Map backend Portfolio.portfolio_id → id, cash → cash_balance
- Map backend Trade.shares → quantity, trade_date → executed_at
- Pass recursion_limit=100 to pipeline astream_events() to prevent GraphRecursionError

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/b189c934-24b9-49a9-99d9-99ee006da4b0
2026-03-23 09:40:56 +00:00
copilot-swe-agent[bot] a77e3f1264 fix: make _map_langgraph_event crash-proof with try/except and _safe_dict
- Wrap each event-type branch (LLM start/end, tool start/end) in try/except
  to prevent a single unexpected object shape from crashing the streaming loop
- Add _safe_dict() helper to guard response_metadata and usage_metadata
  access — some providers return non-dict types (bound methods, etc.)
- Fix potential_text extraction: check for None AND callable before using
- Ensure all event IDs use .get() with fallback to prevent KeyError
- Fix test file: remove hardcoded /Users/Ahmet/ path, add edge-case tests
  for non-dict metadata, tool events, and unknown event types
- All 725 unit tests pass, TypeScript compiles clean

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/fe6575b5-c03b-4037-bd98-a94303ae8313
2026-03-23 09:17:19 +00:00
Ahmet Guzererler 319168c74f feat: Resolve "main_portfolio" alias in portfolio routes and improve LangGraph content extraction robustness with new unit tests. 2026-03-23 10:02:52 +01:00
copilot-swe-agent[bot] 6999da0827 feat: button states, full prompt extraction, portfolio viewer, param inputs
1. Run buttons: only the triggered button shows spinner, others disabled
2. Backend: enhanced prompt extraction with multiple fallback paths
   (data.messages, data.input.messages, data.input, data.kwargs.messages)
   and raw dump fallback; improved response extraction for edge cases
3. Portfolio viewer: new PortfolioViewer component with holdings table,
   trade history, and summary tabs; portfolio dropdown with auto-load;
   Wallet sidebar icon now navigates to portfolio page
4. Parameter inputs: collapsible panel with date/ticker/portfolio_id;
   validation prevents running without required fields per run type

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/ffa268c8-e97c-4335-9bce-19bba583bea9
2026-03-23 08:46:34 +00:00
copilot-swe-agent[bot] b08ce7199e feat: fix prompt display, add event detail modal, run buttons, and node animations
Backend:
- Extract full prompt from all LLM messages (not just first)
- Add prompt/response fields to streamed event payloads
- Improve model name extraction with multiple fallback strategies
- Add run_portfolio and run_auto streaming methods
- Wire portfolio/auto in websocket router
- New tool_result event type for tool completion

Frontend:
- Add full event detail modal with tabs (Prompt, Response, Summary, Metrics)
- Show actual prompt content in drawer instead of "Prompting unknown..."
- Add Scan, Pipeline, Portfolio, Auto buttons to control panel
- Fix node animation: completed nodes never revert to running
- Handle tool_result type for marking tool nodes as done
- Drawer events have "Full Detail →" button to open modal

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/7997c579-ab7e-4071-afd0-18703a8e5618
2026-03-23 08:04:53 +00:00
copilot-swe-agent[bot] 9d2dbf4a43 fix: add missing __init__.py files to agent_os package tree
The agent_os/, agent_os/backend/, agent_os/backend/routes/, and
agent_os/backend/services/ directories were missing __init__.py,
causing `from agent_os.backend.routes import ...` to fail with
ModuleNotFoundError when running `python agent_os/backend/main.py`.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/4b002166-5cc2-4a75-aa01-14d7b5d8d8bc
2026-03-23 07:16:38 +00:00
copilot-swe-agent[bot] cf2df83c38 feat: clickable terminal events, node inspector drawer, stop animation on complete, vite 8
1. Terminal: remove inline prompts/full text; show short summary per event;
   click any event to open detail drawer with full request/response/model/metrics
2. Fix node "thinking" animation: shimmer only when status=running;
   on_chat_model_end (result) transitions node to completed, animation stops
3. Link nodes to events: clicking a graph node opens the drawer showing
   all events for that node (prompts, tool calls, results)
4. Upgrade Vite 5→8.0.1, @vitejs/plugin-react→5.2.0;
   update tsconfig moduleResolution to "bundler" for Vite 8 compat

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/93c31c35-9509-4254-96fd-6f47aad07927
2026-03-23 07:03:48 +00:00
copilot-swe-agent[bot] 06e913f1ba fix: bump axios to ^1.13.5 to address known vulnerabilities (SSRF, DoS)
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac
2026-03-23 00:55:46 +00:00
copilot-swe-agent[bot] 7726483034 refactor: address code review - extract helpers for content extraction and message parsing
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac
2026-03-23 00:53:25 +00:00
copilot-swe-agent[bot] e9be24600f fix: AgentOS backend logging/prompts, frontend node persistence, package updates
Backend:
- Replace bare print() with structured logging module
- Include LLM prompt snippets and response content in streamed events
- Extract proper node names from LangGraph metadata (langgraph_node)
- Add latency tracking (start/end time per node)
- Add tool input/output content in events
- Add system log event type for informational messages
- Stream on_tool_end events for tool results

Frontend:
- Fix node disappearing/reappearing: use useNodesState/useEdgesState + useEffect
  for incremental updates instead of useMemo that rebuilt all nodes on each event
- Fix duplicate node creation: use useRef to track seen node IDs persistently
- Fix useAgentStream reconnection loop: remove stale `status` from connect deps
- Use statusRef to avoid stale closure in onclose handler
- Add auto-scroll to terminal, event count, type labels/colors
- Show prompt snippets, tool I/O, and response content in terminal
- Handle 'log' event type

Packages:
- Update all npm deps to latest compatible minor versions
- Remove node_modules from git tracking, add to .gitignore

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac
2026-03-23 00:51:29 +00:00
copilot-swe-agent[bot] 362d148a26 Initial plan 2026-03-23 00:39:42 +00:00
Yijia-Xiao 589b351f2a
TradingAgents v0.2.2 2026-03-22 23:47:56 +00:00
Yijia-Xiao 6c9c9ce1fd
fix: set process-level UTF-8 default for cross-platform consistency 2026-03-22 23:42:37 +00:00
Yijia-Xiao b8b2825783 refactor: standardize portfolio manager, five-tier rating scale, fix analyst status tracking 2026-03-22 23:30:29 +00:00
Yijia-Xiao 318adda0c6 refactor: five-tier rating scale and streamlined agent prompts 2026-03-22 23:07:20 +00:00
Yijia Xiao c3ba3bf428
Merge pull request #413 from CadeYu/codex/exchange-qualified-tickers
fix: preserve exchange-qualified tickers across agent prompts
2026-03-22 15:36:14 -07:00
Yijia-Xiao 7cca9c924e fix: add exponential backoff retry for yfinance rate limits (#426) 2026-03-22 22:11:08 +00:00
Yijia-Xiao bd9b1e5efa feat: add Anthropic effort level support for Claude models
Add effort parameter (high/medium/low) for Claude 4.5+ and 4.6 models,
consistent with OpenAI reasoning_effort and Google thinking_level.
Also add content normalization for Anthropic responses.
2026-03-22 21:57:05 +00:00
Ahmet Guzererler 86e414f8f1 feat: Implement `init-portfolio` CLI command and add WebSocket streaming support. 2026-03-22 22:55:48 +01:00
Ahmet Guzererler a9c565ec36 docs: finalize AgentOS documentation
- add root agent_os/README.md with system architecture and setup guides
- update DESIGN.md with port 8088 migration and network configurations
- document real-time DAG rendering and high-fidelity risk metrics
2026-03-22 22:54:20 +01:00