Frontend API
cURL
curl --request POST \ --url https://api.wacht.dev/api/agent/contexts/{id}/execute \ --header 'Content-Type: multipart/form-data' \ --cookie session_id= \ --form 'message=Hello, can you help me?' \ --form 'files=<string>' \ --form files.items='@example-file'
{ "message": { "id": "msg_abc123", "role": "user", "content": { "type": "text", "text": "Hello, how can you help?" }, "timestamp": "2024-01-15T10:30:00Z", "metadata": {} }, "status": "complete", "tool_calls": [], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123 } }
Execute the agent with a new message in the context
Session-based authentication using cookies
Context ID
User message to send to the agent
"Hello, can you help me?"
Optional file attachments
Agent response
Agent's response message
Show child attributes
Execution status
complete
streaming
error
"complete"
Tool calls made by the agent
[]
Token usage statistics
Was this page helpful?