Files tell the readable story
Inbox notes, team notes, knowledge entries, personal notebooks, and pinned context stay easy for people and agents to inspect on disk.
Interactive system tour
A durable trail of human context, agent learnings, and task outcomes becomes focused evidence for the next dispatch - without turning recalled text into trusted instructions.
Editorial source verified against the current consolidation, retrieval, prompt, lifecycle, and fencing code.
The idea in plain language
Markdown keeps the history inspectable. SQLite makes selected facts searchable and lifecycle-aware. Prompt assembly decides what is useful now.
Inbox notes, team notes, knowledge entries, personal notebooks, and pinned context stay easy for people and agents to inspect on disk.
Structured records, lifecycle status, provenance, scope, and FTS5 turn a large history into a bounded candidate set for a specific task.
Pinned context comes first. Then active retrieval supplies relevant records, or Minions falls back to bounded team and personal files.
Hybrid does not mean mirrored. Synchronization is directional, not a general two-way sync. SQL is authoritative for structured recall; the intentional file surfaces remain authoritative for their own content.
Evolution, verified in repository history
Each layer stayed useful after the next one arrived. The current system keeps readable files, adds focused retrieval, and falls back deliberately instead of treating older paths as obsolete.
Problem solved: useful findings were scattered across individual task outputs.
Inbox consolidation turned agent and human notes into a deduplicated, readable team digest in notes.md, while preserving source notes in the archive.
Current role: consolidation still maintains the team-readable record; the digest is also the team half of the legacy prompt path.
Problem solved: one shared digest gave every specialist the same broad history.
Consolidation began routing configured, non-temporary authors' findings into knowledge/agents/<agent>.md, using YAML identity with a filename fallback.
Current role: these notebooks remain readable and maintained, but broad prompt injection is now a fallback rather than the default recall strategy.
Problem solved: growing team and personal files spent prompt space on history unrelated to the task.
Migration 017 added scoped SQL records and FTS5 search. Retrieval now reranks task matches and builds a bounded Relevant Memory pack with provenance, then wraps it in an UNTRUSTED-INPUT fence.
Current default: retrieval is enabled with shadow mode off and may select up to 8 records within 8,192 bytes; pinned context remains first.
Problem solved: authored notes did not consistently preserve the normalized result of every task.
Opt-in memoryEpisodicCapture stores compact success, partial, or failure outcomes in SQL instead of intentionally collecting transcripts or chain-of-thought. It remains off by default; without a structured summary, a redacted, truncated stdout fallback can include transcript-like text.
Legacy fallback: when retrieval is off, shadowed, empty, or errors, prompt assembly uses bounded notes.md plus the assigned agent's notebook. Episode capture does not replace either file.
Milestone months follow the commits that introduced each capability; behavior labels describe the current implementation.
End-to-end data flow
Choose a step, use the left and right arrow keys, or play the flow. Every step remains visible as ordinary content when JavaScript is unavailable.
Sources of memory
Humans, agents, and the engine all contribute - but not every source takes the same route.
Inbox staging
Eligible Markdown notes wait under notes/inbox/ until the consolidation threshold is met.
Inbox consolidation
The normal path uses a direct LLM for a concise digest and falls back to deterministic regex processing when that call fails.
Durable storage
The layers overlap on normal ingestion paths, but each remains authoritative for a different job.
Active retrieval
Minions builds the query from the work item, references, failure context, source plan, and PR metadata.
Prompt assembly
Prompt assembly is single-choice for broad memory: a non-empty active pack suppresses the team and personal appendices.
Episodic capture
When enabled, post-completion lifecycle stores a compact SQL episode for success, partial, and failed outcomes.
Interactive architecture map
The system is intentionally not a single database. Follow the normal ingestion route, the pinned shortcut, and the outcome feedback loop.
Memory begins with bounded, attributable contributions rather than an automatic transcript of everything an agent sees.
Files preserve coordination and human-readable history. They are not a disposable cache of SQL.
memory_records owns active structured content and metadata. FTS5 is a trigger-maintained derived index.
pinned.md is read directly for every rendered agent prompt, before either retrieval mode.
The prompt receives a small, ordered evidence pack - never an unbounded dump of the knowledge base.
Lexical FTS5 search produces candidates; deterministic code reranks and packs them to the configured byte budget.
Post-completion capture can turn a bounded outcome into a system-trusted record for later task-aware recall.
Prompt assembly and trust
The final prompt preserves operator priority, selects one broad-memory mode, records provenance, and fences recalled content as data.
Direct from pinned.md, capped before fencing.
Relevant Memory when active retrieval returns a non-empty pack; otherwise Team Notes + Personal Memory.
Project instructions and other non-memory context follow their own bounded assembly paths.
Feature on, shadow off, and at least one eligible result.
Feature off, shadow on, empty search, or retrieval/telemetry error.
Shadow mode is observational: Minions computes retrieval and stores telemetry, but the prompt still receives the legacy files.
Untrusted-input fencing
The wrapper sanitizes the source attribute, escapes attempted closing tags, and truncates inside the fence on a UTF-8 boundary. Agents are told to verify recalled claims against live code.
Operational controls
Settings change thresholds, budgets, rollout mode, and optional capture. They do not turn the file and SQL layers into a two-way mirror.
Feature, observation mode, and selected-pack bounds.
When notes are processed and whether task outcomes become episodes.
File-backed personal history has entry and byte windows; optional summarization is conservative.
The fence cap is an engine default; feature resolution supports a process-level override.
Troubleshooting and limitations
Open a question for the short answer. The written guide has the full operating detail and API reference.
The feature may be off, shadow mode may be on, the task query may have no indexable terms, FTS5 may find no eligible rows, or retrieval/telemetry may have thrown. These all intentionally select the legacy fallback.
Check the eligible count, consolidation pin state, in-flight state, write access to notes.md, and whether a required personal-memory write failed. An LLM failure alone should not strand the batch because regex fallback exists.
Active search is lexical FTS5, not embeddings. Out-of-band edits and file-only mutation paths do not trigger a general SQL reindex, so compare SQL provenance with the current source file.
No. A structured-record pin raises trust, confidence, and importance and restores active status. It does not edit pinned.md, bypass lexical matching, or guarantee top-K selection.
It can leave the normal pipeline. When one hash exceeds 80% of the eligible batch, the circuit breaker archives the entire batch, including minority notes, and skips team, KB/SQL, and personal writes.
No. Structured or parsed summaries are preferred, but raw stdout can be the redacted, 4,000-character fallback when no summary exists and no "type": marker is present.
There is no general two-way file/SQL mirror, no full reindex command, and no scheduled SQL-record expiry. FTS5 is lexical rather than semantic embedding search. File TTL and SQL lifecycle are separate. Never repair divergence by editing engine/state.db directly.
Minions memory is a curated trail with provenance, not a transcript and not a second command channel.