Agent Port Conflict Causes Incorrect Routing
Description
When using the ResearchAgent chat interface, queries are incorrectly routed to StrategyAgent instead, causing JSON parsing errors. This occurs because both ResearchAgent and StrategyAgent are configured to use the same port (10004) in their agent card configurations.
Steps to Reproduce
- Start the application using
./run-dev.shor./start.sh - Navigate to the ResearchAgent chat interface at
http://localhost:1420/agent/ResearchAgent - Send a plain text query such as:
- "what are your trade recommendations on recent sec filings"
- "give a rundown of current stock exchanges"
- Observe the error in the chat interface
Expected Behavior
The query should be routed to ResearchAgent, which accepts plain text queries and can analyze SEC filings and provide research insights.
Actual Behavior
The query is incorrectly routed to StrategyAgent, which expects a structured JSON request with llm_model_config, exchange_config, and trading_config fields. This results in the following error:
Invalid JSON format: 1 validation error for UserRequest
Invalid JSON: expected value at line 1 column 1
[type=json_invalid, input_value='what are your trade recommendations on recent sec filings', input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/json_invalid.
StrategyAgent expects a JSON object with llm_model_config, exchange_config, and trading_config fields.
Please use the /strategies/create endpoint with a properly formatted request.
Note: While this particular fix is really small for a PR, I would be highly interested in contributing to ui tickets and more substantial features. Please feel free to tag me on frontend-related issues!
Hi @Topman-14 , Thank you for reporting this and identifying the root cause. We've actually already resolved this port conflict issue on our end. We appreciate you taking the time to investigate and document the problem. And thanks for expressing interest in contributing to UI and frontend features. We'll definitely keep you in mind for those issues. Feel free to check out our other open issues or keep an eye out for future frontend work.
Looking forward to your contributions!
cc @DigHuang
Hi @Topman-14, thanks for your interest in the project! We are currently organizing issues suitable for community contribution, such as #557. Feel free to check it out.