Full activity log

Status: plan, not built. No code yet.

The idea

Today the server keeps a lot already (Audit and reports). But some things are not kept: the model's thinking, what the phone did on its own, what screen the user was on, and the full picture of one moment.

The full activity log is one switch per account. When it is on, everything that account does is sent to the server and kept in one timeline. An AI agent can then read that timeline later and say what went right, what went wrong, and what to fix.

It is off by default. It holds the most private data in the system.

What it records

GroupEvents
Data changesAdd, edit, delete of memory, lists, jobs, reminders, places, calendar events, files, settings. Edits keep a ref to the row and the list of changed fields, not copies of the text
ChatsEvery message the user sends, every reply, every turn's status and error
ModelWhich model and profile ran, tokens, time, and the model's thinking text
ToolsEvery tool call, its arguments, its result, the gate's decision, approvals asked and answered
NotificationsSent, held (quiet hours, cap), skipped (and why), tapped, snoozed, rated
LocationPlace id at the time of each event (no coordinates). Points and visits stay in the location tables, under their own limit
DeviceWhich device, app version, battery level, charging, network type
AppScreens opened, buttons tapped, permissions changed, features turned on or off
BackgroundJobs fired, the mind's runs, dreaming, detections, syncs, and their timings
ErrorsFailed calls, retries, crashes on the phone

The setting

Server. A per-account key in the account's settings table: activity_log.settings, a JSON value. Same pattern as brief.settings in src/signals.rs.

{ "enabled": false, "since": null, "off_at": null, "keep_days": 90, "parts": { "thinking": true, "location": true, "app": true } }

Routes (owner token only, like the audit routes):

GET   /v1/activity/settings
PATCH /v1/activity/settings        {enabled?, keep_days?, parts?}

Turning it on writes an activity.on audit event. Turning it off writes activity.off, sets off_at, and stops server capture at once.

What each parts switch drops:

Switch offDropped
thinkingThe model_calls.thinking value is not stored; model.* events keep only model, tokens and time
locationNo place in ctx, and no place.* or location.* events
appNo app.* events (screens, taps) from the phone

Phone capture is never on by default inside the log: overheard speech of other people (CaptureService) and the text of other apps' notifications (NotifyListener) are not logged. Only their counts and kinds are, like capture.batch with a size. Including them would need its own switch, named on the explain screen.

Android. A switch in the app's settings page: "Full activity log". Turning it on opens a full screen that says, in plain words:

The user must tick "I understand" before it turns on. While it is on, the app's settings page shows "Full activity log: on" at the top. The phone reads the setting on each sync.

The server also pushes the switch over the live NoticeStream, so an open app stops at once. Any batch the server gets after off_at drops events newer than off_at. So turning it off stops capture at once, even if a phone is behind.

Event format

One new table in the account's database:

CREATE TABLE activity (
  n      INTEGER PRIMARY KEY AUTOINCREMENT,
  id     TEXT NOT NULL UNIQUE,   -- set by the sender, so retries do not double
  ts     INTEGER NOT NULL,       -- when it happened (unix seconds)
  got    INTEGER NOT NULL,       -- when the server stored it
  source TEXT NOT NULL,          -- "server" | "device:<id>"
  kind   TEXT NOT NULL,          -- "area.what", like audit_events
  thread TEXT, turn TEXT,        -- links to the chat and the turn
  ref    TEXT,                   -- links to a row: "action:<id>", "model_call:<n>", "notice:<n>", "audit:<n>"
  ctx    TEXT NOT NULL,          -- JSON: place, device, app version, battery, network
  detail TEXT NOT NULL           -- JSON, scrubbed
);
CREATE INDEX activity_ts ON activity (ts);
CREATE INDEX activity_kind ON activity (kind, ts);

One event:

{
  "id": "evt_01...",
  "ts": 1795400000,
  "source": "device:pixel",
  "kind": "notice.skipped",
  "ref": "notice:812",
  "ctx": { "place": "place_12", "device": "pixel", "app": "1.4.0", "battery": 62, "charging": false, "net": "wifi" },
  "detail": { "why": "quiet hours", "priority": "normal" }
}

Kinds use the same area.what names as audit_events (Logging). New areas: data (add, edit, delete), chat, model, tool, notice, app, device.

Rules:

How it builds on the audit trail

The audit trail already keeps most server-side facts. The plan reuses them and does not copy them.

Already keptTableChange
Model requests and repliesmodel_callsAdd a thinking column. Fill it only when the log is on. Today thinking is shown to clients and then dropped (src/model.rs)
Tool calls and decisionsactionsNo change. Each one gets a tool.call event with ref: action:<id>
NotificationsnoticesAlso keep notices the code chose not to send. Today held ones are kept; a skip shows only as a field on some audit events. Event notice.sent / notice.held / notice.skipped
Jobs, places, phone batchesaudit_eventsNo change. Each one gets an event with ref: audit:<n>
ChatsmessagesNo change. chat.user and chat.reply events point to the message

New, only when the log is on: data changes (a ref plus changed field names), app screens and taps, device state, phone-side errors.

The writing point is one function, activity::log(app, kind, ref, ctx, detail), that does nothing when the setting is off. audit::event, audit::record, engine::log_action and the notice code call it. So every place that already logs feeds the timeline for free.

The review pack. GET /v1/audit/review gets a new section, "Timeline", when the log is on: the events in time order, grouped by turn, with place and device. The pack's instructions gain one line: "Use the timeline to see what the user was doing and where when each notice went out."

Sending from the phone

The phone must not wake more for this (Android battery).

Expected cost: one extra request body on a sync that already runs. Measure before and after with the steps in Android battery.

Storage and retention

Who can read it

Read, export, delete

GET    /v1/activity?since=&until=&kind=&turn=     owner, paged, newest first
GET    /v1/activity/export?since=&until=          owner, JSON lines
DELETE /v1/activity?since=&until=                 owner; no range = delete all

Privacy and safety

This is the most private data the system holds: where you were, what you said, what the model thought about you.

How agents read it

  1. The owner runs the review, as today: assistantx-review or GET /v1/audit/review?since=last&mark=1.
  2. With the log on, the pack has the Timeline section.
  3. For deep work, the agent gets GET /v1/activity/export for a window, as JSON lines. Use redact=1 when the agent runs on a cloud model.
  4. The owner tells the agent what to look for: "Find notices that came at a bad time", "Find where the model's thinking went wrong", "Find what I did by hand that the assistant could have done".

The agent proposes edits. It never gets write access to the account.

Steps to build

  1. Add the log to the Threat model and check each defense there.
  2. Server: activity table, activity::log, settings and routes, prune. Tests: off writes nothing; device token cannot read; scrub works; delete removes all; a batch after off_at stores nothing; oversize or unknown kinds get a 400; no coordinates in ctx. Add activity and thinking to the Forget sweep; test that a forgotten fact is gone from both.
  3. Server: wire in audit::event, audit::record (with thinking), log_action, notices (with skipped), data changes.
  4. Review pack Timeline section.
  5. Android: switch, explain screen, banner, local queue, batch upload on the sync with WorkManager, and the off switch over NoticeStream.
  6. Android: app, device and error events.
  7. Measure battery. Write the numbers here.
  8. Move this page to architecture/ once built, and link it from Audit and reports.

Open questions