Open source · MCP memory server · named after a French tale

One memory for every agent you switch between.

Leaves pebbles so your coding agents find their way back.

Your rules, decisions and verified facts live in a Markdown folder you own. Claude Code, Copilot, Codex, Cursor and the others start every session with them, on every machine you pair. Switch agents, and none of them starts from zero.

The tale

Lost in the forest at night, Le Petit Poucet follows the white pebbles he dropped on the way. They shine in the moonlight, and lead him home.

a pebble

One fact, one line

A rule, a decision or a verified fact, saved on purpose with where it came from.

the path

The Index

Every session starts with the line of pebbles that apply here: your preferences, this repo's notes.

home

Your own way of working

Whichever agent wakes up, on whichever machine, it finds its way back to how you work.

01 / the problem

Your agents forget, each in its own way.

every session

Starts from zero

You explain your commit rules, the database quirk and the deploy steps again, to a new session that never heard them.

every tool

Keeps its own memory

What Claude Code learned stays in Claude Code. Switch to Codex, Copilot or Cursor and you teach it all over again, in another format, in another place.

every machine

Knows something else

The laptop, the desktop and the home server each grew their own memory. None of them has the whole picture.

02 / what makes it different

Memory that follows you, not one tool.

Built-in memories are tied to one agent. A memory server on its own waits for the model to decide to call it. petit-poucet is wired into each agent, so the memory is already there when the session starts.

01

One vault, every agent

Claude Code, Copilot, Codex, Cursor, Antigravity CLI, OpenCode, omp and Hermes Agent read and write the same notes. A rule you gave one of them, the others follow.

02

Loaded, not just available

A session-start hook hands the agent your rules and the Index before your first message: there's no tool call for the model to forget.

03

Your agent sets it up

Paste one line, and your agent installs it, runs setup, checks it, and tells you what to restart. Later, petit-poucet update keeps it current.

04

On all your machines

petit-poucet sync pairs your machines through Syncthing, peer to peer and without a cloud. A project is found by its git remote, wherever it's checked out.

03 / how it works

A short Index at the start, the details on demand.

Like the pebbles of the tale: your agent sees one line per fact, and picks up the full note only when a task needs it.

  • Session starts. A hook gives the agent the memory rules and the Index of what applies here: your preferences and this repo's notes.
  • Agent works. It opens only the notes the task needs, and searches the rest, including topics tied to no repo.
  • Agent learns. A decision, a correction or a verified fact is saved on purpose, with where it came from, and committed to git.
  • Memory stays clean. Checks catch duplicates, stale facts and unused notes; a cleanup review proposes fixes you confirm.
🪨 petit-poucet · 20 notes loaded (preferences + chargepath-api)

## Preferences (all repos)
- [[Preferences/commit-rules]] — commit locally per step, never push
- [[Preferences/never-read-secrets]] — pipe secret values, never print them

## Projects / chargepath-api
- [[Projects/chargepath-api/prod-db-no-postgis]] — spatial queries must work without PostGIS

Topics (searched on demand): homelab (8), work-mac (3)

● memory_save  saved Projects/chargepath-api/deploy-needs-vpn

04 / several machines

The laptop, the desktop, the home server: one memory.

petit-poucet sets up the Syncthing you install, and stays safe while it changes files: notes that arrive are committed at the next session start, and a conflict is merged by your agent, with you.

# on the first machine
$ petit-poucet sync
on another machine, run: petit-poucet sync AAAAAAA-…

# on the second
$ petit-poucet sync AAAAAAA-…
paired with AAAAAAA: run the command below on it too
on another machine, run: petit-poucet sync BBBBBBB-…

# back on the first
$ petit-poucet sync BBBBBBB-…
syncing with: BBBBBBB (connected)
  • Peer to peer, encrypted. No cloud, no account; each machine names the other, so nobody joins without a command on both.
  • Projects match anywhere. A repo is recognised by its git remote, so ~/work/shop here and ~/src/acme-shop there share their notes.
  • History stays local. Each machine keeps its own git history and records what arrived.
  • Conflicts are merged, not lost. When two machines change a note at once, your agent is told and merges it with you.

Step by step: several machines.

05 / compared with built-in memory

What petit-poucet adds to your agent's own memory.

Claude Code, Copilot and Codex now remember things on their own, and that's useful. They differ in where the memory lives, who can read it, and how much say you have in it.

