curl --request POST \
--url https://api.arg.ai/api/agent/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'import requests
url = "https://api.arg.ai/api/agent/message"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.arg.ai/api/agent/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Start an agent run
Run one agent turn. Returns 200 with job_id and call_id when the turn starts, or 202 with queue_id and position when a turn is already running on the chat and this one was queued behind it. The turn executes in the background - poll GET /api/agent/status/{callId} for the result.
curl --request POST \
--url https://api.arg.ai/api/agent/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'import requests
url = "https://api.arg.ai/api/agent/message"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.arg.ai/api/agent/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Send message for plain text. chat_id is optional - omit it and a new chat is created on the first send.
The user message to run. Required unless you send parts.
Chat to run the turn on. A new chat is created when omitted.
Workspace the agent works in. Without it the agent has no files and no sandbox.
Organization context. Defaults to the credential's organization.
Model id, for example anthropic/claude-haiku-4.5. Defaults per organization.
Reasoning depth. Clamped to what the selected model supports.
none, low, medium, high Maximum tool-use rounds for this turn, from 1 to 100.
Run with read-only tools, so the turn cannot modify the workspace.
Workspace skill names to withhold from this turn.
Subagent names to withhold from this turn.
Client-supplied UUID for the user message. Generated when omitted.
Response
Successful response
The response is of type object.