Skip to content

Commit 711fd83

Browse files
docs: update README with orchestrator product story
- Add memory-as-orchestrator to the product narrative - New "routing problem" section alongside cold-start problem - engram-orchestrator package docs with code examples - engram-bridge dashboard docs with endpoint table - Updated 3→5 package diagram, repo structure, contributing - Tagline: "One memory. Every agent. Zero cold starts. Automatic routing." Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d71bbe5 commit 711fd83

1 file changed

Lines changed: 130 additions & 13 deletions

File tree

README.md

Lines changed: 130 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<p align="center">
1414
Hit a rate limit in Claude Code? Open Codex — it already knows what you were doing.<br>
15+
Create a task? Memory picks the best agent automatically.<br>
1516
One memory kernel. Shared across every agent. Bio-inspired forgetting. Zero cold starts.
1617
</p>
1718

@@ -55,40 +56,69 @@ engram install # 3. Auto-configure Claude Code, Cursor, Code
5556

5657
Restart your agent. Done — it now has persistent memory across sessions and agents.
5758

59+
**Want the dashboard + orchestration?**
60+
61+
```bash
62+
pip install -e "./engram-orchestrator"
63+
pip install -e "./engram-bridge[web,orchestrator]"
64+
engram-bridge --channel web # Open http://127.0.0.1:8200
65+
```
66+
5867
---
5968

6069
## Why Engram
6170

62-
Every AI agent you use starts with amnesia. But the real pain isn't just forgetting — it's what happens when you **switch agents**.
71+
Every AI agent you use starts with amnesia. But the real pain isn't just forgetting — it's what happens when you **switch agents** and when you have to **decide which agent to use**.
72+
73+
### The cold-start problem
6374

6475
You're 40 minutes into a refactor with Claude Code. You've touched six files, picked a migration strategy, mapped out the remaining TODOs. Then you hit a rate limit. Or your terminal crashes. Or you just need Codex for the next part. So you switch — and the new agent has **zero context**. You re-paste file paths, re-explain decisions, re-describe the plan. Half the time the new agent contradicts something you'd already decided.
6576

66-
**Engram fixes this.** It's a Personal Memory Kernel — one memory store shared across all your agents. When Claude Code pauses, it saves a session digest. When Codex picks up, it loads that digest and continues where you left off. No re-explanation. No cold starts.
77+
### The routing problem
6778

68-
But Engram isn't just a handoff bus. It models memory the way brains do:
79+
You have three agents configured: Claude Code for deep reasoning, Codex for fast scaffolding, a custom agent for CI. A bug comes in. Which agent handles it? You pick manually every time. When agents finish, the next task sits idle until you notice. You are the orchestrator — and you shouldn't have to be.
80+
81+
**Engram fixes both.** It's a Personal Memory Kernel — one memory store shared across all your agents.
82+
83+
**For handoffs**: when Claude Code pauses, it saves a session digest. When Codex picks up, it loads that digest and continues where you left off. No re-explanation. No cold starts.
84+
85+
**For orchestration**: agents register their capabilities as memories. When a task arrives, Engram semantically matches it against agent capabilities and auto-routes it to the best available agent. Memory *is* the orchestrator — no separate routing service, no manual assignment, no YAML configs mapping tasks to agents.
6986

7087
| Problem | Typical approach | Engram |
7188
|:--------|:-----------------|:-------|
7289
| **Switch agents = cold start** | Manual copy-paste | Handoff bus — auto session digests + resume |
90+
| **Who handles this task?** | You pick manually | Semantic capability matching — auto-route |
91+
| **Agent at capacity?** | Task sits idle | Load-aware routing with CAS claim/release |
7392
| **Nobody forgets** | Store everything forever | Ebbinghaus decay — ~45% less storage |
7493
| **Single retrieval path** | One embedding per memory | 5 retrieval paths per memory (EchoMem) |
7594
| **No episodic memory** | Vector search only | CAST scenes — time/place/topic clustering |
7695
| **No consolidation** | Store everything as-is | CLS sleep cycles — episodic to semantic distillation |
77-
| **Single decay rate** | One exponential curve | Multi-trace Benna-Fusi model (fast/mid/slow) |
7896
| **No real-time coordination** | Polling or nothing | Active memory signal bus — agents see each other instantly |
7997
| **Concurrent access** | Single-process locks | sqlite-vec WAL — multiple agents, one DB |
8098

8199
---
82100

83101
## How It Works
84102

85-
Engram has two distinct memory systems — like the brain's conscious and subconscious:
103+
Engram has three layers — memory, coordination, and communication:
104+
105+
### Passive Memory — the long-term store
106+
107+
Memories fade via Ebbinghaus decay, get promoted from short-term to long-term through repeated access, and are encoded through multiple retrieval paths (paraphrase, keywords, implications, question-form). Sleep cycles distill episodic conversations into durable semantic facts.
86108

