🌐 English | فارسی | Türkçe | Azərbaycan dili | العربية
An original, modular, multilingual, agent-agnostic Second Brain and Persistent Memory system for the TM / Molavi Agentic OS ecosystem.
tm-second-brain gives AI coding agents and human teams a local-first, Markdown-canonical persistent memory that works completely offline at $0.00 cost on macOS, Linux, and Windows:
- Persistent Cross-Session Memory: Markdown + YAML frontmatter (
mem_<YYYYMMDD>_<hash>) with lifecycle states (draft→active→superseded→archived). - Provenance, Conflict Detection & Correction History: Never silently overwrites facts; supersedes prior versions with immutable
.tm-brain/corrections.jsonlaudit logs. - Project-Scoped & Environment Isolation: Strict isolation across projects and between Hamzad Core, Main Hermes (Finland server), and Hermes Personal Desktop (Mac local).
- Zero-Cost Offline Retrieval: Built-in Python BM25 + wikilink graph expansion (
expand), with pluggableRetrievalBackendfor optional QMD or Ollama. - Portable Agent Orchestration (
tm-agent-orchestration): AutoSwarm-inspired multi-agent delegation, parallel DAG execution, secret-redacted task envelopes, durable session recovery, and tokenized approval gates. - Privacy & Secret Redaction:
private: true/private_pathsexclusion and automatic redaction of API keys/tokens across MCP, exports, and bridges. - Safe Backup, Restore & Starter Vaults: SHA-256 verified
.tar.gzbackups with pre-restore snapshots and three ready-to-use Obsidian vault templates.
| Template | Best For | Key Structure |
|---|---|---|
personal-knowledge |
Personal PKM | PARA (00_Inbox–04_Archive), Daily Notes/, private 02_Areas/Personal/ |
business-project |
Teams & Goals | 3-Year → Weekly Goal Cascade, Projects/, Meetings/, Decisions/, Home.base |
developer-agent |
Engineers & AI Agents | brain/ (North Star, Key Decisions, Patterns, Gotchas), Skills/, Knowledge Graph.canvas |
- Flagship Operating Ecosystem: Native memory & knowledge engine for TM Molavi Agentic OS (
pip install molavi-agentic-os). - Obsidian: Safe
.mdread/write (auto-backup before overwrite), YAML frontmatter, wikilinks,.baseand.canvaspreservation. - First-Class TM Targets (Independently Isolated):
- Hamzad Core (
HamzadBridgeforMemoryService/MemoryInterface, non-duplicating) - Main Hermes (
MainHermesAdapter, production server) - Hermes Personal Desktop (
HermesPersonalDesktopAdapter, Mac local + controlled exchange)
- Hamzad Core (
- Coding Agents: OpenAI Codex, Claude Code, Gemini CLI, OpenCode, Goose, Antigravity + stdio MCP Server (
tm-brain mcp).
# Initialize a vault with a starter template (never overwrites existing files) python3 -m tm_second_brain.cli --vault ./my-vault init --template developer-agent # Store and search memories offline ($0.00) python3 -m tm_second_brain.cli --vault ./my-vault remember \ --title "Use WAL mode" --body "Enable SQLite WAL for concurrent readers." --project core python3 -m tm_second_brain.cli --vault ./my-vault search "WAL" --project core # Install an agent adapter (codex | claude-code | gemini-cli | opencode | goose | antigravity) python3 -m tm_second_brain.cli --vault ./my-vault install-adapter codex # Multi-Agent Orchestration session inspection python3 -m tm_second_brain.cli --vault ./my-vault orchestrate list # Create a SHA-256 verified backup python3 -m tm_second_brain.cli --vault ./my-vault backup ./vault-backup.tar.gz
- Agent Skills:
skills/tm-agent-orchestration/SKILL.md— portable AutoSwarm-inspired multi-agent coordination. - Architecture & Contracts:
ARCHITECTURE.md,API-SPEC.md,ADAPTER-CONTRACTS.md,INTEGRATION-SPEC.md - Model & Cost Transparency:
MODEL-REQUIREMENTS.md($0.00 default, zero mandatory API keys) - License: MIT License —
LICENSEandTHIRD_PARTY_NOTICES.md
- Molavi.pro (English Guide): What Is TM Second Brain? A Complete Guide to Persistent Memory for Humans and AI Agents
- Inten (Sales OS & Architecture Guide): Why Your AI Sales & Engineering Stack Forgets Everything Overnight—And How TM Second Brain Fixes It at $0.00