Overview
Retrieve logs of all agent actions. Supports filtering and pagination.
Authentication
Bearer token (JWT) from /auth/login
Query Parameters
Filter by specific agent ID
Filter by status: “success”, “failed”, “pending”, “denied”
Number of results per page (max 100)
Number of results to skip (for pagination)
Example Requests
Get All Logs
curl https://api.agentwarden.io/api/logs \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Filter by Agent
curl "https://api.agentwarden.io/api/logs?agent_id=550e8400..." \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Filter by Status
curl "https://api.agentwarden.io/api/logs?status=failed" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Page 1 (first 50 results)
curl "https://api.agentwarden.io/api/logs?limit=50&offset=0" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Page 2 (next 50 results)
curl "https://api.agentwarden.io/api/logs?limit=50&offset=50" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Response
[
{
"id": "log_abc123",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "org_def456",
"action": "stripe.refund",
"status": "success",
"context": {
"amount": 50.00,
"customer_id": "cus_ABC123",
"refund_id": "re_xyz789"
},
"ip_address": "192.168.1.100",
"created_at": "2024-02-21T10:30:00Z"
},
{
"id": "log_def456",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "org_def456",
"action": "stripe.refund",
"status": "failed",
"context": {
"amount": 100.00,
"error": "insufficient_funds",
"error_message": "Customer has insufficient funds"
},
"ip_address": "192.168.1.100",
"created_at": "2024-02-21T10:25:00Z"
}
]
Response Fields
ID of the agent that performed the action
The action that was performed
Status: “success”, “failed”, “pending”, or “denied”
Additional details about the action
IP address where the action originated
Timestamp (ISO 8601 format)
Filtering Examples
Get Failed Actions Only
curl "https://api.agentwarden.io/api/logs?status=failed" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Get Specific Agent’s Refunds
curl "https://api.agentwarden.io/api/logs?agent_id=550e8400...&action=stripe.refund" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Get Denied Actions
curl "https://api.agentwarden.io/api/logs?status=denied" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Plan Limits
Log retention depends on your plan:
| Plan | Retention |
|---|
| Free | 7 days |
| Pro | 30 days |
| Business | 90 days |
| Enterprise | Custom |
Older logs are automatically deleted according to your plan’s retention period.