Route Batch Tasks
POST /api/agents/route-batch
Route multiple tasks to optimal agents in a single request.
Efficiently processes batch routing for multiple tasks with optimization for load balancing and quality.
Request Body: BatchRoutingRequest with list of tasks and optimization settings
Returns: BatchRoutingResponse with routing results for each task
Raises: HTTPException 503: If communication hub is not available HTTPException 500: For unexpected errors
Request Body required
Section titled “Request Body required ”Request model for batch task routing operations.
Allows routing multiple tasks to optimal agents in a single request for efficient task distribution and load balancing.
Fields: tasks: List of tasks to route optimize_for: Optimization strategy (speed, quality, load_balance) allow_duplicates: Whether same agent can receive multiple tasks
Usage: POST /api/agents/routing/route-batch
object
Tasks to route
Individual task item for batch routing requests.
Represents a single task to be routed to an optimal agent within a batch routing operation.
Fields: task_id: Unique identifier for tracking this task description: Natural language task description for routing analysis priority: Optional priority level for routing consideration constraints: Optional constraints on agent selection
object
Unique identifier for this task
Task description for routing
Allow same agent for multiple tasks
Responses
Section titled “ Responses ”Successful Response
Response model for batch routing operations.
Returns routing decisions for all tasks in the batch with overall statistics.
Fields: status: Operation status (success/partial/failed) results: List of routing results per task total_tasks: Number of tasks processed successful_routes: Number of successful routing decisions processing_time_ms: Total processing time in milliseconds
object
Operation status
Routing results
Individual routing result for a task in batch routing.
Fields: task_id: Reference to the original task recommended_agent: Optimal agent for this task confidence_score: Routing confidence (0.0-1.0) reasoning: Explanation for agent selection alternatives: Alternative agent options
object
Original task identifier
Selected agent ID
Routing confidence
Selection reasoning
Total tasks processed
Successful routes
Processing time
Validation Error