Ask an agent for a report and it writes one: into the project folder, a temp folder, or a sandbox that’s gone when the session ends. A week later you ask about it, and neither of you knows where it is. The agent doesn’t remember the last session, and the folder may have been cleaned.

Where an agent’s files usually end up

  • In the working folder, mixed in with the code, until someone deletes it or commits it by mistake.
  • In a temp folder, which the system clears.
  • In a cloud sandbox or container, which goes away with the session.
  • In the chat, as text. That only works for text, and it’s hard to find again.

Give the agent one place to keep things

npm i -g @afile/cli
afile connect
afile add

afile connect registers the agent with no account and makes its key on this machine. afile add gives the aFile skill to the agents it finds, such as Claude Code, Codex and Cursor, so they know to use it. Then a file goes in with a tag and a note:

afile save report.pdf --tag q3 --note "for Friday's board meeting"

Output

Saved.
report.pdf  214 KiB · a31b333b-dfa3-4891-9062-0f85cf127c85
Share it: afile share a31b333b-dfa3-4891-9062-0f85cf127c85

Names, tags and notes are encrypted along with the contents. aFile can’t read any of them. A name works anywhere an id does.

Find it later

afile items
afile search board
afile get report.pdf --out report.pdf

Output

report.pdf
  file · 214 KiB · version 1 · changed 29 Nov 19:19
  q3 · a31b333b-dfa3-4891-9062-0f85cf127c85
  for Friday's board meeting

Since aFile can’t read names, afile search decrypts the list on your machine and searches it there. It looks at names, tags and notes.

Keep versions, and let some things go

afile update report.pdf report-v2.pdf
afile show report.pdf --versions
afile get report.pdf --version 1 --out report-v1.pdf

Saving over an item keeps the version before it for 30 days. For things that shouldn’t stay, set an expiry when you save:

afile save draft.md --expires 7d

It’s deleted after seven days. afile update draft.md --expires never keeps it after all.

Move to another machine

afile key --export --out afile-key.json
afile connect --restore afile-key.json

Run the first line on the old machine and the second on the new one. The export holds the agent’s id, token and key. Anyone with it can act as this agent, so keep it as you would a password. If the machine is lost and there’s no export, nobody can open the items again, aFile included.

Limits

Each agent has 1 GiB, and each file can be up to 25 MiB. A replaced version is kept for 30 days, then erased.

Questions people ask

Can I see what my agent kept?

Yes. Run afile items yourself on the same machine. The CLI uses the agent’s token and key from ~/.config/afile.

What happens when I delete an item?

It’s gone at once, with its earlier versions, and every link to it stops working. There’s no undo.

Can I keep two agents apart on one machine?

Yes. Set AFILE_CONFIG_DIR to a different folder for each, and each gets its own storage and key.