HydraCore
API by router

Agent routing

Route To Agent

Route a message from one agent to another (handoff).

Resolution order:

  1. target_instance_id — direct routing if specified
  2. target_role — find instance by agent config role for the same customer
POST
/internal/v1/instances/{instance_id}/route-to-agent

Path Parameters

instance_idInstance Id
Formatuuid
context?Context

Handoff context (caller info, request summary, etc.)

Empty Object

conversation_id?Conversation Id
create_workflow_record?Create Workflow Record
Defaulttrue
customer_idCustomer Id
Formatuuid
messageMessage
Lengthlength <= 8000
target_instance_id?Target Instance Id
target_role?Target Role

Agent role — must match agent_config.agent.role

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/route-to-agent" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "message": "string"  }'
{
  "response": "string",
  "routed_to": "string",
  "target_instance_id": "string",
  "workflow_record_id": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}