Skip to main content
GET
/
agents
/
{agent_id}
/
actions
List Agent Actions
curl --request GET \
  --url https://api.example.com/agents/{agent_id}/actions
[
  {
    "source": "event",
    "timestamp": "2023-11-07T05:31:56Z",
    "event": {
      "organization_id": "<string>",
      "resource_id": "<string>",
      "resource_name": "<string>",
      "provider": "<string>",
      "resource_type": "<string>",
      "event_type": "<string>",
      "to_state": "draft",
      "id": "<string>",
      "from_state": "draft",
      "actor_type": "<string>",
      "actor_id": "<string>",
      "error": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z"
    },
    "log": {
      "organization_id": "<string>",
      "agent_resource_id": "<string>",
      "log_type": "trigger_fired",
      "message": "<string>",
      "id": "<string>",
      "instance_id": "<string>",
      "metadata": {},
      "timestamp": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z"
    }
  }
]

Path Parameters

agent_id
string
required

Query Parameters

since
string<date-time> | null

Start of time window (ISO 8601). Defaults to 1 hour ago.

until
string<date-time> | null

End of time window (ISO 8601). Defaults to now.

limit
integer
default:50

Maximum entries to return.

Required range: 1 <= x <= 500

Response

Successful Response

source
enum<string>
required
Available options:
event,
log
timestamp
string<date-time>
required
event
LifecycleEvent · object

A recorded lifecycle state transition for a resource.

Attributes: id: SurrealDB record ID (populated by database). organization_id: Tenant that owns the resource. resource_id: SurrealDB resource ID. resource_name: Human-readable resource name. provider: Provider that manages the resource. resource_type: Resource type name. event_type: Lifecycle event that caused the transition (e.g. apply, success, failure). from_state: State before transition, None for initial creation. to_state: State after transition. actor_type: Who caused this event ("user", "agent", "system"), None for legacy events. actor_id: Identifier for the actor (user ID or agent resource ID), None for legacy events. error: Error message when transitioning to FAILED state. timestamp: When the transition occurred. expires_at: When this event should be garbage collected.

log
AgentLog · object

A recorded action or decision by an AI agent.

Attributes: id: SurrealDB record ID (populated by database). organization_id: Tenant that owns the agent. agent_resource_id: SurrealDB ID of the agent resource. instance_id: Agent instance that produced this log entry. log_type: Category of this log entry. message: Human-readable description of what happened. metadata: Flexible payload (tool name, arguments, error details, etc.). timestamp: When this action occurred. expires_at: When this log entry should be garbage collected.