87-
**Active Memory**a real-time signal bus. Agents post ephemeral state ("editing auth.py", "build failing") that other agents see instantly. Signals auto-expire. Important ones get consolidated into long-term storage.
109+
### Active Memory — the real-time signal bus
88110

89-
**Passive Memory** — the long-term store. Memories fade via Ebbinghaus decay, get promoted from short-term to long-term through repeated access, and are encoded through multiple retrieval paths (paraphrase, keywords, implications, question-form). Sleep cycles distill episodic conversations into durable semantic facts.
111+
Agents post ephemeral state ("editing auth.py", "build failing") that other agents see instantly. Signals auto-expire. Important ones get consolidated into long-term storage.
90112

91-
**Handoff** — when an agent pauses (rate limit, crash, tool switch), it saves a session digest: task summary, decisions made, files touched, TODOs remaining. The next agent loads it and continues. If no digest was saved, Engram falls back to parsing the conversation logs automatically.
113+
### Memory-as-Orchestrator — the coordination layer
114+
115+
Agent capabilities are stored as memories: *"claude-code: Advanced coding agent. Expert at Python, TypeScript, debugging."* When a task arrives, Engram runs a semantic search over these capability memories, filters by agent availability and capacity, scores candidates, and assigns the task — all through the same memory infrastructure used for everything else. Coordination events (routed, claimed, released) are themselves stored as memories, creating a searchable audit trail.
116+
117+
No new database tables. No separate routing service. The same `Memory.add()` / `Memory.search()` that stores user conversations also stores agent profiles and routes tasks.
118+
119+
### Handoff
120+
121+
When an agent pauses (rate limit, crash, tool switch), it saves a session digest: task summary, decisions made, files touched, TODOs remaining. The next agent loads it and continues. If no digest was saved, Engram falls back to parsing the conversation logs automatically.
92122

93123
<details>
94124
<summary><b>The memory stack at a glance</b></summary>
@@ -102,6 +132,7 @@ Engram has two distinct memory systems — like the brain's conscious and subcon
102132
| **CLS Distillation** | Sleep-cycle replay: episodic to semantic fact extraction |
103133
| **Multi-trace** | Benna-Fusi model — fast/mid/slow decay traces per memory |
104134
| **Intent routing** | Episodic vs semantic query classification |
135+
| **Orchestrator** | Agent registry + semantic task routing + CAS claim/release |
105136
| **Handoff bus** | Session digests, checkpoints, JSONL log fallback |
106137
| **Active Memory** | Real-time signal bus with TTL tiers |
107138
</details>
@@ -110,11 +141,11 @@ Engram has two distinct memory systems — like the brain's conscious and subcon
110141

111142
## Packages
112143

113-
Engram is three pip-installable packages:
144+
Engram is five pip-installable packages:
114145

115146
```
116-
engram-memory ← engram-bus ← engram-enterprise
117-
(core) (comms) (governance)
147+
engram-memory ← engram-bus ← engram-orchestrator ← engram-bridge ← engram-enterprise
148+
(core) (comms) (routing) (dashboard) (governance)
118149
```
119150

120151
### [`engram-memory`](./engram/) — Core Memory Engine
@@ -160,6 +191,81 @@ bus.publish("progress", {"step": 3, "total": 5}, agent="worker")
160191

161192
[Full documentation →](./engram-bus/README.md)
162193

