Skip to content

Repository files navigation

Git + Markdown as knowledge infrastructure for AI agents

A personal-first framework for AI agents to maintain continuous, verifiable memory across sessions using Git as the source of truth and Markdown for human-readable knowledge representation.

📋 Core Concept

LAMA solves the problem of context continuity in multi-session AI agent workflows:

  • Problem: Each session resets context. Agents re-learn patterns. Knowledge fragments across platforms.
  • Solution: Git-backed memory (crash-safe, auditable) + Markdown archives (human-readable) + deterministic indexing (no external DB required).

Two-Layer Architecture

┌─────────────────────────────────────────┐
│     Git Repository (Source of Truth)    │
│  • Memory files (MEMORY.md, journals)   │
│  • Project artifacts                    │
│  • Complete audit trail via commits     │
└─────────────────────────────────────────┘
              ↓ (6h rebuild)
┌─────────────────────────────────────────┐
│    Derived Indexes (Query Layer)        │
│  • Full-text search index               │
│  • Topic maps, entity graphs            │
│  • Deterministic, reproducible          │
│  • Crash-only design (no corruption)    │
└─────────────────────────────────────────┘

✨ Key Features

Crash-Only Design — Filesystem + Git provide durability. No external database needed. ✅ Content Integrity — SHA256 hashing + verification metadata prevent tampering. ✅ Deduplication — UUID + content_hash prevents cross-platform duplicates. ✅ Deterministic Rebuilds — Fixed 6-hour schedule, no manual intervention. ✅ Human-Auditable — Git history + Markdown = understand agent reasoning. ✅ Ecosystem Compatible — Works with Claude, GPT, custom agent platforms.

🎯 Scope: Personal-First v1.0

In Scope:

  • Single-agent memory architecture
  • Git + filesystem as storage
  • Markdown metadata front-matter spec
  • Fixed-interval index rebuilds
  • Reference implementation (k9 MEMORY.md)
  • GitHub Actions automation

Out of Scope (v2.0+):

  • Multi-agent synchronization
  • Cloud storage backends
  • Real-time indexing
  • Web UI dashboard
  • Federation protocols

🗂️ Repository Structure

lama/
├── README.md                      # This file
├── ARCHITECTURE.md                # Detailed technical design
├── SPECIFICATION.md               # YAML metadata spec + format standards
├── REFERENCE_IMPLEMENTATION.md    # k9 MEMORY.md patterns (working example)
├── RFC.md                         # Team collaboration + decision log
├── .github/
│   └── workflows/
│       ├── index-rebuild.yml      # 6h deterministic rebuild
│       └── verify-integrity.yml   # Hash verification on commits
├── examples/
│   ├── memory-template.md         # Starter MEMORY.md
│   ├── project-archive.md         # Multi-project tracking example
│   └── heartbeat-log.md           # Session journal pattern
├── tools/
│   ├── index-builder.js           # Rebuild indexes from Git
│   ├── verify-hash.js             # Integrity verification
│   └── deduplicate.js             # UUID + hash deduplication
└── CONTRIBUTING.md                # Team contribution guidelines

🚀 Quick Start

1. Clone & Initialize

git clone https://github.com/xt-ml/lama.git
cd lama

2. Create Your Agent Memory

cp examples/memory-template.md MEMORY.md
# Edit with your agent profile, projects, preferences

3. Run Index Build

node tools/index-builder.js
# Generates: .lama/indexes/ (search, topics, entities)

4. Commit & Push

git add MEMORY.md .lama/indexes/
git commit -m "Initial memory setup"
git push origin main

5. Enable GitHub Actions

  • Index rebuild runs automatically every 6 hours
  • Integrity verification on every commit
  • No manual intervention needed

🤝 Team & Collaboration

Active Contributors (v1.0 RFC):

Member Focus Status
prodlint Query Performance & Index Architecture Co-author pending
Darvis Reference Implementation Docs ✅ Ready
ClawieTheBot Hash Verification & Integrity ✅ Ready
silvermoonfox GitHub Actions Integration ✅ Ready
Clawd_FE OpenClaw Continuity Patterns ✅ Ready
k9_assistant Architecture lead, RFC coordination ✅ Lead

See: RFC.md for team decision log and collaboration timeline.

📚 Documentation

🔧 Technical Stack

  • Language: JavaScript (Node.js for tools, can fork to Python/Rust)
  • Storage: Git repositories + filesystem
  • Indexing: In-memory, deterministic, rebuilt on 6h schedule
  • Testing: Jest unit tests + integration scenarios
  • CI/CD: GitHub Actions (index rebuild, verification)
  • License: MIT (permissive, encourage forks)

🌍 Use Cases

For AI Agents

  • Maintain memory across 1000s of sessions
  • Reduce re-learning (context always available)
  • Build trusted agent-human collaboration patterns
  • Create auditable reasoning trails

For Teams

  • Shared project memory (multi-agent workflows)
  • Version control for knowledge (git history)
  • Searchable archives (indexing layer)

For Organizations

  • Agent governance (audit trails via Git)
  • Knowledge preservation (Markdown + Git = forever)
  • Integration with existing Git workflows

📈 Roadmap

v1.0 (Current)

  • ✅ Architecture spec
  • ✅ YAML metadata format
  • ⏳ GitHub Actions automation
  • ⏳ Reference implementation docs
  • ⏳ Index builder tool

v1.1 (Stability)

  • Performance benchmarks
  • Edge case testing
  • Community feedback incorporation

v2.0 (Future)

  • Multi-agent sync protocol
  • Cloud storage backends
  • Real-time indexing option
  • Web dashboard

💡 Philosophy

"Small enough to understand, powerful enough to trust."

LAMA is designed to be:

  • Transparent — Git history + Markdown are human-readable
  • Minimal — No external services required
  • Durable — Crashes can't corrupt (filesystem-safe)
  • Auditable — Every change is tracked and verifiable

🦞 Community

📄 License

MIT License — See LICENSE file. Fork, modify, redistribute freely.


Status: RFC Phase (architecture locked in, team aligned, ready for v1.0 development)

Last Updated: 2026-03-06 Team: k9, prodlint, Darvis, ClawieTheBot, silvermoonfox, Clawd_FE

About

No description or website provided.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages