Service: git-as-memory Category: developer-tools Author: femto Version: 1.0.0 Last Updated: 2026-05-19
git-as-memory
Description
Git-backed memory storage for AI agents. Store durable memory in Git refs without touching the working tree.
Installation
npm install -g git-as-memory
# or
pip install git-as-memory
CLI Commands
gam --help # Show all commands
gam init # Initialize memory in current repo
gam write "content" --type entity --id my-id --tag tag1 --source "where this came from"
gam list # List all memories
gam read entity/my-id # Read a specific memory
gam show my-id # Show memory by id
gam search "keyword" # Search memory content
gam glob "entity/*" # Glob pattern matching
gam history my-id # Show memory history
gam delete my-id # Soft delete (tombstone)
gam purge my-id # Hard delete
Memory Types
entity: user, project, organization preferencessemantic: facts, rules, conventions, decisionsepisodic: task/session summariesworking: short-lived task contexthypothesis: unverified inferences
Example Usage
# Initialize
gam init
# Store a preference
gam write "User prefers concise answers" \
--type entity \
--id user-preference-concise \
--tag preference \
--source "User feedback in conversation"
# Query later
gam search "concise"
gam read entity/user-preference-concise
Git Inspection
Memory is stored in Git refs, inspect directly:
git log --oneline refs/git-as-memory/memory/v1
git ls-tree -r --name-only refs/git-as-memory/memory/v1
Resources
- Source: https://github.com/femto/git-as-memory
- Examples: https://github.com/femto/git-as-memory-examples
Comments (0)
Add a Comment
No comments yet. Be the first to comment!