Personal memory: one memory, many models
Reference, rendered from docs/chloectx/personal-memory.md.
These docs describe release 0.3.11. The docs of main describe the code as it is now.
On this page
ChloeCtx keeps a memory of your own beside the memories of your projects: the chats you had with ChatGPT, Claude.ai and Gemini, and a persona card of what they say about you, each line linked to the chats it came from. It is one ChloeDB file on your machine, and any assistant you connect reads it through the same tools: ChatGPT as a connector, Claude.ai as a custom connector, Claude Code and any MCP client. A slice of it can be shared with a key of its own.
ChatGPT export ─┐ ┌─ ChatGPT (connector)
Claude.ai zip ──┤ chloectx import ├─ Claude.ai (custom connector)
Gemini Takeout ─┤ ─────────────┐ ├─ Claude Code, any MCP client
browser capture ┤ ▼ │
API proxy ──────┘ ┌──────────────────────┐ MCP │
│ me: chats + persona │──────┤ /mcp, OAuth sign-in
│ one ChloeDB file │ │
└──────────────────────┘ └─ shares: /s/<key>/mcp
signed, read-only, expiring
Why not a file of notes about yourself? A plain file has no sources (you cannot tell where "vegetarian" came from or whether it is still true), no search (an assistant reads all of it or none), no history (an edit loses what it replaced), and no scope (you share the whole file or nothing). Here every line of the card says which chat it came from, an assistant asks for what bears on its question and gets those records with their chats, a changed line keeps the old one as history, and a share holds only the sections and topics you picked, signed, logged and revocable.
On a Mac with Claude Desktop#
The shortest way in needs no terminal. Each release has chloectx-claude-desktop-macos.mcpb, a Claude Desktop extension that holds chloectx and its model. Open it in Claude Desktop (double-click it, or drag it onto Settings, Extensions) and press Install. Then ask Claude:
- "Import my ChatGPT export." Claude finds the exports in Downloads, Desktop and Documents (or says how to ask for one) and imports the one you pick.
- "Draft my persona card." Claude reads your own messages a part at a time and proposes lines, each naming the messages it came from. They show as suggested.
- "Show me the card." Claude goes through the suggested lines with you, and confirms, rewrites or drops each.
You do not have to fetch the exports yourself. The extension has a prompt, bring_my_history, for Claude with computer use or Claude in Chrome: it opens ChatGPT, Claude.ai and Google Takeout in turn, asking you before each, and requests your export there (request_export). It never types a password. When the email with the link comes, Claude or you click it. While a request is waiting, the extension looks in Downloads, Desktop and Documents about every ten seconds and imports the export when it lands; export_status says what came in. If you use the hosted beta, give the extension your account's address and capture key in its settings, and what it imports goes there as well.
It is the same memory as the commands below use, so chloectx me serve can later serve it to ChatGPT as well. Its README lists its tools and how it is built and checked.
Import your chats#
Ask each service for an export, then give ChloeCtx the file as it came:
| from | where to ask | what you get |
|---|---|---|
| ChatGPT | Settings, Data controls, Export data | a zip with conversations.json (and your custom instructions) |
| Claude.ai | Settings, Privacy, Export data | a zip with conversations.json and memories.json |
| Gemini | Google Takeout, My Activity, Gemini Apps | MyActivity.json (pick JSON) or MyActivity.html |
chloectx import ~/Downloads/chatgpt-export.zip --dry-run # what it holds, nothing written chloectx import ~/Downloads/chatgpt-export.zip chloectx import ~/Downloads/claude-export.zip chloectx import ~/Downloads/takeout/ # a folder: every export found in it chloectx me # what the memory holds, by source
Each message is kept once, so importing a newer export of the same account adds only what is new. Every record says which assistant and which chat it came from, with the chat's title and address. ChatGPT's custom instructions and Claude.ai's memories come in as chats of their own. Any other source can be written as JSON lines, one message each, and imported with --from jsonl:
{"source": "chatgpt", "conversation": "c-1", "title": "Kyoto trip", "role": "user", "text": "I'm vegetarian.", "ts": 1763600000}
The memory is the me folder in ChloeCtx's data folder (~/.local/share/chloectx/me). The usual commands read it with --me: chloectx --me search kyoto, chloectx --me ask "what do I eat?".
The persona card#
The card is what an assistant reads first: short lines about you, in sections (About me, Work, Health & diet, Travel, and so on), each with the chats it came from.
chloectx me card build # drafts the card from your own messages with a model (claude -p, --model sonnet) chloectx me card # the card, each line with its source chats chloectx me card edit # in $EDITOR; a line you change or keep becomes yours chloectx me card add "Health & diet" "Vegetarian; avoids mushrooms." chloectx me card confirm <id> # make a drafted line yours chloectx me card drop <id> # take it off (kept as history)
build reads only what you wrote, never the assistants' answers, and keeps a drafted line only when it names the messages it came from. Building again replaces the drafted lines and keeps every line you wrote or confirmed. A line an assistant adds through remember shows as suggested, by that assistant, until you confirm it.
The assistant you connect can draft it instead, with no model of ChloeCtx's own: persona_draft gives it your messages a part at a time with the same rules, and persona_suggest adds the lines it proposes, each with the ids of the messages it came from, as suggested. A line that names no message of yours is left out. persona_review confirms, changes or drops lines as you tell it.
Connect ChatGPT, Claude.ai and other assistants#
chloectx me serve serves the memory over MCP with OAuth sign-in: the assistant registers itself, sends you to a consent page that asks for your passcode, and gets a token for 24 hours (renewed for 90 days). The passcode and a capture key are made and printed once on the first run; chloectx me connect --new-passcode makes a new one.
chloectx me serve # http://127.0.0.1:7781 cloudflared tunnel --url http://127.0.0.1:7781 # or: tailscale funnel 7781 chloectx me serve --public-url https://<that address>
ChatGPT and Claude.ai reach a connector at a public HTTPS address, so put a tunnel in front of it and pass the tunnel's address as --public-url. Then:
- ChatGPT: in Settings, under Apps & Connectors, turn on developer mode, then create a connector with
https://<address>/mcpand OAuth. - Claude.ai: Settings, Connectors, Add custom connector, with
https://<address>/mcp. - Claude Code:
claude mcp add --transport http me https://<address>/mcp(or the local address).
The consent page asks whether the assistant may also write. It gets these tools:
| tool | what |
|---|---|
persona |
the card, with each line's sources |
search |
records that answer a query: id, title (the assistant and the chat), address, text |
fetch |
one record in full: the exchange it belongs to, or a card line with its sources |
ask |
the context for a question, within a budget |
remember |
(with write) a line for the card, shown as suggested, or a note |
persona_draft, persona_suggest, persona_review |
(with write) the card drafted by the assistant, and the person's review of it |
search and fetch answer as ChatGPT's connectors expect. Every call is written to an access log, chloectx me log, with the tool, the query and who asked, never what came back. chloectx me connect lists the assistants signed in, and --signout signs them all out.
Keep it current#
The browser extension (chloectx/extension/, for Chrome and other Chromium browsers) records your chats on chatgpt.com, claude.ai and gemini.google.com as you have them, into the server's /capture. It is off for every site until you turn that site on, and it sends only the messages of the chat open in that tab, to the address you give it, with the capture key. Its README says how to load it.
On a site that is on, the extension's ChloeCtx button suggests questions that ask the assistant what it knows about you (everything it remembers, how you like answers, your projects and goals, the people and places in your life). Picking one puts it in the message box, and you send it. When the answer is complete, the extension sends it once to /capture/memory, which makes each of its lines a suggested line of the card, as pasting it on the account page does. You keep or drop each one. The options page turns the button off.
Your whole history. The options page's Bring my whole history brings every past chat of chatgpt.com or claude.ai, not only those you open: a tab of the site reads them with the requests the site's own page makes, signed in as you are there, and sends each to /capture, one at a time, with a panel in the tab that shows how far it is. Each message is kept once, with the same text an export gives, so pressing it again, or importing the site's export later, adds only what is new. When a site has changed those requests, it sends you to the site's export instead. For Gemini it opens Google Takeout. The extension's README has the details.
The API proxy records what apps send to OpenAI's and Anthropic's APIs and what they get back. Point an app's base URL at the server, with the capture key in the path, and keep its own API key:
export OPENAI_BASE_URL=http://127.0.0.1:7781/p/<capture key>/openai/v1 export ANTHROPIC_BASE_URL=http://127.0.0.1:7781/p/<capture key>/anthropic
Requests go through unchanged, streamed or not, and the exchange is recorded after it ends. A request with x-chloectx-record: off is not recorded; x-chloectx-conversation and x-chloectx-title name the chat it belongs to (by default, its first message).
Share a slice#
A share is a signed, read-only copy of part of the memory, with a key of its own:
chloectx me share create "diet and travel" --sections "Health & diet,Travel" --topic kyoto --expires 30d chloectx me share list chloectx me share log <id> # every call made with its key chloectx me share revoke <id>
It holds the card's lines in the sections named (every section by default, none with --no-card), the records that answer each --topic, and with --sources the messages the card's lines were drawn from. Whoever has the key connects to https://<address>/s/<key>/mcp with no sign-in and sees only that slice; the key stops working when it expires or is revoked. The copy is a context capsule signed with your key (Ed25519), so --out DIR also writes it for chloectx mount, which checks the signature and names the signer.
On a ChloeDB cluster#
chloectx app serves a space of the cluster the same way, for a memory that should live in a cluster rather than on a laptop (ChloeCtx on a cluster):
CHLOECTX_CONNECT_PASSCODE="<at least 10 letters and digits>" CHLOECTX_CONNECT_CAPTURE_KEY="ctxc_<a long secret>" \ chloectx app --server http://127.0.0.1:7700 --port 7760 --connect-url https://me.example.com
The space (--connect-space, me by default) is made if it is not there, and the sign-in, the tools, /capture and the proxy are served at the app's address beside its own API, which keeps its token. --connect-state FILE keeps the sign-ins across restarts. Shares are served by chloectx me serve only.
The hosted beta#
chloectx app --hosted-url serves many people's memories from one app on a cluster, for people who will not run anything themselves. Each person signs up on its page with an invite, a name and a passcode of their choosing. Each gets a space of their own (me_<name>) and an address of their own for Claude.ai or ChatGPT, https://<address>/u/<name>/mcp. The sign-in, the tools and /capture at that address are the same as chloectx me serve's, with the account's passcode. The API proxy is not served there, and shares are the share links below.
chloectx app --server http://127.0.0.1:7700 --port 7760 --token "$CHLOECTX_APP_TOKEN" \ --hosted-url https://me.example.com --hosted-state /data/hosted --hosted-invites /data/invites.txt
The person's pages are made for a phone first, with a guide of three steps on the first visit. On them they:
- paste what ChatGPT, Claude or Gemini answers to "List everything you remember about me", each line of which becomes a suggestion, or upload an export as it came (in parts of 3 MB, up to 2 GB), which is imported in the background;
- check each suggested line of the card (keep, fix or remove, with undo), add lines of their own, and see the chat messages each line came from and what it said before it was changed;
- read their chats, and search them and the card;
- connect Claude, ChatGPT or any other MCP app by the steps shown, with their connector's address, and see the assistants signed in and what each read, and sign them all out;
- share lines of the card they pick by a link of 1 to 30 days (
/u/<name>/s/<key>): a page anyone with the link can read, and at/s/<key>/mcpan MCP server with no sign-in and one read-only tool,shared_memory; each link counts how often it was opened and read by an app, and can be stopped or given a new address, which ends the old one. A link shares the lines as they are now: an edited line shows its new text, and a line taken off the card leaves the link; - group lines of the card into profiles ("Family", "Work", "Vacations") and share a whole profile, as described below;
- make a capture key for the browser extension, which it serves as a zip to load by hand (
/chloectx-extension.zip) until it is in the Chrome Web Store; - change their passcode, or make a new recovery code;
- download everything as JSON lines;
- delete the account, which drops its space.
A profile is a group of the card's lines that a person keeps around one side of themselves, with a name, a line on what it is about and an emoji (up to 50 profiles, of up to 500 lines each, in profiles.json in the account's folder). The person adds and removes lines, and a line they removed is not suggested again. Suggest proposes lines for a profile, and Suggest profiles for me proposes three to six profiles for the whole card, which are saved only when the person keeps them. With a model (ANTHROPIC_API_KEY or the claude CLI, as for the rest of the app), the model picks them from the card's lines, which its prompt treats as data, and only lines of the card are kept. With no model, they come from the sections the profile's name points at ("family" points at People and Identity, "work" at Work, Projects and Skills, "vacations" at Travel), from lines that share its words, and from a search of the memory. A profile follows its lines as they change: an edited line is its new version. A link can share a whole profile (POST /account/links with "profile"). It shows the profile's lines as they are when it is read, so a line added later shows on it too, and deleting the profile stops its links. A profile can also be shared with other accounts by their names, and those people see it under Shared with you, as it is now, until it is unshared (GET /account/shared?from=<name>&id=<profile>; anyone else gets a 404). Demos come with three profiles and can't share with accounts. The API is GET and POST /account/profiles.
--hosted-state keeps the accounts (passcodes as PBKDF2, recovery codes, capture keys and share links' keys as SHA-256), each account's sign-ins, links, profiles and access log, in files of mode 0600. --hosted-invites holds one invite a line, each used once; without it anyone may sign up, up to --hosted-max-accounts (200 by default). Signing up shows a recovery code once: with it and their name, a person who forgot their passcode picks a new one, which signs out every browser and makes a new code. The page's requests that change anything must come from its own origin, and sign-in and recovery each stop for 15 minutes after 5 wrong tries. /privacy says in plain words what is kept and who can read it.
/demo, and See a demo on the first page, open a demo with one click and no invite: an account of the visitor's own (demo<code>) filled with a made-up person's memory (chloectx/src/hosted_demo.json: a year of chats with ChatGPT, Claude and Gemini, lines of the card with the messages they came from, some to check, three profiles and a share link). Its pages say it is a demo and show its passcode, so an assistant can be connected to it. A demo is deleted after a day; --hosted-demos is the most open at once (30; 0 turns demos off), and when that many are open the oldest over an hour old makes room. Demos don't count toward --hosted-max-accounts, and take exports up to 20 MB.