Go further
Agent memory
How agents in Arakun remember what they learned about a project and about you, and how to read, search or turn off that memory.
On this page
Agents save what they learn with arakun mem: a decision, a trap in the build, the fix for a bug, how you want things done. Every new session starts with an index of it in the system prompt, so the next agent knows it without being told again.
#What it remembers
- About the project. One store per repository. Git worktrees share the store of their main checkout, so every environment of a project sees the same memory.
- About you. A global store for preferences you state to an agent, such as how you want commit messages written. It applies in every project.
- What each session did. Arakun records this itself: what was asked, how each turn ended, the commits and the files changed. Agents don't have to write summaries. It keeps the last 30 sessions of each project.
Agents give each memory a kind: decision, bugfix, gotcha, convention, preference, discovery, pattern, config or note. Arakun's own records of sessions have the kind session.
#The Memory tab
Turn the tab on first, in Settings › Tabs.
The Memory tab shows what agents remember about the project in view, and under About you, in every project what applies everywhere. Search it, open a memory's file in your editor, or delete one (click the bin twice). The tab updates as agents write.
Memory is also in the palette (Ctrl+K), in the same search as everything else.
#From a terminal
arakun mem search <words> # find memories here and about you
arakun mem get <id> # the full text (12 is this project's, g3 a global one)
arakun mem list [--global] # everything saved, newest first
arakun mem context # the index new sessions start with
arakun mem forget <id> # delete
arakun mem save <title> --kind gotcha --body <text> # save one yourself; it refuses a secretThese work with the app closed, so headless agents use memory too. For an agent that Arakun does not start, arakun mem prompt prints the how-to and the index to put in its prompt.
#Scripts worth keeping
Agents often write the same helper script again in session after session: one that runs the checks, or one that reads a pull request's reviews. arakun mem scripts finds them in the project's saved sessions:
arakun mem scripts # scripts seen in 3 or more sessions of the last 30 days
arakun mem scripts --min 2 --days 60 -n 10It groups scripts by the words they use, since agents rarely write one the same way twice, and shows the five seen most often. It only reports and changes nothing. Keep the ones you like as a script of the project, or save them as a pattern memory.
#Where it is kept
Plain JSON files: global.json, and one file per repository in projects/. They are in ~/.local/share/arakun/memory, or %LOCALAPPDATA%\arakun\memory on Windows. ARAKUN_MEMORY_DIR puts them somewhere else.
If Arakun can't read a store, say one written by a newer version or edited by hand, it renames it to <name>.corrupt-<time> and starts that store fresh, with a notice that says so. To restore it, quit Arakun, keep a second copy of the file, rename it back, and start a version that can read it.
#Turn it off
Turn off Memory in Settings › General › Agents. New sessions then start without the index, and Arakun stops recording sessions. What is already saved stays on disk, and the Memory tab still shows it. Turning off Notes to agents there leaves memory out of prompts too.
ARAKUN_MEMORY=off does the same for one run, whatever the switch says. ARAKUN_MEMORY=on keeps memory in prompts even with Notes to agents off. While a variable decides, the row says so and doesn't change.
Did this page help?
Tell us about a mistake on this page, or ask for help with Arakun.