Claude Code auto memoryGitHub Copilot MemoryCodex memoriespetit-poucet
Where it livesMarkdown in ~/.claude/projects/<repo>/memory/, on this machineStored by GitHub (in VS Code: local memory files)Generated files in ~/.codex/memories/A folder you choose, plain Markdown, Obsidian-compatible, on every machine you pair
Other agentsClaude Code onlyCopilot onlyCodex onlyClaude Code, Copilot, Codex, Cursor, Antigravity CLI, OpenCode, omp, Hermes Agent, any MCP client
ScopeOne repo; rules for all repos go in CLAUDE.md, by handOne repoGlobalPreferences for every repo, notes per repo (matched by git remote), and topics tied to no repo
How notes are madeClaude decides what to saveThe agent saves while workingSummarised in the background from past chatsSaved on purpose, one fact per note, each with its source
Your sayEdit the files yourselfReview and delete in repository settingsDocs advise against editing them by handRules you stated change only with your confirmation; your edits are never overwritten
HistoryLast-modified timeNo version historyNo version historyA git commit for every change: diff, revert, blame
LifetimeUntil edited; only the first 200 lines of the index loadUnused memories expire after 28 daysOff by default; managed by CodexUntil you or a confirmed cleanup removes it

From each vendor's documentation, October 2026: Claude Code memory, Copilot Memory, memory in VS Code, Codex memories. These features change often: check the links for the current behaviour. Already have built-in memory? The migrate-memory skill moves it in, one confirmed fact at a time, and leaves the old files untouched.

06 / what you get

Small, plain, and on your side.

plain markdown

A folder you can read

Short notes you can read and edit in Obsidian or any editor. No database, no cloud, nothing pushed anywhere.

curated

Saved on purpose

Agents save a decision, a correction or a verified fact, with its source. Nothing is scraped from transcripts.

enforced in code

Rules that hold

Note format, sources and the Index are checked by the server. Secrets are refused. Your stated rules need your OK to change.

git

Every change committed

A local commit after each change: inspect or undo any agent edit. Several agents at once never clobber each other.

tidy

Keeps itself clean

The tidy-memory skill has a read-only agent propose merges, fixes and deletions. You confirm, it applies.

one binary

Nothing to run

A Rust MCP server and its hooks, for macOS, Linux and Windows. No runtime, no service; it tells you when a release is out.

07 / install

Paste one line into your agent.

Claude Code, Codex, Copilot or any agent with a shell. The guide tells it what to run, how to check it worked, and what to tell you. It also updates an older install.

macOS or Linux

curl -fsSL https://raw.githubusercontent.com/areguig/petit-poucet/main/install.sh | sh
petit-poucet setup

Windows · PowerShell

irm https://raw.githubusercontent.com/areguig/petit-poucet/main/install.ps1 | iex
petit-poucet setup

The script installs the binary in ~/.local/bin after checking its checksum, and prints the full path to use when that folder isn't on your PATH yet. setup creates your vault in ~/agent-memory and wires every agent it finds, keeping a backup of each file it changes. Needs git. To update: petit-poucet update.

08 / questions

Good to know.

Is it safe to let my agent install it?

The guide keeps it to the install script, setup and its check: no sudo, nothing outside your home folder, no hand edits to your agents' config, and it asks you before setting your git identity. The script checks the binary's SHA-256 before installing it. Read the guide first: it's short.

How do I update?

Run petit-poucet update, or ask your agent to: once a day, session start checks for a new release in the background and tells you when one is out. It checks the download, replaces the binary and runs setup again. Before 0.6, run the install script again.

Does my memory leave my machine?

petit-poucet sends none of it anywhere: the vault is a local folder and a local git repository, never pushed. If you pair your own machines with petit-poucet sync, Syncthing copies the vault between them, peer to peer and encrypted. Its only network call is a daily look at the latest release on GitHub (PETIT_POUCET_NO_UPDATE_CHECK=1 turns it off). Like any file your agent reads, the Index and the notes it opens become part of the conversation with its model.

Can I keep some notes off a machine?

Yes: Syncthing never syncs .stignore, so each machine can leave out folders, such as work projects on a home server. Several machines shows how.

Do I need Obsidian?

No. Obsidian is a nice way to browse and edit the vault, but petit-poucet doesn't need it running. Your edits are picked up on the next tool call.

What stops an agent from saving nonsense, or a secret?

Every note needs a type, a one-line summary and a source; tokens, keys and passwords are refused; a near-duplicate is reported so the agent updates the existing note. Rules you stated can't be changed without your confirmation.

What does setup change on my machine?

Only petit-poucet's own entries in each agent's user-level config (MCP server, hooks, skills, the memory-cleanup subagent), with a .petit-poucet.bak copy of each file it changed. petit-poucet setup --uninstall takes them out again and keeps your vault.

My agent isn't supported yet

Any MCP client can already use the tools: point it at petit-poucet serve. For hooks and skills in yours, open an issue: the votes decide what comes first.

Can my team share one memory?

Not by design: each person keeps their own vault. Knowledge the whole team needs belongs in the repository, in AGENTS.md or CLAUDE.md.

Stop teaching your agents the same thing twice.