Get Optimal Agent
GET /api/agents/optimal/{task_description}
Determine the optimal agent for a specific task using intelligent routing.
Analyzes task description and matches it with agent capabilities, specializations, and current load to recommend the best agent for execution.
Path Parameters: task_description: Natural language description of the task requirements
Returns: AgentOptimalResponse with recommended agent, confidence, and alternatives
Raises: HTTPException 503: If communication hub is not available HTTPException 500: For unexpected errors during agent selection
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
Optimal agent recommendation response model.
Provides the best agent recommendation for a given task along with confidence score, reasoning, and alternative options. Generated by boot coordinator’s agent selection algorithm based on capabilities matching and current load.
Fields: recommended_agent: ID of the optimal agent for the task confidence_score: Confidence in recommendation (0.0-1.0) reasoning: Explanation for why this agent was selected alternatives: List of alternative agents with their scores
Used By: - GET /api/agents/optimal endpoint - boot coordinator agent selection algorithm - Task routing decision making - Agent recommendation UI
object
Alternative agent recommendation information.
Provides details about alternative agents that could handle a task with their confidence scores and reasoning for agent selection.
Fields: agent_id: Alternative agent identifier confidence_score: Confidence in this alternative (0.0-1.0) reasoning: Explanation for why this agent is an alternative capabilities: List of relevant capabilities current_load: Current workload of alternative agent
Used By: - AgentOptimalResponse.alternatives - Agent selection UI - Load balancing decisions
Validation Error