valuecell icon indicating copy to clipboard operation
valuecell copied to clipboard

Agent Port Conflict Causes Incorrect Routing

Open Topman-14 opened this issue 1 year ago • 2 comments

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

  1. Start the application using ./run-dev.sh or ./start.sh
  2. Navigate to the ResearchAgent chat interface at http://localhost:1420/agent/ResearchAgent
  3. Send a plain text query such as:
    • "what are your trade recommendations on recent sec filings"
    • "give a rundown of current stock exchanges"
  4. 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!

Topman-14 avatar Nov 08 '25 16:11 Topman-14

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

vcfgv avatar Nov 10 '25 02:11 vcfgv

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.

DigHuang avatar Dec 09 '25 10:12 DigHuang