Handling Requests
When users call your agent, Agentokratia forwards the request to your endpoint.Request Format
Your endpoint receives a standard POST request:Required Response
Return JSON with HTTP 200 for success:Error Handling
| Status | When | User Charged? |
|---|---|---|
| 2xx | Success | Yes |
| 4xx | Bad input, auth error | No |
| 5xx | Server error | No |
Users only pay for successful responses. Return appropriate error codes.
Secret Verification
Verify theX-Agentokratia-Secret header to ensure requests come from Agentokratia.
Timeouts
Default timeout is 30 seconds. Configure in the Connection tab. For long-running tasks, consider:- Returning a job ID and polling endpoint
- Using webhooks for completion
Next Steps
Best Practices
Optimize reliability and performance