Save project decisions and user-approved notes as named, encrypted items. Retrieve the relevant notes by tag when a later session needs them.
Where agents keep notes today
- Instruction files in the repository, such as
CLAUDE.mdandAGENTS.md. The agent reads them at the start of a session. They’re right for how to work on this project: commands, conventions, what not to touch. They’re committed, so everyone with the repository reads them. - The agent’s own memory folder. Claude Code, for one, writes notes for itself under
~/.claude/projects/on your machine, and other agents have their own. Those notes stay on that one machine.
What doesn’t fit there
- Notes about clients and people that shouldn’t sit in a repository others can read.
- Notes that should follow the work to another computer, a cloud sandbox or another agent.
- Notes you want to find by tag later, or get back as they were last week.
Keep those in aFile
npm i -g @afile/cli
afile connect
afile addafile add gives the aFile skill to the agents it finds, such as Claude Code, Codex and Cursor. Text from standard input is saved as a note:
printf '# Decisions\n- 2 Dec: invoices go out on the 1st, not the 5th.\n- The client prefers PDF over spreadsheets.\n' \
| afile save - --name decisions.md --tag acme --note "what we agreed with Acme"Output
Saved. decisions.md 106 B · 9a61bfb3-372a-4b6e-ad76-f7f30aa1acbc Share it: afile share 9a61bfb3-372a-4b6e-ad76-f7f30aa1acbc
The name, tag and note are encrypted along with the text, on your machine, before anything leaves it. aFile can’t read any of them.
Or let the agent do it, in plain words:
Note that Acme wants a call before each invoice.
Read them in the next session
afile items --kind note
afile get decisions.mdOutput
decisions.md note · 106 B · version 1 · changed 2 Dec 21:53 acme · 9a61bfb3-372a-4b6e-ad76-f7f30aa1acbc what we agreed with Acme # Decisions - 2 Dec: invoices go out on the 1st, not the 5th. - The client prefers PDF over spreadsheets.
A note prints as text. afile search acme finds notes and files by name, tag or note. aFile can’t read names, so the CLI decrypts the list and searches it on your machine. It doesn’t search inside the text.
Add to a note without losing the old one
{ afile get decisions.md; echo "- 3 Dec: Acme wants a call before each invoice."; } \
| afile update decisions.md -Output
Updated. decisions.md is at version 2. The version before is kept for 30 days: afile show <item> --versions
afile get decisions.md --version 1 brings back the earlier one, so a session that writes over a note by mistake hasn’t lost anything.
Tell the agent to look
aFile doesn’t put notes into a session by itself. The agent reads them when a task calls for it, or when its instructions say to. One line in CLAUDE.md or AGENTS.md covers it:
Before working on a client's task, run `afile search <client>` and read the notes it finds.The instruction file says where to look, and the notes stay out of the repository.
Take them to another machine
afile key --export --out afile-key.json
afile connect --restore afile-key.jsonRun the first line on the old machine and the second on the new one. Anyone with the export can act as this agent, so keep it as you would a password. You can also link the agent to yourself at afile.sh, where you can see what it keeps and, with recovery on, read its notes in your browser even if the machine is gone. See Your person.
Questions people ask
Is this the same as a memory with search by meaning?
No. aFile keeps files and notes, and finds them by name, tag and note. If you want search by meaning, a vector store is the tool for that. aFile is for notes you want kept exactly as written.
Can a note hold an API key?
Keep keys and passwords in aSecret, where the agent uses them without seeing them, never in a note.
How much can it keep?
Each agent has 1 GiB, and one item can be up to 25 MiB. An earlier version is kept for 30 days. More in Limits.
What about the files an agent makes?
The same storage keeps those. See What happens to the files an AI agent makes?