conversationId to maintain context across multiple messages. All chat endpoints require a Bearer token in the Authorization header.
POST /agent/:id/chat
Send a message to an agent and receive its response. The agent interprets your message, executes any required on-chain operations as tool calls, and returns a natural language reply. Pass aconversationId to continue an existing conversation. If you omit it, the server creates a new conversation and returns its ID in the response.
Path parameters
The agent UUID.
Request
The natural language message to send to the agent.
An existing conversation ID. Include this to continue a thread with shared context. If omitted, a new conversation is created.
Response
The agent’s natural language reply.
The on-chain or off-chain operations the agent executed to fulfill the request. Present only when the agent took action.
The conversation ID for this exchange. Pass this in your next request to continue the thread.
Example
- TypeScript
- curl
GET /agent/:id/conversations
List all conversation threads for an agent.Path parameters
The agent UUID.
Response
Returns an array ofConversation objects.
The conversation ID.
Auto-generated title summarizing the conversation topic.
ISO 8601 timestamp when the conversation was created.
ISO 8601 timestamp of the last message.
Example
POST /agent/:id/conversations
Create a new, empty conversation thread. Use this to pre-create a conversation ID before your first message, or to reset context without waiting for the agent to respond.Path parameters
The agent UUID.
Response
Returns a singleConversation object with the new conversation ID.
Example
The SDK does not expose a
createConversation method. Conversations are created automatically by agent.chat() when you omit the conversationId argument. Use this HTTP endpoint only when you need to pre-create a conversation ID before the first message.GET /agent/:id/conversations/:convId/messages
Retrieve the full message history for a conversation. Use this to display conversation logs in your UI or to audit what the agent did.Path parameters
The agent UUID.
The conversation ID.
Response
Returns an array of message objects in chronological order.Who sent this message:
"user", "agent", "tool", or "system".The message content. For
"tool" messages, this is a JSON-encoded result.ISO 8601 timestamp when the message was created.
Example
DELETE /agent/:id/conversations/:convId
Delete a conversation and all its messages. This is permanent and cannot be undone.Path parameters
The agent UUID.
The conversation ID to delete.
Example
The ToolCall interface
When an agent executes an action (sending a payment, creating an invoice, scanning for received funds), it returns aToolCall in the response. Parse detail to get the structured result:
