Give your coding agents a memory
Every agent session starts from zero. Claude Code, Codex, Cursor — none of them know what was run on this machine before, so they burn time and tokens rediscovering commands you already have. Atuin records every command, yours and theirs, to a local encrypted database, and syncs it between your machines. Agents search it instead of guessing.
$curl --proto '=https' --tlsv1.2
-LsSf https://setup.atuin.sh | sh
Last updated
The history is already there. Let them use it.
Agents run commands through your shell. Atuin is in your shell, recording. That's the whole trick: agents write to your history as they work, and can read years of it back.
-
01
Agent commands are recorded
Anything an agent runs is captured like your own commands, with exit code, working directory, duration, and hostname. Each record notes who ran it, so “what did I do” and “what did the agent do” stay separate questions.
-
02
Search that answers agent questions
An agent wondering how this project gets deployed runs atuin search --cwd . --exit 0 deploy and gets its answer: commands that worked, in this directory, newest first. The alternative is grepping a truncated history file with no exit codes. Agents do that badly, because there's nothing there.
-
03
One history, every machine, every agent
History syncs end-to-end encrypted between your machines. What one agent figured out on your desktop, another can find from your laptop. The server only ever stores ciphertext.
An agent with Atuin, and one without
Shell history files were never built for this. They truncate, they skip agent commands, and they don't remember whether anything worked.
| With Atuin | Shell defaults | |
|---|---|---|
| What the agent can search | ✓Every command ever run, on every machine | —The tail of one machine's history file |
| Context per command | ✓Exit code, directory, duration, host, author | —The command text, maybe a timestamp |
| Failed vs successful |
✓Filter to what
worked
(--exit 0)
|
—No way to tell |
| Cross-machine | ✓Synced, encrypted | —None |
| Agent-run commands | ✓Recorded alongside yours | —Often never hit the history file at all |
Set up once, works for every agent
Agents won't look for history unless you point them at it. A few lines in the agent's context file is enough — see the Claude Code setup, or the docs for everything else.
-
01
Install Atuin
$curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh -
02
Import your history and turn on sync
$atuin setup -
03
Tell your agent it exists
Or give it history search as a native tool via
MCP.
$claude mcp add atuin -- atuin mcp
The installer turns on hooks for Claude Code, Codex, OpenCode,
and pi when it finds them. Already using Atuin? Run
atuin hook install claude-code
(or codex, opencode,
pi).
Frequently asked questions
How do agents actually query Atuin?
Most simply: they have a shell, and
atuin search is a command. Telling the agent
it exists (in CLAUDE.md, AGENTS.md, or whatever your tool
reads) is enough. For a structured integration, the
MCP server
exposes history search as a tool the agent calls directly.
Which agents does this work with?
Any agent that runs commands through a shell. Claude Code, Codex, Cursor, OpenCode — Atuin doesn't know or care which one is asking. If your agent can run a command, it can search your history. Dedicated hooks, which tag who ran the command, are installed automatically for Claude Code, Codex, OpenCode, and pi when the Atuin installer finds them.
Can I tell agent commands apart from my own?
Yes. Every record notes its author. Interactive search
hides agent-run commands by default, so your ctrl-r doesn't
fill up with an agent's forty attempts at a build command,
and an agent can ask what you did, specifically,
with atuin search --author.
Is my history sent to an AI provider?
No. It's a SQLite database on your machine, and sync is end-to-end encrypted — the server stores ciphertext it cannot read. History only reaches a model if an agent you're running queries it, on your machine, in your session.
Can I stop agents being recorded, or recorded commands being seen?
Yes to both. Agent-run commands are hidden from ctrl-r by
default. To stop recording them, remove the Atuin hooks
from the
agent's config. To keep matching commands out of the database entirely,
add patterns to
history_filter.
Does Atuin sync full agent sessions between machines?
Not yet. Today it's the commands agents run that are recorded and synced, not the whole conversation. Syncing complete agent sessions across machines is in development — the blog will have it first.
Won't agents make my history huge?
They will, and that's fine. History lives in an indexed local database that handles millions of records — agents hammering it is what pushed us to make search that fast. No caps, no truncation.