Skip to main content
Every primitive write and connection action emits an activity event scoped to the tenant user. Use logs to build a per-user timeline, an operator audit view across all users, or a live dashboard feed.

CLI First

naive logs tail --user alice                  # one user
naive logs all --action connection.execute    # cross-user (operator view)

Tools

ToolTypeDescription
logs_queryCoreQuery a user’s events (filter by action, time, limit)
logs_cross_userCoreQuery events across all users (operator view)
logs_streamCoreLive SSE tail of activity.logged events

Querying

curl "https://api.usenaive.ai/v1/users/{user_id}/logs?action=vault.put&limit=50" \
  -H "Authorization: Bearer nv_sk_your_key"
Response:
{
  "events": [
    {
      "id": "036d9c3e-3c0b-4ba0-92a5-36da71087446",
      "tenant_user_id": "90a734a7-5f5a-4c4f-ba8f-80f770971d16",
      "actor_type": "agent",
      "action": "vault.put",
      "entity_type": "vault_entry",
      "entity_id": "instantly.api_key",
      "created_at": "2026-06-04T06:43:36Z"
    }
  ]
}

Parameters

ParamTypeRequiredDefaultDescription
actionstringNoFilter by action, e.g. vault.put, connection.execute, cards.create
afterstringNoISO timestamp — only events after this
limitnumberNo50Max events (cap 200)

Cross-user (operator view)

curl "https://api.usenaive.ai/v1/logs?user_id={user_id}&action=connection.execute" \
  -H "Authorization: Bearer nv_sk_your_key"

Live stream (SSE)

# Bearer travels in the header; emits `activity.logged` events as they happen
curl -N https://api.usenaive.ai/v1/users/{user_id}/logs/stream \
  -H "Authorization: Bearer nv_sk_your_key"
The SSE stream is ideal for a live dashboard timeline — it pushes each activity.logged event the moment it’s recorded, no polling required.

Error Handling

ErrorCauseRecovery
not_foundInvalid user_idUse GET /v1/users for valid ids
invalid_inputMalformed after timestamp or limitUse an ISO timestamp and a positive limit

Typical Workflow

Build a per-user activity feed in your app

    ├─ GET /v1/users/alice/logs?limit=50     → Initial timeline (most recent first)

    ├─ GET /v1/users/alice/logs/stream       → Subscribe to live updates (SSE)
    │   → activity.logged: cards.create
    │   → activity.logged: connection.execute

    └─ GET /v1/logs?action=cards.create      → Operator view across all users