Persistent Memory
Synapse provides persistent project memory that survives across sessions, projects, and conversations. Unlike standard context windows that are wiped clean when a chat ends, Synapse memory persists in a local SQLite database, allowing AI agents to build a cumulative understanding of your project.
Modern AI models have massive context windows, but they are still stateless. Every new chat is a "blank slate." Synapse breaks this cycle by providing a "hard drive" for AI reasoning.
Key Features
1. Teacher-Mode Instructions (teach)
The teach tool is the primary way to shape an agent's long-term behavior. Use it to record team-wide coding conventions, architectural constraints, or "never do X" rules.
-
Persistence: These rules are automatically surfaced via
agent_primein future sessions. - Priority: Teacher-mode memories carry higher weight in retrieval.
2. Outcome Capture (capture_outcome)
The "Winner" state of a task is often the most valuable piece of context for the next developer.
capture_outcome allows an agent to record:
- What was achieved.
- Which files were changed and why.
- Any new "Gotchas" discovered during the process.
3. Semantic Deduplication
To prevent "context bloat," Synapse uses Vector Similarity Analysis (via sqlite-vec). When a new memory is stored:
- Synapse calculates its cosine similarity against existing records.
- If a near-identical fact exists, the agent is notified to update the existing memory instead of creating a duplicate.
4. Scoped Isolation (Nests)
Memories can be isolated into Nests. This is critical for developers working on multiple client projects.
- Context from "Project A" will never bleed into "Project B" unless explicitly requested.
Memory Tool Suite
| Tool | Capability | Use Case |
|---|---|---|
memory_store |
Semantic Persistence | Save a design decision or lesson learned. |
memory_recall |
Vector Search | Ask "What did we decide about the API?" |
teach |
Rule Ingestion | Record team-wide coding conventions. |
capture_outcome |
Outcome Tracking | Log the result of a completed milestone. |
agent_prime |
Total Rehydration | Get all relevant lessons at the start of a task. |
Real-World Workflow: The Learning Loop
-
Start: Agent calls
agent_primeand learns that "We use Vitest for this repo." - Execute: Agent writes a test using Vitest.
-
Learn: Agent discovers that "Vitest needs
jsdomfor this specific module." -
Store: Agent calls
memory_storeto record thejsdomrequirement. - Close: Agent calls
capture_outcometo summarize the new test coverage. -
Future: Next week, a different agent works on the same module and automatically receives the
jsdomtip.
Next: See how memories connect to structured architectural facts in the Knowledge Graph.