The pillar guide
Event Sourcing for AI Agents
Agents forget. A chat window scrolls past, a process restarts, and the context is gone. Event sourcing fixes that at the storage layer: every accepted decision, observation, and message becomes an immutable event you can replay, inspect by timestamp, and use to rebuild current context.
Quick answers
- What is event-sourced agent memory?
- Event-sourced agent memory stores each accepted observation, decision, and state change as an ordered event. Current memory is derived from that history instead of overwriting the only copy.
- Does AllSource memory survive a process restart?
- AllSource Core recovers accepted event history from its write-ahead log and Parquet persistence after restart. Configurable fsync controls the durability and throughput trade-off.
- Does AllSource require PostgreSQL?
- No. AllSource Core is the database: WAL and Parquet persist events and event-sourced system metadata, while concurrent in-memory indexes and service caches are rebuilt from Core. Current AllSource services require no PostgreSQL instance.
- Does AllSource replace a vector database?
- Core supplies durable ordered history, replay, and provenance. AllSource Prime adds vector, graph, compressed-index, and temporal recall derived from Core events.
- When should I not use event-sourced agent memory?
- Use simpler current-state storage when you do not need replay, provenance, audit history, or point-in-time reconstruction. Event sourcing adds event modelling and projection work.
What event sourcing gives an agent
Instead of overwriting state, you append events. The current state is a projection you derive from the log. AllSource Core recovers accepted event history after restarts from a Rust write-ahead log (CRC32 checksums, configurable fsync) and columnar Parquet. In-memory projections measured 11.9μs p99 reads in the published reference benchmark; the separate ingestion benchmark measured 469K events/sec.
- Durable memory — accepted event history is recovered from WAL and Parquet after restart; configurable fsync sets the write durability policy.
- Full provenance — replay the log to reconstruct exactly what the agent knew and when.
- Time-travel queries — ask for any entity’s state as_of a past moment, first-class.
- MCP access — 55 tenant-scoped tools by default, rising to 73 when fleet and administrative controls are enabled.
How AllSource compares
Evaluating a managed memory layer? Here’s how a durable event store stacks up against the popular agent-memory tools.
Go deeper
Every AllSource deep-dive, grouped by theme. New posts surface here automatically.
Engineering
How the durable event store is built — WAL, Parquet, recall, and the Rust core.
- Agent memory security: prevent poisoning and cross-tenant recallA concrete threat model for durable agent memory: scoped writers, provenance, tenant isolation, correction events, bounded recall, and audit evidence.
- Rust event store guide: durability, replay, and readsA code-first map of AllSource Core: where accepted events become durable, how recovery rebuilds indexes, what benchmarks measure, and when an event store is the wrong model.
- Reconstructing Agent Memory in Rust: Events, Provenance, and Point-in-Time StateBuild durable AI-agent memory as an append-only event stream in Rust, derive current state without destroying history, and reconstruct exactly what an agent knew before a decision.
- AllSource vs stoolap: An Embedded SQL Database Meets an Event Storestoolap is an embedded relational SQL database in pure Rust; AllSource is an immutable event store and agent-memory service. They overlap on AI features but solve different problems. The honest, reproducible comparison — including a benchmark you can run yourself.
- How to reproduce AllSource's 469K events/sec benchmarkA claimed throughput number is worth nothing if you can't run it. Here's the exact command, what each benchmark measures, how to read the output, and the honest caveats — so you can verify AllSource's ingestion throughput on your own hardware in a couple of minutes.
- Building an AI-native event store in RustWhy we built AllSource — a durable event store in Rust with a native MCP interface and a built-in agent-memory engine — how the WAL + Parquet + DashMap design works, and a benchmark harness you can run yourself.
- Quantized Index vs Durable Memory: turbovec and AllSource Primeturbovec compresses vectors 8–16× with no recall tax. AllSource Prime makes vector memory durable, graph-aware, and replayable. They aren't rivals — they own different layers of the same stack, and they compose. Here's the whole stack, drawn out, with the use cases for each and for both together.
- Prime Stopped Being a DatabaseOur hosted agent-memory engine used to run its own store. We made it stateless — it now reads and writes Core over HTTP, isolated per tenant, with no durable storage of its own. Here's the architecture, the load-bearing trick, and the bug we caught in production.
- Why Your Agent's Memory Returned Nothing — and How We Fixed Hybrid RecallAllSource Prime's compressed index reported zero nodes for everything you recorded, and prime_context's L2 tier returned no vectors. Three bugs, one event-sourcing lesson: a projection that isn't fed is a projection that lies. Here's the debugging story, the fix, and the real before/after numbers from the binary.
- Write Before You Execute: Building Crash-Safe AI AgentsAn agent that crashes mid-task and then re-runs can send the same email twice, create duplicate orders, or push the same commit twice. Here's a single pattern that prevents all of it.
- How AllSource Core Works: WAL, Parquet, and DashMapA deep-dive into AllSource Core's storage architecture: CRC32-checked WAL recovery, configurable fsync, Parquet persistence, and concurrent in-memory reads.
- Connecting to AllSource without an SDKHow to ingest, query, stream, and build projections against AllSource using only HTTP and WebSockets — no SDK required. For teams on unsupported languages or anyone who wants to understand the wire protocol.
- Direct to Core, or through the gateway? Choosing your connection pathAllSource has one public front door (api.all-source.xyz) and one internal fast path (Core, reachable only inside your network). Picking the right one cuts your p99 in half — picking the wrong one either reimplements rate limits or exposes your event store to the internet.
- What AllSource's 11.9μs Benchmark MeasuresThe published 11.9μs p99 result measures AllSource Core indexed reads—not end-to-end agent-memory recall. Here is the data path, scope, and how to evaluate Prime separately.
- Building Agent Memory in Rust: From Event Store to Knowledge GraphHow we built a unified agent memory engine — vectors + graph + compressed index — on top of an event store. Architecture decisions, SOLID refactoring, and why Rust was the right choice.
- How a Compressed Index Doubles Cross-Domain RecallVector similarity finds X or Y — rarely both. A 500-token markdown index bridges the gap. Here's why, with benchmark data.
- Time-Travel Queries ExplainedHow to reconstruct any entity's state at any point in time with all.source.
Use Cases
Patterns for putting event-sourced memory to work in real agent systems.
- MCP memory server guide: durable tools for cross-session agentsSeparate event-store tools from Prime memory tools, choose local or hosted transport, scope credentials, and verify provenance before an agent relies on recalled context.
- Using AllSource as a CMS from Claude DesktopAn agent-executable install protocol for AllSource Prime, plus the working pitch: your CMS already lives where your agents work. Written so a Claude Desktop agent can read this article on a human's behalf and drive the install with a bounded, two-action human role.
- An Agent That Provisions Its Own Persistence in One API CallYour agent doesn't need a dashboard session to set up storage. One POST creates a trial tenant and API key for immediate event writes.
- How Agent Teams Stay in Sync with a Shared Event StreamWhen multiple AI agents work on the same problem, they need a shared world model — not direct calls to each other. Here's how to build it with AllSource and chronis.
- AllSource for Startups: From Local Dev to Production in 15 MinutesThe fastest path from zero to event sourcing for startups and side projects. Self-service onboard, a 14-day trial, no infrastructure to manage. Move to production when you're ready — not before.
- Real-Time Dashboards Without ETL: Event Sourcing + ProjectionsHow projections replace traditional ETL pipelines for real-time dashboards. AllSource event sourcing keeps materialized views in sync as events arrive — no Kafka, no Airflow, no batch jobs.
- Why Your SaaS Needs Event Sourcing (Not Just a Database)The business case for event sourcing in multi-tenant SaaS. Audit trails, tenant isolation, usage billing, and feature flags — all as a natural consequence of storing events instead of state.
- How to Build Audit Trails That Pass SOC2 with Event SourcingA practical guide to building SOC2-compliant audit trails using AllSource event sourcing. Immutable event logs, time-travel queries, and cryptographic integrity — without the compliance tax.
- Event Sourcing for AI Agent Memory: A Practical GuideHow to use AllSource as durable, time-travelling memory for LLM agents. Store conversations, decisions, and context as events. Query any past state. Give agents memory that survives restarts.
- Tiered Context Loading: Cut Agent Memory Costs by 60% Without Losing RecallMost agent turns don't need full recall. L0/L1/L2 tiers let agent loops fetch exactly the context depth they need — from 100-token stats to full hybrid retrieval — reducing token costs while keeping accuracy where it matters.
- Why Event Sourcing in 2026: Beyond Simple StorageEvent sourcing preserves ordered history for replay, provenance, and point-in-time reconstruction. Here's when that model earns its complexity.
- Your AI Agents Need Memory, Not Just StorageAI agents are getting smarter, but they still can't remember yesterday. Here's why temporal context is the missing piece in agentic AI.
- Event Store vs Database: Choosing the Right FoundationDatabases store state. Event stores store history. Here's how to decide which foundation your application actually needs.
- Temporal AI: Why Your RAG Pipeline Needs a TimelineVector search finds similar content. Event sourcing tracks history. Combined, they create AI that truly understands context.
- AI Agents with MCP ToolsHow to let Claude and other AI agents manage your event streams autonomously.
Product
Product updates, releases, and the story behind AllSource and Prime.
- AllSource Core, Query Service, Prime, Hosted, and MCP ExplainedCore stores events. Query Service separates reads. Prime derives agent memory. Hosted AllSource operates services. MCP connectors expose tools.
- AllSource architecture explained: Core, Query Service, Prime, and MCPA component-level explanation of AllSource Core, Query Service, Prime, hosted operations, and separate MCP connectors, with their storage and responsibility boundaries.
- Your Voice File Shouldn't Be a Dead Markdown FileThe viral 'voice file' is right: in 2026 your identity layer is the moat, not your prompts. But a static 4k-token markdown blob goes stale, can't be queried, and has no history. prime makes your voice live — record facets once, recall the relevant slice by meaning per task. Proven with a real voice-ON vs voice-OFF demo.
- chronis 0.8.0: the web viewer grows upchronis 0.8.0 turns `cn serve` from a read-only list into a real workspace viewer — sortable dashboard columns, an expand-in-place detail pane with two-way dependencies, a force-directed bubble graph, and a cleaned-up tree. All offline, all served from one Rust binary.
- Your Coding Agent Has Goldfish Memory. Give It a Mammoth.mammoth gives any coding agent durable, cross-session memory — decisions, task history, and code context recalled automatically, so you stop re-explaining your project. Local-first, zero signup, MCP-native. Here's how it works and what the benchmarks say.
- Prime 0.21.4: text-only embeds, sync, and a Memory tabThree shipping changes for AllSource Prime — prime_embed and prime_recall take plain text, prime-mcp can push events to your tenant Core, and the panel grew a Memory tab to show them. Install in 30 seconds.
- From zer0dex to AllSource: What We LearnedWe analyzed zer0dex's dual-layer memory system, found the insight that matters, and built on it. Here's what we kept, what we changed, and why.
- zer0dex vs AllSource: What Agent Memory Actually Needszer0dex proved that a compressed index doubles cross-domain recall. We took that idea, made it automatic, and added temporal reasoning. Here's the honest comparison.
- Introducing AllSource Event StoreThe original AllSource launch: a Rust event store for immutable history, replay, projections, and agent tools. Updated with current product boundaries.
Give your agents memory that survives
Start on the hosted Indie plan, or self-host the whole stack for free under Apache-2.0.
