Skip to main content
POST
/
agents
/
{agent_id}
/
chat
Chat With Agent
curl --request POST \
  --url https://api.example.com/agents/{agent_id}/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "conversation_id": "<string>",
  "context_overrides": {},
  "top_k": 5
}
'
{
  "response": "<string>",
  "conversation_id": "<string>",
  "trace_id": "<string>",
  "execution_time_ms": 123,
  "versions": {},
  "payload": {},
  "selected_tool": "<string>",
  "outcome_label": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mrassistant.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

Body

application/json

Request to chat with an agent via text.

query
string
required

User's message/query

Required string length: 1 - 2000
conversation_id
string | null

Existing conversation ID to continue

context_overrides
Context Overrides · object

Additional context for this query

top_k
integer
default:5

Number of knowledge chunks to retrieve

Required range: 1 <= x <= 20

Response

Successful Response

Response from agent chat.

response
string
required

Agent's text response

conversation_id
string
required

Conversation ID for follow-up messages

trace_id
string
required

Trace ID for debugging

execution_time_ms
integer
required

Execution time in milliseconds

versions
Versions · object
required

Version information (kb, policy, tools)

payload
Payload · object

Tool output payload if applicable

selected_tool
string | null

Tool that was executed

outcome_label
string | null

Outcome classification