Stateless agents are a pain. You spend your weekend wiring up vector databases, managing embeddings, and writing extraction prompts just to keep an agent from forgetting what it knew five minutes ago. Memanto’s new Python client, version 0.2.28, claims to kill that plumbing. The pitch is aggressive: get persistent, typed memory into your agent in ten lines of code. No server to start, no vector store to provision manually. The agent is created on first use, and the memory just works.

The Ten-Line Hook

The core value prop is simplicity. You import Memanto, initialize it with an agent_id, and you’re live. The client handles session management, creating the agent if it doesn’t exist and adopting live sessions if they do. If your session expires mid-run, it retries automatically. In the demo, two memories are stored—one preference, one decision—and then recalled. The answer() method retrieves relevant memories and generates a grounded response using Memanto’s internal model, meaning you don’t even need an OpenAI or Anthropic key for basic lookups. It’s a tight loop for internal tools and CLI helpers where you just need facts, not a full chat interface.

Typed Memory and Self-Extraction

Memanto enforces structure. Every memory has a type from a fixed list of thirteen, including fact, preference, decision, and error. This isn’t just metadata; it’s the key to filtering. When you call recall(), you can restrict results by type, ensuring your agent doesn’t confuse a temporary observation with a hard decision. The real power, however, is in extract(). Instead of manually calling remember() for every fact, you pass a chat history to extract(). It uses a model to identify durable facts, types them, and stores them. The article recommends running with dry_run=True first to review candidates, because extraction varies between runs. One run might classify a schedule change as a decision, another as a fact.

Temporal Awareness and Agent Loops

Memory is useless if you can’t track changes. Memanto supports temporal queries via recall_as_of() and recall_changed_since(). If a user switches from oat milk to almond milk, both memories exist. The system can return the state as it was at a specific timestamp or list what changed since then. The answer() method is smart enough to resolve these conflicts, preferring the most recent memory. For production agents, the recommended pattern is a two-step loop: recall() before the LLM call to inject context, and extract() after the user’s turn to save new facts. Crucially, the article warns against extracting the assistant’s reply, which leads to duplicate memories. Only extract the user’s input.

The Bottom Line

This is a pragmatic tool for developers tired of reinventing the memory wheel. By abstracting the vector store and embedding logic, Memanto lets you focus on agent behavior rather than infrastructure. The temporal features and typed memory system are particularly strong, offering a level of precision that generic RAG pipelines often lack. If you’re building a support bot or a coding assistant that needs to remember context over long sessions, this client cuts the setup time from days to minutes.

Key Takeaways

  • Memanto 0.2.28 for Python enables persistent agent memory with minimal setup, supporting both Cloud and On-Prem (Docker/Ollama) backends.
  • The library enforces typed memory (13 types like fact, preference, decision) to allow precise filtering and retrieval via recall().
  • The extract() method uses LLMs to automatically identify and store durable facts from chat history, with a dry_run mode for safety.
  • Temporal queries like recall_as_of() allow agents to retrieve historical states, enabling conflict resolution when facts change over time.
  • Best practice for agent loops is to extract memory from user inputs only, avoiding duplicates by not extracting assistant replies.