Skip to content

Agent Port Conflict Causes Incorrect Routing #324

Description

@Topman-14

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions