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)
| Tool | Type | Description |
|---|
logs_query | Core | Query a user’s events (filter by action, time, limit) |
logs_cross_user | Core | Query events across all users (operator view) |
logs_stream | Core | Live 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
| Param | Type | Required | Default | Description |
|---|
action | string | No | — | Filter by action, e.g. vault.put, connection.execute, cards.create |
after | string | No | — | ISO timestamp — only events after this |
limit | number | No | 50 | Max 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
| Error | Cause | Recovery |
|---|
not_found | Invalid user_id | Use GET /v1/users for valid ids |
invalid_input | Malformed after timestamp or limit | Use 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