GET
https://api.agentwarden.io
/
api
/
logs
GET /api/logs
curl --request GET \
  --url https://api.agentwarden.io/api/logs \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "agent_id": "<string>",
  "organization_id": "<string>",
  "action": "<string>",
  "status": "<string>",
  "context": {},
  "ip_address": {},
  "created_at": "<string>"
}

Overview

Retrieve logs of all agent actions. Supports filtering and pagination.

Authentication

Authorization
string
required
Bearer token (JWT) from /auth/login

Query Parameters

agent_id
string
Filter by specific agent ID
action
string
Filter by action name
status
string
Filter by status: “success”, “failed”, “pending”, “denied”
limit
integer
default:"20"
Number of results per page (max 100)
offset
integer
default:"0"
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"

Pagination

# 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
string
Unique log entry ID
agent_id
string
ID of the agent that performed the action
organization_id
string
Your organization’s ID
action
string
The action that was performed
status
string
Status: “success”, “failed”, “pending”, or “denied”
context
object
Additional details about the action
ip_address
string | null
IP address where the action originated
created_at
string
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:
PlanRetention
Free7 days
Pro30 days
Business90 days
EnterpriseCustom
Older logs are automatically deleted according to your plan’s retention period.