Asterix
Memory that survives the restart.
- Status
- PyPI v0.2.1 · 7 releases · MIT
- Role
- Designer, author, maintainer — solo
- Stack
- Python 3.10+ · Pydantic · SQLite / JSON persistence · Qdrant Cloud archival memory · Gemini · Groq · OpenAI
I was tired of agents that forget everything the moment you close the terminal. Asterix is a Python framework for stateful agents: sized, prioritized memory blocks the agent edits itself, state that persists across sessions with no server to run, and semantic long-term recall. MemGPT-style memory — without the infrastructure.
Memory as a first-class API
Agents are configured with explicit memory blocks — Agent(blocks={"task": BlockConfig(size=1500, priority=1)}) — and edit them through built-in tools. Two tiers: in-context blocks for working memory, Qdrant-backed archival memory with semantic retrieval for everything else.
Persistence is serverless: agent.save_state() writes to JSON or SQLite, Agent.load_state("agent_id") restores the full agent across a process restart. Two lines, no database daemon.
Designed against a real consumer
The decorator-driven tool system — @agent.tool with validation, retries, and auto-generated docs — plus before/after callbacks for human-in-the-loop gating and audit logging all exist because OSCAR, the agent built on top, needed them. Seven releases over six months, each driven by a real downstream requirement.
One standardized interface across Gemini, Groq, and OpenAI, so swapping the LLM under an agent is a config change, not a rewrite.
Self-editing memory without chaos
An agent that rewrites its own memory can also destroy it. Size budgets and priorities per block keep working memory bounded, and the block API makes every edit explicit and auditable rather than an opaque context mutation.