Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs(agents): document GrizzyBot and prove V72 keeps mail references
AkitaOnRails090018240167
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f8f79849..e86998f9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,8 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Added `grizzybot` as a recognised agent (wire value `grizzybot`, alias`grizzy-bot`), so GrizzyBot's lifecycle events are attributed to it insteadof `other` and its tool calls are captured as closed-schema tool families,- like other Claude Code-shaped agents. Adds migration V72 to extend the- `sessions.agent_kind` CHECK constraint.+ like other Claude Code-shaped agents. GrizzyBot posts to `/hook` and+ `/mcp` itself, so there is nothing to install. Adds migration V72 to extend+ the `sessions.agent_kind` CHECK constraint. (#1036)- Added `install-hooks --agent claude-code --scope project`, which writes thehook configuration to the checkout's gitignored `.claude/settings.local.json`(where Claude Code reads it: the git root, or the launch directory ondiff --git a/README.md b/README.mdindex a6b262f0..08859bf3 100644--- a/README.md+++ b/README.md@@ -136,6 +136,7 @@ caveats is in [`docs/support-matrix.md`](docs/support-matrix.md).| Zed | MCP-only || Muse Code | MCP-only || Hermes Agent | Supported |+| GrizzyBot | Supported || LLM/auth providers | Supported || Embedding providers | Supported |diff --git a/crates/ai-memory-store/src/migrations.rs b/crates/ai-memory-store/src/migrations.rsindex e8bc53af..ecfe95ab 100644--- a/crates/ai-memory-store/src/migrations.rs+++ b/crates/ai-memory-store/src/migrations.rs@@ -918,11 +918,44 @@ mod tests {],).unwrap();+ // V64 mail points at sessions with ON DELETE SET NULL; the rebuild+ // must neither null the sender nor leave a dangling reference.+ let message_id = uuid::Uuid::now_v7();+ conn.execute(+ "INSERT INTO agent_messages \+ (id, from_workspace_id, from_project_id, from_agent, from_session_id, \+ to_workspace_id, to_project_id, body, created_at) \+ VALUES (?1, ?2, ?3, 'zcode', ?4, ?2, ?3, 'hello', 1)",+ params![+ message_id.as_bytes().as_slice(),+ workspace_id.as_bytes(),+ project_id.as_bytes(),+ existing.as_bytes(),+ ],+ )+ .unwrap();conn.pragma_update(None, "foreign_keys", "OFF").unwrap();run(&mut conn).unwrap();conn.pragma_update(None, "foreign_keys", "ON").unwrap();+ let sender: Option<Vec<u8>> = conn+ .query_row(+ "SELECT from_session_id FROM agent_messages WHERE id = ?1",+ params![message_id.as_bytes().as_slice()],+ |row| row.get(0),+ )+ .unwrap();+ assert_eq!(sender.as_deref(), Some(existing.as_bytes().as_slice()));+ let dangling: i64 = conn+ .query_row(+ "SELECT COUNT(*) FROM pragma_foreign_key_check('agent_messages')",+ [],+ |row| row.get(0),+ )+ .unwrap();+ assert_eq!(dangling, 0, "agent_messages must still reference sessions");+let preserved: (String, String, i64, Option<String>) = conn.query_row("SELECT agent_kind, cwd, ended_observation_count, actor_user \diff --git a/docs/support-matrix.md b/docs/support-matrix.mdindex a9379906..6e026453 100644--- a/docs/support-matrix.md+++ b/docs/support-matrix.md@@ -38,5 +38,6 @@| Zed | MCP-only | Native remote MCP under `context_servers` in Zed's user `settings.json`; no lifecycle hooks or managed-workstream support. || Muse Code | MCP-only | `install-mcp --client muse` merges a native streamable-HTTP entry with bearer `headers` into the snake_case `mcp_servers` map of `~/.config/muse/settings.json`, preserving sibling servers. The writer adds the mandatory `"schema_version": 1` when absent (without it every `muse` command fails at startup) and never rewrites an existing value, and it sets `"mode": "optional"` because Muse's default `required` aborts the whole run when the server is unreachable. Skills need no extra step: Muse reads `~/.agents/skills`, which `install-skills` already writes. Lifecycle capture and managed workstreams are not claimed — Muse documents a hook surface, but the output contract of its `SessionStart` event is not specified. || Hermes Agent | Supported | `install-hooks --agent hermes` (alias `hermes-agent`) prints a ready-to-paste `hooks:` block for `~/.hermes/config.yaml`. Hermes splits each configured `command` with `shlex.split` and runs it with no shell, passing the event JSON on stdin, so the entries invoke the native `ai-memory hook` command (exec form, like Zero and ZCode — no script bundle is staged); ai-memory never writes that YAML file, which is yours to edit and which Hermes itself gates behind its hook-acceptance prompt (`hooks_auto_accept`). Two tool events are wired, `pre_tool_call` → `pre-tool-use` and `post_tool_call` → `post-tool-use`; their `tool_name` / `tool_input` payload drives concrete session attribution, tool-family titles, and capture exclusions. Session lifecycle (recall, prompt capture, session-end, automatic handoff) is owned by the community-maintained [`ai-memory-hermes-plugin`](https://github.com/MrLuciano/ai-memory-hermes-plugin) memory provider, so no hook-driven `session-end` is installed and nothing is duplicated; review that plugin's compatibility matrix, install/uninstall scripts, and secret handling before enabling it. No first-party `install-mcp` client and no managed workstream are claimed yet, and because Hermes ignores session-start hook stdout a pending handoff is recovered through MCP (`memory_handoff_list` then `memory_handoff_accept`). |+| GrizzyBot | Supported | [GrizzyBot](https://github.com/Foscoe63/GrizzyBot), a native macOS agent app, ships its own ai-memory bridge: it posts lifecycle events to `/hook` with `agent=grizzybot` (alias `grizzy-bot`) and talks to `/mcp` directly, so there is nothing for `install-hooks` or `install-mcp` to write. Sessions are attributed to `grizzybot`, and its Claude Code-shaped tool payloads (`tool_name`/`tool_input`/`tool_use_id`) are stored as closed-schema tool families, never tool names or arguments. The bridge is maintained in the GrizzyBot repository; review it before pointing it at a shared server. No managed workstream. || LLM/auth providers | Supported | Anthropic, OpenAI, OpenAI OAuth/Codex, GitHub Copilot, Gemini, OpenCode (Go and Zen), OpenAI-compatible endpoints, and generic OIDC device auth for native hooks. || Embedding providers | Supported | OpenAI, Voyage, Google Gemini, and keyless OpenAI-compatible endpoints such as Ollama, LM Studio, and vLLM. |