Memory
Honi provides four tiers of memory, each backed by a different Cloudflare primitive. Use one, two, or all four depending on your agent's needs.
Overview
| Tier | Backing | Persistence | Use Case |
|---|---|---|---|
| Working | Durable Object | Session-scoped | Conversation history, scratch state |
| Episodic | D1 (SQLite) | Permanent | Past conversations, user facts, long-term context |
| Semantic | Vectorize + Workers AI | Permanent | Similarity search over knowledge, RAG |
| Graph | edgraph (Durable Object) | Permanent | Entity relationships, knowledge graphs, structural recall |
Working Memory (Durable Object)
Working memory is always enabled — no configuration needed. It stores the current conversation messages in the Durable Object's transactional storage.
Each session gets its own isolated working memory within the Durable Object. Messages are persisted across requests within a session and cleared on DELETE /chat.
Episodic Memory (D1)
Episodic memory stores structured facts and past conversation summaries in a D1 database. This allows agents to recall information from previous sessions.
Semantic Memory (Vectorize + AI)
Semantic memory enables similarity-based retrieval over a knowledge base. Honi uses Cloudflare Vectorize for vector storage and Workers AI for embedding generation.
Or use the shorthand 'tiered' to enable all three tiers with default bindings:
Full wrangler.toml
Here's a complete wrangler.toml with all three memory tiers configured: