Agent Infrastructure / 2025
Memory-Arc
Context that survives the conversation.
I built a Python memory engine with configurable processing modes, persistent retrieval, and asynchronous interfaces.
Public source
Follow the context that persists.
Explore the difference between storing useful context and recalling it for a conversation. Click a step, connection, or trace to inspect it.
Start the walkthrough, or inspect any step before running it.
Simplified from the project architecture. Runs locally; no live models, credentials, or external services.
The engineering
Inside
the decisions.
Preserve useful context without replaying every conversation.
Agents need access to useful prior context without sending an ever-growing conversation back to a model on every request.
01The design decision
+
Separate recent conversation history from persistent vector memory, and make processing behaviour configurable.
02The trade-off
+
AI-assisted processing offers flexibility but introduces a model dependency. Heuristic and disabled modes make that dependency optional for different use cases.
03Separating recent and persistent memory
+
Separated recent thread history from long-term vector memory, with configurable processing when short-term capacity is reached.
04Making processing behavior configurable
+
Implemented AI, heuristic, hybrid, and disabled processing modes, with a registry for model-provider adapters.
05Persisting configuration and memory
+
Added configuration presets, JSON persistence, and asynchronous memory-management interfaces.
↳Memory architecture
+
Memory-Arc · Public explanation of the implementation boundaries.
- Recent historyBounded conversation history is maintained per thread.
- ProcessingAI, heuristic, hybrid, or disabled processing controls what is retained.
- PersistenceConfiguration and thread state use JSON; enabled long-term memory uses vector storage.
- RecallAsynchronous retrieval brings relevant past context back to the application.
↳Why a separate memory layer?
+
The engine separates conversation windows, processing policy, provider adapters, and persistence. That lets applications change memory behavior without embedding those choices in every conversation handler.
Memory manager implementation ↗↳Storage and provider boundaries
+
Qdrant is the provided vector-storage backend. Long-term memory can be disabled, and the manager accepts an injected vector-memory instance. This is not a claim of built-in support for other vector databases.
Provider adapter selection ↗↳Before and after: a remembered decision
+
In the browser example, a fresh conversation cannot recall the deployment decision until it has been saved. Saving then recalling supplies the earlier choice. This illustrates persistence; it does not measure Python retrieval relevance.
↳Validation and maturity
+
Source is available for inspection. Retrieval relevance, stale-memory handling, duplicate suppression, and deletion behavior need a reproducible evaluation before a quality or coverage claim can be made.
Source and setup documentation ↗Public source
Inspect
the work.
A public Python implementation exploring reusable agent memory. The repository exposes the configuration, processing, storage, and adapter layers for inspection and extension.
Next project: Agent evaluation environments ↗Source material
Source repository