194+
### [`engram-orchestrator`](./engram-orchestrator/) — Memory-as-Orchestrator
195+
196+
Agents register capabilities as memories. Tasks auto-route to the best agent via semantic search. No new DB tables — everything is a memory.
197+
198+
```bash
199+
pip install -e "./engram-orchestrator"
200+
```
201+
202+
```python
203+
from engram_orchestrator import Coordinator, AgentRegistry
204+
from engram.memory.main import Memory
205+
from engram_bus import Bus
206+
207+
memory = Memory(config=...)
208+
bus = Bus()
209+
coordinator = Coordinator(memory, bus, config)
210+
211+
# Agents register capabilities — stored as searchable memories
212+
coordinator.registry.register(
213+
"claude-code",
214+
capabilities=["python", "typescript", "debugging", "code-review"],
215+
description="Advanced coding agent for deep reasoning tasks",
216+
agent_type="claude", model="claude-opus-4-6",
217+
)
218+
219+
# Tasks auto-route via semantic matching
220+
coordinator.start() # subscribes to bridge.task.created bus events
221+
222+
# Or route manually
223+
coordinator.router.route(task_id) # single task
224+
coordinator.router.route_pending() # batch all unassigned
225+
226+
# Agents claim tasks atomically (CAS)
227+
coordinator.claim(task_id, "claude-code") # returns None if already claimed
228+
coordinator.release(task_id, "claude-code")
229+
```
230+
231+
Three classes, one idea:
232+
233+
| Class | Purpose |
234+
|:------|:--------|
235+
| **AgentRegistry** | Store/query agent capability profiles as `memory_type="agent"` memories |
236+
| **TaskRouter** | Build query from task → semantic search → filter by availability → score → assign |
237+
| **Coordinator** | Ties registry + router + bus events. CAS claim/release. Event logging as memories |
238+
239+
### [`engram-bridge`](./engram-bridge/) — Dashboard + Channel Adapters
240+
241+
Talk to your coding agents from a browser or Telegram. Kanban board, task management, live WebSocket streaming, and the coordination dashboard.
242+
243+
```bash
244+
pip install -e "./engram-bridge[web,orchestrator]"
245+
engram-bridge --channel web
246+
```
247+
248+
The web dashboard at `http://127.0.0.1:8200` includes:
249+
250+
- **Board** — Kanban with drag-and-drop, projects, statuses, tags
251+
- **Agents** — Coordination dashboard: agent registry, semantic routing, event log
252+
- **Memory** — Browse and search the memory store
253+
- **Chat** — Direct agent interaction with live streaming
254+
255+
7 coordination REST endpoints under `/api/coordination/`:
256+
257+
| Endpoint | Description |
258+
|:---------|:------------|
259+
| `GET /agents` | List agents with capabilities + status |
260+
| `POST /agents/{name}/register` | Register/update capabilities |
261+
| `GET /agents/match?q=...` | Semantic capability search |
262+
| `POST /route/{task_id}` | Route task to best agent |
263+
| `POST /route-pending` | Batch-route all unassigned |
264+
| `POST /claim/{task_id}` | Atomic CAS claim |
265+
| `GET /events` | Coordination event log |
266+
267+
[Full documentation →](./engram-bridge/README.md)
268+
163269
### [`engram-enterprise`](./engram-enterprise/) — Governance Layer
164270

165271
Policy enforcement, provenance tracking, acceptance gates, async operations, and authenticated REST API. Built on top of engram-memory and engram-bus.
@@ -205,10 +311,14 @@ Works with any tool-calling agent via REST: `engram-api` starts a server at `htt
205311
│ └── cli.py # CLI interface
206312
├── engram-bus/ # engram-bus — agent communication
207313
│ └── engram_bus/ # bus, pub/sub, handoff store, TCP server
314+
├── engram-orchestrator/ # engram-orchestrator — memory-as-orchestrator
315+
│ └── engram_orchestrator/ # registry, router, coordinator
316+
├── engram-bridge/ # engram-bridge — dashboard + channel adapters
317+
│ └── engram_bridge/ # bridge, channels (web + telegram), coordination shim
318+
│ └── channels/web-ui/ # React dashboard (Vite + shadcn/ui)
208319
├── engram-enterprise/ # engram-enterprise — governance layer
209320
│ └── engram_enterprise/ # kernel, policy, provenance, async, API + auth
210321
├── plugins/ # Claude Code plugin (hooks, commands, skill)
211-
├── dashboard/ # Next.js memory visualizer
212322
├── tests/ # Test suite (300+ tests)
213323
├── pyproject.toml # engram-memory package config
214324
└── install.sh # One-line installer
@@ -230,6 +340,13 @@ pytest
230340
pip install -e "./engram-bus[dev]"
231341
cd engram-bus && pytest
232342

343+
# Orchestrator
344+
pip install -e "./engram-orchestrator"
345+
346+
# Bridge (web dashboard)
347+
pip install -e "./engram-bridge[web,orchestrator]"
348+
cd engram-bridge/engram_bridge/channels/web-ui && npm install && npm run build
349+
233350
# Enterprise
234351
pip install -e "./engram-enterprise[dev]"
235352
cd engram-enterprise && pytest
@@ -244,7 +361,7 @@ MIT — see [LICENSE](LICENSE).
244361
---
245362

246363
<p align="center">
247-
<b>One memory. Every agent. Zero cold starts.</b>
364+
<b>One memory. Every agent. Zero cold starts. Automatic routing.</b>
248365
<br><br>
249366
<a href="https://github.com/Ashish-dwi99/Engram">GitHub</a> &middot;
250367
<a href="https://github.com/Ashish-dwi99/Engram/issues">Issues</a> &middot;

0 commit comments

Comments
 (0)