cURL
curl --request POST \ --url https://api.example.com/agents/{agentId}/start \ --header 'Content-Type: <content-type>' \ --data ' { "enableAutonomy": true, "settings": {} } '
{ "success": true, "message": "<string>", "data": { "data.agentId": "<string>", "data.status": "<string>", "data.startedAt": 123, "data.enableAutonomy": true } }
Start an agent’s runtime to begin processing messages
POST /agents/{agentId}/start
application/json
active
curl -X POST http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000/start \ -H "Content-Type: application/json" \ -d '{}'
curl -X POST http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000/start \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "enableAutonomy": true }'
curl -X POST http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000/start \ -H "Content-Type: application/json" \ -d '{ "settings": { "temperature": 0.8, "maxTokens": 2000 } }'
{ "success": true, "message": "Agent started successfully", "data": { "agentId": "550e8400-e29b-41d4-a716-446655440000", "status": "active", "startedAt": 1709683200000, "enableAutonomy": false } }
const agentId = "550e8400-e29b-41d4-a716-446655440000"; const response = await fetch( `http://localhost:3000/agents/${agentId}/start`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ enableAutonomy: false }) } ); const { success, message, data } = await response.json(); if (success) { console.log(message); console.log(`Agent status: ${data.status}`); }
import requests agent_id = "550e8400-e29b-41d4-a716-446655440000" response = requests.post( f'http://localhost:3000/agents/{agent_id}/start', json={'enableAutonomy': False} ) data = response.json() if data['success']: print(data['message']) print(f"Agent status: {data['data']['status']}")
interface StartAgentRequest { enableAutonomy?: boolean; settings?: Record<string, any>; } interface StartAgentResponse { success: boolean; message: string; data: { agentId: string; status: 'active'; startedAt: number; enableAutonomy?: boolean; }; } const agentId = "550e8400-e29b-41d4-a716-446655440000"; const request: StartAgentRequest = { enableAutonomy: false }; const response = await fetch( `http://localhost:3000/agents/${agentId}/start`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(request) } ); const result: StartAgentResponse = await response.json();
{ "success": false, "error": "Agent not found" }
{ "success": false, "error": "Agent is already running" }
{ "success": false, "error": "Invalid agent ID format" }
{ "success": false, "error": "Failed to start agent runtime" }
curl http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000
status