agent-brain
БесплатноЗапускает вложенные скриптыНе проверенLocal-first persistent memory for AI agents with SQLite storage, orchestrated retrieve/extract loops, hybrid retrieval, contradiction checks, correction…
от modbender★ 21 звезда на GitHubОб этом скилле
Agent Brain 🧠
Teach your AI once. It remembers forever. It gets smarter over time.
Agent Brain is a modular memory system for AI agents with continuous learning. It stores facts, catches contradictions, learns your habits, ingests external knowledge, tracks what works, learns from mistakes, and adapts to your tone — all in a local SQLite database with real persistence, full-text search, and pluggable storage backends.
Why this exists
Every AI conversation starts from zero. You repeat yourself. It forgets what you taught it. Agent Brain fixes that with a working persistence layer (scripts/memory.sh) and six cognitive modules that the agent selectively invokes based on what the task actually needs.
What makes this different
- Production-grade storage. SQLite with WAL mode and indexed queries. Handles 10,000+ entries without breaking a sweat. JSON backend available as fallback.
- Pluggable backends. Storage abstraction layer means you can swap SQLite for Postgres, Supabase, or any other backend — the command interface stays the same.
- Continuous learning. Corrections track what was wrong, what's right, and why. Successes reinforce what works. Anti-patterns emerge from repeated mistakes.
- Selective dispatch, not a linear pipeline. The orchestrator picks the 1-3 modules relevant to each task. Storing a fact doesn't need Vibe. Reading tone doesn't need Archive.
- Active fact extraction. The agent scans every message for storable information — identity, tech stack, preferences, workflows, project context — without being asked.
- Honest confidence. No fake 0.0-1.0 scores. Four categories (SURE / LIKELY / UNCERTAIN / UNKNOWN) derived from actual metadata — source type, access count, age.
- Hybrid retrieval. Results ranked with lexical + semantic scoring (
--policy fast|balanced|deep) and optional score explainability (--explain). - Supersede, don't delete. Old facts aren't destroyed. They're marked
superseded_bywith a pointer to the replacement, preserving full history. - Decay is mechanical. Entries scale their decay threshold by access count. Heavily-used knowledge persists longer. Unused knowledge fades.
Architecture
Six modules, one orchestrator, pluggable storage.
┌──────────────────────────────┐
│ 🧠 ORCHESTRATOR │
│ Dispatches by task type │
└──────────┬───────────────────┘
│
┌────────────┼────────────────────┐
│ Which modules does this need? │
└────────────┼────────────────────┘
│
┌─────────┬───────┼───────┬──────────┬──────────┐
▼ ▼ ▼ ▼ ▼ ▼
┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
│ARCHIVE│ │GAUGE │ │INGEST│ │SIGNAL│ │RITUAL│ │ VIBE │
│ 📦 │ │ 📊 │ │ 📥 │ │ ⚡ │ │ 🔄 │ │ 🎭 │
│Store │ │Conf. │ │Learn │ │Check │ │Habits│ │ Tone │
└──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘
└─────────┴───────┴────┬───┴────────┴─────────┘
▼
┌──────────────────┐
│ 💾 memory.db │
│ SQLite (default)│
│ or memory.json │
└──────────────────┘
How It Works
Per-Message Flow
On EVERY user message, the agent runs this sequence:
Step 1: RETRIEVE — Before doing anything, search memory for context relevant to this message.
Extract 2-4 key topic words from the user's message and search:
./scripts/memory.sh get "<topic words>" --policy balanced
How to pick search terms:
| User says | Search query | Why |
|---|---|---|
| "Help me set up the API endpoint" | "api endpoint setup" |
Core task nouns |
| "Can you refactor the auth module?" | "auth refactor code" |
Task + domain |
| "What port does our server run on?" | "server port config" |
Question subject |
| "Fix the TypeScript error in checkout" | "typescript checkout error" |
Tech + component |
| "Write tests for the payment flow" | "payment testing workflow" |
Domain + action |
If results come back, use them silently to inform your response. Never say "I remember..." or "According to my memory..." — just apply the knowledge naturally.
If no results, proceed normally. For deterministic orchestration you can run:
./scripts/memory.sh loop "<full user message>"
Step 2: EXTRACT — Scan the user's message for storable facts, preferences, or procedures.
See the Archive module (modules/archive/SKILL.md) for signal patterns, categories, and examples. Before storing, always check for conflicts:
./scripts/memory.sh conflicts "<content to store>"
# If NO_CONFLICTS → proceed with add
# If POTENTIAL_CONFLICTS → ask user to clarify, or supersede old entry
./scripts/memory.sh add <type> "<content>" <source> "<tags>"
Extra
Установить agent-brain в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-brain?
Local-first persistent memory for AI agents with SQLite storage, orchestrated retrieve/extract loops, hybrid retrieval, contradiction checks, correction learning, and optional SuperMemory mirroring.
Как установить скилл agent-brain?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-brain запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic