The Mental Model
When an agent is created in AMFS, it implicitly gets a repository with amain branch. Every operation the agent performs is logged as an event on that branch:
Event Types
Every operation produces a typed event on the agent’s timeline:| Event Type | Description | Triggered By |
|---|---|---|
write | Memory entry created or updated | mem.write() |
outcome | Outcome committed, confidence back-propagated | mem.commit_outcome() |
cross_agent_read | Another agent read this agent’s shared memory | mem.read() / mem.read_from() |
brief_compiled | Brain brief / digest compiled by the Cortex | Cortex worker |
webhook_ingested | External context ingested via webhook | Webhook endpoint |
branch_created | New branch created from this agent’s memory | Pro: create_branch() |
branch_merged | Branch merged back into main | Pro: merge_branch() |
branch_closed | Branch closed without merging | Pro: close_branch() |
access_granted | Branch access granted to a user/team/API key | Pro: grant_branch_access() |
access_revoked | Branch access revoked | Pro: revoke_branch_access() |
tag_created | Snapshot tag created on a branch | Pro: create_tag() |
rollback | Memory rolled back to a point in time | Pro: rollback() |
cherry_pick | Entries cherry-picked from a branch to main | Pro: cherry_pick() |
fork | Agent memory forked to a new agent | Pro: fork() |
Querying the Timeline
Python SDK
HTTP API
MCP
Branches (Pro)
With AMFS Pro, you can create branches from an agent’s main timeline — just like Git branches. Branches let you:- Experiment safely — write to a branch without affecting main memory
- Share selectively — grant read or read/write access to specific users, teams, or API keys
- Review changes — see the diff between a branch and main before merging
- Merge or discard — bring branch changes into main, or close the branch
Creating a Branch
Writing to a Branch
All read/write operations accept abranch parameter:
Reading from a Branch
Access Control
Branch access is enforced at the API level. When a request targets a non-main branch, the caller’s API key is checked against the branch access grants:
| Permission | Can Read | Can Write |
|---|---|---|
read | Yes | No |
read_write | Yes | Yes |
403 Forbidden response.
