Skip to main content

Execute Agent

POST /api/agents/{id}/execute

Execute a specific agent by ID.

Code Examples

curl --request POST \
--url 'https://tess.pareto.io/api/agents/{id}/execute' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"temperature": "1",
"model": "tess-ai-light",
"messages": [
{ "role": "user", "content": "hello there!" }
],
"tools": "no-tools",
"waitExecution": false
}'

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe agent ID

Request Body

ParameterTypeRequiredDescription
answersobjectYesThe agent answers
messagesarrayOnly for Chat AgentThe agent messages
waitExecutionbooleanNoIndicates if the execution should wait until completion. Default: false

Response

{
"template_id": "8794",
"responses": [
{
"id": 4773337,
"status": "starting",
"input": "hello",
"output": "",
"credits": 0.000337,
"root_id": 4773337,
"created_at": "2025-01-05T19:35:21.000000Z",
"updated_at": "2025-01-05T19:35:21.000000Z",
"template_id": 8794
}
]
}

Try it out!

Authentication

This endpoint requires Bearer token authentication.

Test Endpoint