Invoke a custom agent with the provided input.
Supported Agents: Custom agents only. Managed agents should use the /chat endpoint.
Input: Pass structured input data matching the agent’s input schema.
Timeout: Agent invocations have a 60-second timeout. If the agent takes longer to respond, you will receive a 504 Gateway Timeout error. For long-running tasks, consider using streaming mode which does not have the same timeout constraints.
Idempotency: For non-streaming requests, send an Idempotency-Key header with a unique value
(e.g., UUID) to ensure duplicate requests return the same response. Keys are valid for 24 hours.
Streaming responses are not cached.
Streaming: Set stream: true in the request body to receive Server-Sent Events (SSE)
stream with incremental chunks. Useful for long-running tasks or real-time responses.
API Key or Personal Access Token (PAT). When using PAT, include X-Project header.
Unique, URL-safe agent name within the project
1