Overview
The AgentWarden API provides direct HTTP access to all platform features. While we recommend using the Python SDK for most use cases, the API allows you to:- Integrate from any programming language
- Build custom integrations
- Implement advanced workflows
- Use AgentWarden from serverless functions
Base URL
Authentication
AgentWarden uses two authentication methods depending on the endpoint:SDK Endpoints (X-API-Key)
For permission checks and logging (the core SDK functionality):Your organization’s API key from the dashboard
Management Endpoints (JWT Bearer Token)
For managing agents, permissions, and viewing logs:Bearer token obtained from
/auth/login endpointRate Limits
API requests are rate limited based on your plan:| Plan | SDK Endpoints | Management Endpoints |
|---|---|---|
| Free | 100/min | 60/min |
| Pro | 1,000/min | 300/min |
| Business | 10,000/min | 1,000/min |
| Enterprise | Custom | Custom |
Response Format
All API responses use JSON format:Success Response
Error Response
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | No Content (successful deletion) |
400 | Bad Request (invalid parameters) |
401 | Unauthorized (invalid/missing auth) |
403 | Forbidden (plan limit exceeded) |
404 | Not Found |
429 | Too Many Requests (rate limited) |
500 | Internal Server Error |
Pagination
List endpoints support pagination:Number of results per page (max 100)
Number of results to skip
Filtering
Many endpoints support filtering:agent_id- Filter by specific agentaction- Filter by action namestatus- Filter by status (success, failed, denied, pending)created_after- Filter by creation date (ISO 8601)created_before- Filter by creation date (ISO 8601)
Timestamps
All timestamps are in ISO 8601 format with UTC timezone:Idempotency
For safety, some endpoints support idempotency keys:CORS
The API supports CORS for browser-based applications:Webhooks
AgentWarden can send webhooks for various events:approval.approved- When an approval is grantedapproval.denied- When an approval is deniedagent.created- When a new agent is createdpermission.updated- When permissions change
SDKs and Libraries
Official SDKs:API Endpoints
Check Permission
Check if an agent can perform an action
Log Action
Log an agent action for audit trail
Manage Agents
Create and manage agents
Manage Permissions
Configure agent permissions