Skip to main content
Send a message to the agent and receive complete response.

Request

POST /message/send
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "message/send",
  "params": {
    "message": "What's the weather in San Francisco?",
    "context": {
      "user_id": "user-123",
      "session_id": "session-456"
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "text": "The weather in San Francisco is sunny...",
    "task_id": "task-abc123",
    "tokens": {
      "input": 45,
      "output": 120
    }
  }
}
FieldTypeDescription
textstringAgent response text
task_idstringTask ID for tracking
tokensobjectToken usage

Status Codes

CodeMeaning
200Success, response complete
400Invalid message format
500Agent error
504Timeout