{"id":51063537,"url":"https://github.com/ntholm86/agent-context-memory","last_synced_at":"2026-06-23T04:03:21.212Z","repository":{"id":366201986,"uuid":"1275433104","full_name":"ntholm86/agent-context-memory","owner":"ntholm86","description":"Specification for governance-first context memory in autonomous AI agent systems. Defines the Mandate Gate: a pre-work mandate must exist before an agent session is valid.","archived":false,"fork":false,"pushed_at":"2026-06-20T18:08:03.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T19:13:21.331Z","etag":null,"topics":["agent-memory","ai-governance","autonomous-agents","context-memory","earned-autonomy","llm-agents","mandate-gate","pea"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntholm86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json","notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-20T17:21:56.000Z","updated_at":"2026-06-20T18:00:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ntholm86/agent-context-memory","commit_stats":null,"previous_names":["ntholm86/agent-context-memory"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ntholm86/agent-context-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntholm86%2Fagent-context-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntholm86%2Fagent-context-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntholm86%2Fagent-context-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntholm86%2Fagent-context-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntholm86","download_url":"https://codeload.github.com/ntholm86/agent-context-memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntholm86%2Fagent-context-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34674702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-memory","ai-governance","autonomous-agents","context-memory","earned-autonomy","llm-agents","mandate-gate","pea"],"created_at":"2026-06-23T04:03:20.530Z","updated_at":"2026-06-23T04:03:21.204Z","avatar_url":"https://github.com/ntholm86.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Agent Context Memory (ACM)\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20785506.svg)](https://doi.org/10.5281/zenodo.20785506)\n\n**A specification for governance-first context memory in autonomous AI agent systems.**\n\n📄 **[Read the full specification →](./SPEC.md)**\n\nIf an agent begins work without a principal-authored mandate already in memory, the session is unauthorized. That is the mandate gate. It is what makes context memory *governance-first* rather than merely *persistent*.\n\n---\n\n## What this is\n\nACM is a specification for how autonomous AI agents should organize, protect, and use their context memory. It recognizes that agent memory is fundamentally an authorization problem and applies established access control patterns — the \"authorization before action\" principle common to RBAC, MAC, and capability-based security — to this domain.\n\nACM is the operationalization of [Principles of Earned Autonomy (PEA)](https://github.com/ntholm86/principles-of-earned-autonomy) for the context memory design problem. PEA is the theory; ACM is the implementation standard for memory.\n\n---\n\n## The core contribution\n\n**Principle 1 — The Mandate Gate:** A pre-work mandate must exist in memory, authored by the principal, before any agent session of work is valid. The agent must read it before touching anything else.\n\nThis is the \"authorization before action\" principle — familiar from RBAC, MAC, and capability-based security — applied to agent sessions. Every prior context memory model (MemGPT, CoALA, Generative Agents) treats memory as a working resource the agent draws from *during* work. ACM treats memory as a *precondition* — the gate that determines whether work can begin at all. Without the mandate, the session is not authorized.\n\n---\n\n## How it works\n\nACM defines a three-tier memory structure organized by **trust level**, not memory type:\n\n| Tier | Role | Author | Files |\n|------|------|--------|-------|\n| **Intent** (highest trust) | Principal's mandate — governs all sessions | Principal only | `destination.md` |\n| **Trace** (medium trust) | Agent's decision history — append-only | Agent | `audit-trail.md`, `retrospect.md` |\n| **Evidence** (independent) | Captured LLM interactions — agent-inaccessible | Harness | `sessions/*.jsonl` |\n\n**Structural requirements:**\n\n- **Mandate gate** — intent tier must exist and be read before session is valid\n- **Capture-author separation** — evidence tier cannot be authored by the agent\n- **Append-only trace** — the agent extends but never rewrites its decision history\n- **Trust-tiered conflict resolution** — intent \u003e trace \u003e evidence when tiers disagree\n- **Scope hierarchy** — ACM memory can exist at nested scopes (repo → workspace → org). Higher-scope mandates govern lower-scope ones. Scopes are discovered by parent-directory traversal, stopping at a `.acm-root` ceiling marker or the filesystem root. See §4 Scoped Memory.\n\n**Convergence at the memory level:** work is done when the trace tier shows an empty work queue and independent evaluators find nothing left to change.\n\n---\n\n## Relationship to prior art\n\nACM applies established access control patterns to agent memory:\n\n- **RBAC** — authorization before action, scope defined by authorizer, actor accountable for exceeding scope. ACM applies this at the session level (mandate gate).\n- **CoALA** (Sumers et al., 2023) — episodic, semantic, procedural, working memory tiers. ACM inherits tiered structure, adds trust-based differentiation.\n- **Generative Agents** (Park et al., 2023) — observation → reflection → planning. ACM inherits reflection as a memory operation (retrospect), applies audit-log principles.\n- **MemGPT** (Packer et al., 2023) — hierarchical memory with cross-session persistence. ACM inherits persistence, adds capture-author separation.\n\nThese models optimize for what the agent *can do*. ACM optimizes for whether the operator *can trust* what the agent did, and whether the agent was *authorized* to begin at all.\n\n---\n\n## Relationship to Augmented Individual Intelligence\n\n[Augmented Individual Intelligence (AII)](https://doi.org/10.5281/zenodo.18417872) defines five boundary conditions for when human-AI coupling qualifies as cognitive partnership. The fifth condition is **agency preservation**: the human retains final decision authority and can override AI suggestions.\n\nACM provides the enforcement mechanism for this requirement. The mandate gate ensures the principal authors the authorization; capture-author separation ensures the agent cannot rewrite its own observation record; append-only trace ensures the agent cannot rationalize overstepping after the fact.\n\n**ACM is infrastructure for AII-qualifying practices.** Without governance-first memory, agency preservation is behavioral hope. With ACM, it is structural guarantee.\n\n---\n\n## Reference implementation\n\nThe `.acm/` directory pattern is the reference implementation of ACM:\n\n```\n.acm/\n├── destination.md        # Intent tier — mandate (principal-authored)\n├── audit-trail.md        # Trace tier — append-only decision log\n├── retrospect.md         # Trace tier — current orientation (rewritten by retrospect)\n└── sessions/             # Evidence tier — harness-captured JSONL\n    └── *.jsonl\n```\n\nThe mandate gate is in force when `destination.md` exists before any session begins.\n\n---\n\n## Citation\n\nIf you use ACM, please cite it using the metadata in [CITATION.cff](./CITATION.cff).\n\n---\n\n## License\n\n[CC BY-SA 4.0](./LICENSE) — Nils Wendelboe Holmager, 2026\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntholm86%2Fagent-context-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntholm86%2Fagent-context-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntholm86%2Fagent-context-memory/lists"}