Shared agent memory
ChatGPT, Gemini CLI, Claude, and Cursor can share one Tvix brain when they use the same account and MCP host.
Tvix does not push live chat into idle sessions. Connected agents pull on their next turn via MCP.
| Client | Automatic every-turn ingest | Durable facts / plans |
|---|---|---|
| Cursor | Lifecycle hooks → /agents/ingest | Hooks + MCP |
| Claude Code | Lifecycle hooks → /agents/ingest | Hooks + MCP |
| Claude Desktop Chat | Desktop transcript watcher → /agents/ingest (no official hooks) | Watcher + MCP capture_memory / wiki |
| ChatGPT / Gemini | None | Explicit capture_memory |
All connected agents read the same Tvix account via MCP. Turns and extracted memories are stamped with agent_key / source_client (and evidence links when available). Wiki notes created via MCP also store agent provenance. Other agents receive context on their next turn via query_shared_brain (memories + wiki) or sync_memory_context.
Requirements
- Same account — every agent authenticates as you (OAuth for ChatGPT; Bearer
et_…tokens for Gemini CLI / Claude / Cursor). - Same MCP host — either all on Mac Local, or all on cloud. Mixing hosts means separate databases.
| Environment | ChatGPT | Gemini CLI / Claude / Cursor |
|---|---|---|
| Cloud | https://api.tvix.ai/mcp (OAuth) | https://api.tvix.ai/mcp (Bearer) |
| Tvix for Mac | HTTPS tunnel from Enable remote agents | http://127.0.0.1:8000/mcp (Bearer) |
Connecting ChatGPT to cloud while Gemini uses Mac Local will not share memories.
Setup
- Connect each client from Agents → + Add Agent (ChatGPT, Gemini CLI, Claude, Claude Code, Cursor).
- Install hooks for Cursor and/or Claude Code from the wizard (
scripts/install-tvix-hooks.sh+ paste config). - For Claude Desktop, install the same script and load the Desktop transcript LaunchAgent (wizard step) so completed turns archive automatically.
- Paste Shared brain instructions so models call
query_shared_brain,search_wiki, andcapture_memoryfor recall and titled handoffs. - Confirm Agents shows heartbeats / last sync for each connection.
How sync works
- Agent A writes via hooks, Desktop watcher, and/or
capture_memory/create_wiki_note— stamped with that agent’s identity. - Agent B calls
query_shared_brain(orsearch_wiki/sync_memory_context) — Tvix returns memories, wiki notes, and incremental changes withsource_client/ evidence. - Agent B attributes answers (e.g. “From Cursor: …”) and acknowledges with
ack_cursoron the following sync.
Demo: Claude Desktop → Cursor (auto-archive + plan)
- Connect Claude (Desktop) and Cursor — separate
et_…tokens; same MCP host. - Enable Cursor hooks and the Claude Desktop transcript watcher.
- Paste Shared brain instructions into Claude; Always-allow search/capture tools.
- Chat normally in Claude Desktop — completed turns archive to Tvix with
source_client=claude. - For a titled handoff:
Save the complete product plan to Tvix… title "Product plan: <name>" collaboration_thread=product:<slug>. - In Cursor:
Find the product plan for <name> in Tvix and implement it.Use onlyquery_shared_brain/search_wiki— do not browsememory_storeor Application Support on disk. Attribute Claude as the source and citeevidence_url(tvix://evidence/…on Local, orhttps://tvix.ai/evidence/…on cloud) or in-appevidence_path/memory_path— never a localhost URL.
Demo: Cursor → Claude Desktop
- Chat in Cursor (hooks on) or
capture_memory/create_wiki_note. - In Claude:
What did Cursor save about <name>?— callquery_shared_brain/search_wikiand citesource_client=cursor.
Demo: random number (Cursor + Claude Code)
- Connect Cursor and Claude Code with hooks installed.
- In Cursor:
Generate a random number and share it with my other agents. - In Claude Code:
What random number did Cursor generate?— citeevidence_url.
Why paste instructions?
MCP clients choose when to call tools. Hooks/watchers archive transcripts; Shared brain instructions make models search that archive and attribute the creating agent.
Related
- Tvix MCP — tool list
- ChatGPT · Gemini CLI · Claude · Claude Code
- Attached vs Universal