Agent Endpoints
Invoke Agent
Synchronously invoke an agent
POST /v1/agents/{agent_id}/invoke
Invoke an agent and receive a synchronous response.
Request
Path Parameters
The unique identifier of the agent to invoke
Request Body
The input query or prompt for the agent
Additional parameters for the agent
Session ID for maintaining conversation context
Response
The agent’s response
Token usage information
Additional metadata
Examples
Basic Invocation
With Parameters
Response Example
Error Responses
400 Bad Request
Missing required field:
404 Not Found
Agent doesn’t exist:
429 Rate Limited
Best Practices
- Include Session ID for conversations to maintain context
- Set Appropriate Timeouts as agent processing can take time
- Handle Errors Gracefully with retry logic for 5xx errors
- Monitor Token Usage to optimize costs
See Also
- Stream Endpoint - For streaming responses
- Authentication - API authentication
- Error Handling - Error responses