Provenance Fields
| Field | Type | Description |
|---|---|---|
agent_id | str | The agent that wrote the entry (e.g., "review-agent") |
session_id | str | The session in which it was written |
written_at | datetime | UTC timestamp of when the entry was created |
pattern_refs | list[str] | Cross-reference tags linking to related entries |
Automatic Provenance
Provenance is recorded automatically. You don’t need to set it manually:Pattern References
Usepattern_refs to cross-reference related entries:
Agent Identity
In the MCP server, agent identity is auto-detected from the environment:| Environment | Agent ID Format |
|---|---|
| Cursor | cursor/<username> |
| Claude Code | claude-code/<username> |
| Other | agent/<username> |
AMFS_AGENT_ID environment variable:
Provenance Tiers
AMFS 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.| Tier | Value | Criteria |
|---|---|---|
PRODUCTION_VALIDATED | 1 | Agent ID starts with agent/, prod/, or prod- AND outcome_count > 0 |
PRODUCTION_OBSERVED | 2 | Production agent, no outcomes yet |
DEVELOPMENT | 3 | Agent ID starts with dev/, test/, dev-, or test- |
MANUAL | 4 | Agent ID starts with manual/, seed/, or human/ |
provenance.agent_id and outcome_count, not stored as a separate field.
