A self-documenting, portable knowledge base and daily backup system for AI agent frameworks. Designed so any fresh agent (Agent Zero, OpenClaw, OpenHermes, or similar) can ingest this repo and gain immediate context. Inspired by MemPalace spatial memory techniques.
- Read AGENT-BOOTSTRAP.md — the ingestion manifest
- Run
python3 scripts/build-context.py wakeup— get ~200 token wake-up context - Scan agent-zero-backup/ — latest Agent Zero daily backup
- Browse memory-palace/wings/ — Wing/Room/Hall knowledge vault
- Search
python3 scripts/search-index.py query "topic"— deep search across all content - Check docs/framework-integration/ — framework-specific guides
tolu/
├── AGENT-BOOTSTRAP.md # ⚡ START HERE — agent ingestion manifest
├── MANIFEST.json # Machine-readable repo inventory
├── .promptinclude.md # Auto-injected into Agent Zero system prompt (~200 tokens)
│
├── context-layers/ # 🧅 Token-efficient wake-up layers
│ ├── layer0-identity/ # Who am I, purpose, setup (~100 tokens)
│ ├── layer1-critical-facts/ # High-confidence facts with validity windows
│ ├── layer2-room-recall/ # Recently accessed rooms for continuity
│ └── layer3-deep-search/ # Full TF-IDF search index (on-demand)
│
├── agent-zero-backup/ # 🔄 Daily automated backup of Agent Zero
│ ├── agents/ # Agent profiles and configurations
│ ├── knowledge/ # Knowledge base (fragments, solutions, main)
│ ├── memory-export/ # Memory database snapshots (FAISS index)
│ ├── plugins/ # Installed plugins and configs
│ ├── prompts/ # Prompt templates and overrides
│ ├── skills/ # Custom skills (SKILL.md files)
│ └── workdir/ # Working directory files
│
├── memory-palace/ # 🏛️ The Knowledge Vault (Spatial Organization)
│ ├── wings/ # Top-level domains
│ │ ├── personal/ # User identity, preferences, decisions
│ │ │ ├── halls/ # {facts, events, decisions, preferences}
│ │ │ └── rooms/ # Specific topic documents
│ │ ├── projects/ # Active projects and architectures
│ │ │ ├── halls/ # {facts, decisions, architecture}
│ │ │ └── rooms/ # Project-specific rooms
│ │ ├── people/ # Contacts and interactions
│ │ │ ├── halls/ # {facts, interactions, preferences}
│ │ │ └── rooms/ # Person-specific rooms
│ │ ├── learning/ # Books, videos, courses
│ │ │ ├── halls/ # {books, videos, courses}
│ │ │ └── rooms/ # Learning-specific rooms
│ │ ├── technical/ # Tools, references, howtos
│ │ │ ├── halls/ # {tools, references, howtos}
│ │ │ └── rooms/ # Technical-specific rooms
│ │ └── domain/ # Specialized domains
│ │ ├── halls/ # {crypto, ai, web3, security}
│ │ └── rooms/ # Domain-specific rooms
│ └── tunnels/ # 🔗 Auto-generated cross-wing references
│ ├── temporal-facts.json # Temporal knowledge graph
│ └── {topic}.json # Tunnel files linking related rooms
│
├── prompt-library/ # 📝 Prompt Engineering Vault
│ ├── system-prompts/ # System prompt templates
│ ├── task-prompts/ # Task-specific prompt templates
│ ├── prompt-techniques/ # Techniques (chain-of-thought, few-shot, etc.)
│ └── templates/ # Reusable prompt templates
│
├── skills/ # 🛠️ Agent Zero Custom Skills
├── plugins/ # 🔌 Agent Zero Custom Plugins
├── configs/ # ⚙️ Configuration Files
│ ├── agent-profiles/ # Agent profile definitions
│ ├── model-configs/ # Model configuration presets
│ └── scheduler-tasks/ # Scheduled task definitions
│
├── scripts/ # 🔧 Automation Scripts
│ ├── daily-backup.sh # Daily backup script
│ ├── search-index.py # TF-IDF search index builder & query
│ ├── cross-reference.py # Auto tunnel generator
│ └── build-context.py # Context layer builder
│
├── docs/ # 📖 Documentation
│ └── framework-integration/ # Framework-specific guides
│ ├── agent-zero.md # Agent Zero integration
│ ├── openclaw.md # OpenClaw / Claude variants
│ ├── openhermes.md # OpenHermes integration
│ └── custom-providers.md # Custom LLM provider setup
│
└── BACKUP-LOG.md # 📋 Backup history log
Instead of loading full context files (~2000+ tokens), agents use a 4-layer wake-up stack (~200 tokens):
| Layer | Tokens | Loaded When | Content |
|---|---|---|---|
| 0 — Identity | ~100 | Always on wake-up | Who am I, purpose, setup |
| 1 — Critical Facts | ~50 | Always on wake-up | High-confidence active facts |
| 2 — Room Recall | ~50 | Always on wake-up | Recently accessed rooms |
| 3 — Deep Search | On-demand | When querying | Full TF-IDF search index |
~90% token savings compared to loading full context.
The Memory Palace uses Wing → Room → Hall spatial organization:
- Wing = broad domain (like a building) —
personal,projects,people,learning,technical,domain - Hall = category type within a wing (like a corridor) —
facts,decisions,books,tools, etc. - Room = specific topic document (like a room) — individual markdown files
- Tunnel = auto-generated cross-reference linking related rooms across wings
A scheduled task runs daily at 2:00 AM UTC to backup:
- Agent Zero knowledge base, memory DB, agent profiles
- Custom prompts, skills, plugins
- Working directory files
- Context layers and search index
Backups are committed to agent-zero-backup/ with timestamps and pushed to GitHub.
# Get minimal wake-up context
python3 scripts/build-context.py wakeup
# Search the memory palace
python3 scripts/search-index.py query "authentication"
# Build cross-wing tunnels
python3 scripts/cross-reference.py build
# Run backup manually
bash scripts/daily-backup.sh- Portable — Any agent framework can read this repo and gain context
- Self-Documenting — Every directory has a README
- Machine-Readable — MANIFEST.json + search-index.json for structured access
- Spatial — Wing/Room/Hall organization inspired by MemPalace
- Token-Efficient — 4-layer context stack saves ~90% tokens
- Living — Updated daily via automated backup
- Cross-Referenced — Auto-generated tunnels link related knowledge
- Temporal — Facts have validity windows for historical tracking
| Framework | Guide |
|---|---|
| Agent Zero | docs/framework-integration/agent-zero.md |
| OpenClaw / Claude variants | docs/framework-integration/openclaw.md |
| OpenHermes | docs/framework-integration/openhermes.md |
| Custom Providers | docs/framework-integration/custom-providers.md |
Personal knowledge base — all rights reserved.