> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runtools.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity

> Query customer-visible resource activity

`GET /v1/activity` returns customer-visible activity events for every resource the caller can see — sandboxes, agents, threads, tools, workspaces, devices, and more. Use it for audit views, troubleshooting, resource timelines, and product observability.

## Query Parameters

<ParamField query="resource_type" type="string">
  One of `sandbox`, `agent`, `workspace`, `thread`, `tool`, `installable_agent_install`, `runmesh_device`, or `code_execution`.
</ParamField>

<ParamField query="resource_id" type="string">
  Resource identifier. When provided with `resource_type`, access is checked for that resource.
</ParamField>

<ParamField query="event_type" type="string">
  Machine-readable event type, such as `agent.run.started` or `tool.call.failed`.
</ParamField>

<ParamField query="severity" type="string">
  `info`, `warning`, or `error`.
</ParamField>

<ParamField query="status" type="string">
  Event-specific state, such as `started`, `completed`, `failed`, or `added`.
</ParamField>

<ParamField query="actor_user_id" type="string">
  Admin-only when different from the current user.
</ParamField>

<ParamField query="thread_id" type="string">
  Filter by thread.
</ParamField>

<ParamField query="agent_run_id" type="string">
  Filter by agent run.
</ParamField>

<ParamField query="sandbox_id" type="string">
  Filter by sandbox.
</ParamField>

<ParamField query="workspace_id" type="string">
  Filter by workspace.
</ParamField>

<ParamField query="tool_slug" type="string">
  Filter by Tool Hub slug.
</ParamField>

<ParamField query="installable_agent_install_id" type="string">
  Filter by installable-agent install.
</ParamField>

<ParamField query="code_execution_id" type="string">
  Filter by code execution.
</ParamField>

<ParamField query="runmesh_node_id" type="string">
  Filter by RunMesh node.
</ParamField>

<ParamField query="since" type="string">
  ISO timestamp lower bound.
</ParamField>

<ParamField query="until" type="string">
  ISO timestamp upper bound.
</ParamField>

<ParamField query="limit" type="number" default="50">
  Maximum `200`.
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor from `meta.nextCursor`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.runtools.ai/v1/activity?resource_type=thread&resource_id=thr_abc123&limit=25" \
    -H "X-API-Key: $RUNTOOLS_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "events": [
        {
          "id": "act_abc123",
          "resourceType": "thread",
          "resourceId": "thr_abc123",
          "eventType": "agent.run.completed",
          "severity": "info",
          "status": "completed",
          "title": "Agent run completed",
          "summary": "Agent run completed",
          "threadId": "thr_abc123",
          "agentRunId": "run_abc123",
          "occurredAt": "2026-05-10T12:00:00.000Z"
        }
      ]
    },
    "meta": {
      "hasMore": false,
      "nextCursor": null
    }
  }
  ```
</ResponseExample>

## Resource Activity Shortcuts

Several resources expose activity shortcuts that apply the right authorization and filters:

| Path                                                   | Description                        |
| ------------------------------------------------------ | ---------------------------------- |
| `/v1/sandboxes/{id}/activity`                          | Sandbox activity                   |
| `/v1/agents/{slug}/activity`                           | Agent activity                     |
| `/v1/threads/{threadId}/activity`                      | Thread activity                    |
| `/v1/workspaces/{id}/activity`                         | Workspace activity                 |
| `/v1/runmesh/devices/{id}/activity`                    | RunMesh device activity            |
| `/v1/installable-agents/installs/{installId}/activity` | Installable-agent install activity |

Activity is scoped to the current organization. Non-admin members see their own actor activity unless the request is authorized by resource access.
