AgentFS

Events

Poll the account event feed.

Every mutation an API key makes writes an event. Poll GET /v1/events to read them.

Event object

FieldTypeDescription
idstringEvent ID, prefixed evt_.
typestringThe action, such as file.upload, file.replace, file.move, file.delete, or project.create.
dataobjectEvent payload: target_type, target_id, target_name, and api_key_id.
created_atstringISO 8601 creation time.

List events

GET /v1/events

A forward feed, oldest first. The key needs organization-level read permission.

Query parameters

ParameterTypeRequiredDescription
afterstringNoOpaque cursor. Returns events written after it. Omit it to start at the beginning.
limitintegerNoNumber of items, from 1 through 200. Defaults to 50.
typestringNoReturn only events with this exact type.

Response fields

FieldTypeDescription
itemsarrayEvent objects, oldest first.
next_cursorstring or nullCursor for the next request, or null when the page was empty.

next_cursor is returned whenever the page is not empty, including a page that was not full. Keep the last cursor you received and poll with it; each call returns everything written since. A malformed after or limit returns invalid_query.

Returns 200 OK.

Request

Request
curl "https://agentfs.cloud/v1/events?limit=50&after=eyJrIjoiMTc3MjUzOTIwMDAwMDpldnRfYTFiMiJ9" \
  -H "Authorization: Bearer $AGENTFS_KEY"

Response

200 OK
{
  "items": [
    {
      "id": "evt_c3d4",
      "type": "file.upload",
      "data": {
        "target_type": "file",
        "target_id": "f_8f2c",
        "target_name": "/reports/report.pdf",
        "api_key_id": "k_5f1a"
      },
      "created_at": "2026-03-02T12:00:01.000Z"
    }
  ],
  "next_cursor": "eyJrIjoiMTc3MjUzOTIwMTAwMDpldnRfYzNkNCJ9"
}

Errors

unauthorized (401), invalid_agent_label (400), forbidden (403), invalid_query (400), internal_error (500).

On this page