Skip to content

Your agents said it.Magpie finds it.

Every prompt, answer and tool call your agents make, stored once and searchable word for word. A library for Rust, Node and Python, or one server that speaks OpenTelemetry.

Example: a search for “refund policy” finds the phrase word for word in the stored prompts, answers and tool calls of agents.
24 h ago hits for “refund policy” all spans · per 10 minnow

Speaks OpenTelemetry.Fits the agent stack you run.

  • OpenTelemetry
  • OpenAI Agents
  • LangGraph
  • Vercel AI SDK
  • Pydantic AI
  • LlamaIndex
  • CrewAI
  • Mastra
  • Claude Agent SDK
  • + any OTel span

Agents repeat themselves.Magpie doesn’t.

Each model call sends the whole chat again: the system prompt, the tool list, every earlier turn. Other stores keep every copy. With pieces on, Magpie keeps each piece once, and later spans point to it.

Storage

up to81%smaller

On a real agent-history data set, where 96% of the text repeats.

real-lmcache: 0.191 of the size with pieces off (F68). With few repeats: 0.65% to 1.55% (F71). Measured in Magpie, one machine.

Pieces, not copies
The system prompt is stored once. Each call keeps short pointers.
Search still sees every word
A hit inside a shared piece shows in every call that used it.

One agent run · 4 model calls

A usual store: each of the 4 calls keeps its own full copy of the system prompt, the tool list and every earlier turn. Size: 100%.

Every step on a timeline.Every word, marked.

The viewer comes with the server. Open a run, see each model call and tool call in order, and read the exact text that went in and came out.

the real viewer · demo data ·magpie-server --dir ./traces→ localhost:4318

The Magpie viewer, a real screenshot on its demo data: one agent run whose tool call failed, its three spans on a timeline, and the model call open with every “refund” in its messages marked yellow.

A failed tool callshows in red, with its args.

execute_tool lookup_order0.70 s

error · lookup_order: timeout after 5000 ms

args {"order_id": "1042"}

Search inside one run.Each hit is marked, in order.

refund3 hits in this span
  • user…twice for order 77. Please refund
  • answer…qualifies for a refund under the 30-day…
  • answerI started it: refund id R-2431.

Small and fast,against 13 engines.

Same data, same machine, each engine with its best settings. Every answer is checked: a wrong answer is a fail, not a time. The harness is in the repo, so you can run it yourself.

STORE SIZE ON DISK · HEAVY DATA SET · SMALLER IS BETTER

EXAMPLE
Magpie1.9 GB
OpenObserve2.9 GB
Quickwit3.4 GB
ParadeDB8.6 GB
Elasticsearch11.8 GB
Made-up numbers until the fair run.bench/run-fair.sh

Ten lines to a search.In the language you write.

Open a folder, write spans, search them. The same store works from Rust, Node and Python. Or send OpenTelemetry to the server and write no code.
app.ts
import { Store } from 'magpiedb'

const store = await Store.open('./traces')
await store.write([
  { traceId: 't1', spanId: 's1', kind: 'agent_run',
    startedAt: Date.now(), input: 'please refund my order' },
])
await store.commit()

// every span that says "refund"
await store.search({ filter: { text: { words: 'refund' } } })
$ node app.ts1 hit

t1/s1agent_runplease refund my order

Your disk. Your data.One folder, no cluster.

Apache-2.0
Open source. No account, no sign-up.
Crash-safe writes
Tested by killing the process in the middle of a write.
Masked on write
Set a mask policy, and private data is masked before it reaches the disk.
Safe upgrades
A store refuses a version it cannot read.

agent-traces/

  • store.jsonthe version door
  • wal/every accepted write lands here first
  • meta.json, *.idxwords, positions, sums
  • traces/one row per trace

Close the store and copy the folder: that is a full backup. Or let the server keep it in S3.

magpie-server --s3

Embed the library

npm i magpiedb

Magpie runs inside your app. No server, no network hop. Good for one service, a test suite or a laptop.

Run the server

magpie-server --dir ./traces

One binary takes OpenTelemetry over HTTP and gRPC, and serves the query API and the viewer. Good for a team.

Give your agentsa memory you cansearch.

Free and open source. Install it in a minute, or start the server and point your OpenTelemetry at it.