Governance

Threadline memory is user-owned. Every read and write an agent performs is bounded by a grant, and the boundary is enforced by the service — not by the agent's prompt.

The seven scopes

All context is organised into exactly seven scopes:

preferencesgoalsknowledgehistoryrelationshipscommunication_stylegeneral

Grants

A grant controls which scopes an agent may read and write for a given user. The first inject() for a user auto-provisions the grant it needs, so there is no separate grant call to get started.

A revoked grant is never auto-recreated. Once a user revokes an agent, subsequent calls return reason: "revoked" until the grant is re-issued from the dashboard.

Enforcement happens at write time

When update() extracts a fact into a scope the agent was not granted, the fact is refused: it is not stored, the scope is reported back in denied_scopes, and the denial is recorded in the audit log. Denials are enforced deterministically and logged when a fact is extracted.

{
  "updated": false,
  "delta": {},
  "denied_scopes": ["relationships"],
  "notice": "No facts were stored: the grant for this agent does not include the 'relationships' scope."
}

updated is false whenever every extracted fact was denied.

Reads are filtered to granted scopes

An agent granted preferences and goals receives only those keys. Ungranted scopes are absent from the response rather than returned empty, so an agent cannot infer what it was not allowed to see.

// Grant: ["preferences", "goals"]
{
  "preferences": { "tone": "concise" },
  "goals": { "current": "ship v1 by Friday" }
}
// "history", "relationships", ... are absent, not empty

Deletion

Context persists until the user deletes it or the grant is revoked. DELETE /api/context/{userId} permanently removes a user's stored context.