POST /v1/agents/{agent_id}/invoke
Invoke an agent and receive a synchronous response.Request
Path Parameters
string
required
The unique identifier of the agent to invoke
Request Body
string
required
The input query or prompt for the agent
object
Additional parameters for the agent
string
Session ID for maintaining conversation context
Response
object
required
The agent’s response
object
Token usage information
object
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