firefly v0.5.0

An animated map of an example memory. A light finds its way from core, down a path of folders, to the one memory a task needs, leaving the rest of the memory dark.

One memory, across every session and every agent.

firefly is persistent memory for AI agents. What an agent learns in one session is still there in the next, and what one agent saves, every other agent can find. Each task reads only the few memories it needs, so memory can grow as large and detailed as you like.

Click any memory to light the path to it.

How it works.

Agents forget when a session ends, and one agent cannot see what another learned. firefly keeps memory outside the agent, in one place that every session and every agent you connect reads from and saves to.

Each firefly is an independent memory carrier. It can serve many agents at once, or carry one agent's memory from session to session. When an agent connects, the firefly sends it core: how to use firefly, and the standing rules and facts it holds. Everything else is a tree of folders, each with its own short memory saying what it holds. The agent asks for what it needs in a few words, and firefly searches the tree a layer at a time and sends back the one memory or folder that fits best, so each task reads a few short files however large the memory grows.

As the memory grows, the agent reviews it from time to time and groups memories that belong together into folders, so there is always a clear path to follow.

You can do everything the agent can. Click a memory on the map to read it, edit it, move it, or delete it. Deleted memories go to a trash folder, not into thin air, and the last 5 changes can be rewound.

~/.firefly/
├── memory/
│   ├── CORE.md         standing rules and facts; sent on connect
│   └── peripheral/     everything else, one topic per file
│       ├── peripheral.md  what is here
│       ├── example_folder/
│       │   ├── example_folder.md  the folder's own memory
│       │   └── example_memory.md
│       └── example_memory.md
├── activity-log.md     everything that has happened
├── trash/              deleted memories, kept just in case
├── rewind/             the last 5 changes, ready to take back
└── fireflies/          any further fireflies you add

See every path.

Each memory the agent reads lights up on a live map, with the path it took. Every save, change and delete is listed in an activity log, with the agent that made it. Click any memory to read, edit, move or delete it.

The firefly map in a browser. Memories appear as dots joined by lines. A trail of amber dots runs from the top of the memory to three memories, and an activity log lists each read.
  • It stays on your computer

    No account, no cloud, no API key. Memory is plain markdown files you can open, edit and back up.

  • It works with any agent

    firefly speaks MCP. Connect any agent on your computer with one address, and they all share one memory: what Claude Code saves, Codex can find. When an agent should keep its own, add another firefly beside it.

Install.

You need Node.js 20 or newer. Everything runs on your own machine.

  1. Get firefly

    npm install -g firefly-memory

    To install it in one folder only, use npm i firefly-memory and start it there with npx firefly.

  2. Start it

    firefly creates its memory folder and opens the map in your browser. Leave the window open while you work.

    firefly

    Everything is controlled from that page, http://localhost:7077: read, edit, move and delete memories, watch what each agent does, connect agents, and add or delete fireflies.

  3. Connect your agent

    Add firefly to your agent as an MCP server of type HTTP at this address, then start a new session.

    http://localhost:7077/mcp/firefly
  4. Talk to your agent as usual

    Tell it something worth keeping, such as “remember that we deploy every Friday”, and watch the map. To update later, run npm update -g firefly-memory; your memories are never touched.

  5. Learn the rest

    For everything else, such as giving each agent its own memory, read the documentation.