eidolon
Memory for AI agents: conversations split into topics, kept as fragments and found again by meaning, people and time.
- status
- phase 1 complete, phase 2 in progress; 1100+ tests
- language
- Python 3.12; SQLite or Postgres with pgvector
- license
- MIT
The problem
At its core any conversation with an AI is stateless. The model does not remember who you are or what you talked about seconds ago. To even know about the ongoing conversation, the whole message history has to be sent again, filling up the context window of the model. And like with a human, not only is the context window of any model finite, its attention is limited too.
There are multiple challenges in building an agentic memory:
- It must be decided which memories are worth keeping.
- Memories have to be saved in a way they can be searched and found.
- When a message is sent to the model, memories must be chosen that should be given along with the request.
The field
These problems are well known and have been tackled in many different ways: from simple conversation summaries to complex memory providers. But the pattern used for agent harnesses like Hermes Agent, OpenClaw or even DeepSeek Harness is strikingly similar:
- A user message is prepared to be sent and given by the harness to the memory provider.
- The memory provider searches for relevant information and returns it to the harness.
- The harness sends the message together with the information from the memory provider to the AI model.
- The model's answer is given to the memory provider, together with its original user request. The memory provider then analyzes the whole turn and decides what information it wants to save for later use.
The idea behind eidolon
Eidolon wants to mimic human memories. Therefore, it segments conversations into topics, extracts the essence of each instead of the transcript, and finds related memories again by meaning, tags, people and time. Memory in eidolon has three layers:
- Facts: a small, curated profile of durable facts about a person: name, location, relationships, work, stable preferences.
- Topics: episodic conversation segments with summaries, tags and embeddings.
- Memory items: fragments extracted from topics (an essence, a fact, a surprise, a feeling) with who said or felt it.
Each turn runs through a short pipeline. Only topic detection and retrieval happen before the agent answers; everything else runs after it:
user message
before the answer
1. topic detection
CONTINUE or NEW_TOPIC:<label>
2. embedding + retrieval
facts, related topics, fragments
3. the agent answers
with that memory in its context
after the answer
4. extraction
essence, facts, surprises, feelings
5. on topic close
summary, tags, recurring-topic clusters
6. every N turns
facts consolidationThe agent also gets four tools: search its memory, look inside a past topic or a recurring-topic cluster, and correct one fact when the user says it is wrong. A read-only dashboard shows each turn's request again, browses topics, facts, fragments and clusters, and reports on retrieval quality and topic lifecycle.
About its internal architecture
Core and adapter are separate
The core library is standalone and stateless; storage, the language model and the embedder are swappable through configuration. The first adapter plugs eidolon into Hermes Agent as its memory provider, and the core runs either in-process or as its own HTTP service, so another platform only needs a thin client. The core never imports an adapter, only the other way round.
Facts are reconciled, not appended
Every fact-shaped statement is stored and searchable, but the profile itself is updated in a periodic pass: every 20 turns, the model sees the whole current profile plus what was learned since, and answers with a diff, only what changed:
{
"upserts": [
{
"category": "work",
"key": "employer",
"value": "Acme Corp",
"importance": "high"
}
],
"deletes": [
{ "category": "routine", "key": "old_gym" }
]
}Seeing the whole profile lets it update an existing entry instead of adding a duplicate, and a checkpoint makes sure a failed pass is retried rather than losing facts.
Reliability decided the storage
SQLite is the default and fine for trying it out. Postgres with pgvector was planned for scale, but shipped for reliability: SQLite's file locking did not hold up over a Docker Desktop bind mount, which cost a real deployment a corrupted write-ahead log within a few days. Postgres doesn't have that failure class, and its native vector index replaced two search paths with one. Before that, an optional sqlite-vec index made retrieval roughly 56 times faster at 60,000 items, with the same quality scores on the eval harness.
Status
Phase 1 is complete: the core library, providers, configuration, a standalone CLI, the Hermes adapter, debug tracing and facts consolidation. Phase 2 is in progress, with an eval harness that runs scripted conversations against real models, recurring-topic clustering, the Postgres backend, the HTTP service and the dashboard done; topic detection and fact consolidation are being reviewed. Phase 3 plans a mode that runs beside another memory provider, an adapter for another agent platform, and production deployment guidance.