Cognition Open-Sources Agent Memory Repo: A Git-based Spec for Persistent, Long-term Agent Memory Across Sessions
Cognition has launched Agent Memory Repo, an open source standard that treats AI agent memory as a structured, version-controlled git repository.
The Agent Memory Repo uses git-based versioning to allow agents to maintain and share context across long-term projects.
- Cognition released Agent Memory Repo, an open source specification for persistent agent memory.
- The system uses git repositories to store, version, and merge memory records across different agent sessions.
- A "Dreaming" process periodically optimizes these repositories by merging duplicates and removing outdated information.
- The format supports cross-linking, metadata, and multi-agent coordination within shared folders.
The Need for Persistent Agent Memory
As autonomous agents like Devin increasingly handle complex, multi-stage software engineering tasks, the limitation of memory confined to a single session has become apparent. To address this, Cognition has introduced the Agent Memory Repo, an open source standard designed to enable agents to maintain context across different working sessions. By treating memory as a structured, version-controlled git repository, the developers aim to provide a predictable and inspectable way for agents to learn from past interactions.
Architectural Overview
The core philosophy of the Agent Memory Repo is that memory should be accessible, persistent, and collaborative. Instead of relying solely on proprietary databases or opaque vector embeddings, this standard utilizes common filesystem structures combined with git. Key components of the specification include:
- MEMORY.md: Serving as the primary entry point, this file provides a roadmap for the agent, containing key information and links to specific domain-related notes.
- Metadata and Linking: Entries within the repository use bullet-point formatting with optional metadata, such as source links to specific session records and creation dates.
- Cross-linking: Using a syntax similar to wiki systems, agents can use
[[path]]to link files, allowing the system to scale as more knowledge is added over time.
By using git as the backbone, the system inherently benefits from features like version history and collision resolution. When multiple agents attempt to modify the same memory entry, git provides the necessary mechanisms to handle conflicts, ensuring data integrity.
The "Dreaming" Process
A notable feature of the specification is the implementation of "Dreaming," an autonomous agent process that runs periodically. The responsibilities of the Dreaming agent are two-fold: it works to identify patterns across multiple sessions to create consolidated entries and performs maintenance by removing outdated information or resolving contradictions between sources. This ensures that the memory repository does not become cluttered with stale or conflicting data as the agent gains more experience.
Use Cases for Collaborative Agents
Cognition emphasizes that the repository format is designed to be composable. This enables several advanced use cases:
- Agent Swarms: When multiple agents work in parallel on a single project, they can share a common memory repository. As shown in testing, this allows specialized agents to coordinate findings without needing human intervention.
- Team Memory: Teams can share technical knowledge or process details via a central memory repository that all agents can access, making lessons learned in one investigation available to the entire team.
- Multiplayer Integration: Because memories are organized as folders, sessions can merge multiple repositories. If a new user joins a session, their memory repository can be cloned into the same environment, allowing the agent to leverage multiple sources of context simultaneously.
The standard is currently available on GitHub and is designed to be interoperable. Cognition intends for this to become a broader ecosystem standard for agent development, moving away from closed, isolated memory models.
Enjoyed this?
Get more posts like this delivered to your inbox.
Tencent Cloud Releases Octop, an Open-Source Multi-User AI Platform
Next →Meet rhun: An Open-Source Assembly-Based Code Editor for AI-Assisted Workflows