Skip to main content
Every memory entry in SenseLab carries provenance — metadata about who wrote it and when. This creates an audit trail and enables agents to assess the trustworthiness of information.

Provenance Fields


Automatic Provenance

Provenance is recorded automatically. You don’t need to set it manually:

Pattern References

Use pattern_refs to cross-reference related entries:
Pattern refs are free-form strings. Use them to build a web of related knowledge that agents can follow.

Agent Identity

In the MCP server, agent identity is auto-detected from the environment: In headless contexts — CI, scripts, servers — set the identity with an environment variable:
IDE signals are checked before AMFS_AGENT_ID, so the variable does not rename an agent running inside Cursor or Claude Code. That is deliberate: it stops a server-side value inherited by your shell from relabelling local sessions. Inside an IDE, call amfs_set_identity instead.

Session Metadata

Provenance answers who wrote an entry. A parallel record answers what was running — the model, the client, and the tools it had available: Agents set this by passing model= to amfs_set_identity. It is stored on the agent’s profile and on decision traces rather than on Provenance itself, so when you audit a decision later you can tell which model made it.

Provenance Tiers

SenseLab computes a provenance tier for each entry based on the agent ID and outcome history. This enables downstream systems to prioritize production-validated knowledge over manually seeded assumptions.
The tier is a computed property — it derives from provenance.agent_id and outcome_count, not stored as a separate field.

Querying by Provenance

Search for entries written by a specific agent: