RichmondAlake/memorizz

MemoRizz: A Python library serving as a memory layer for AI applications. Leverages popular databases and storage solutions to optimize memory usage. Provides utility classes and methods for efficient data management.

What Memorizz Is

Memorizz is a Python framework for building memory‑first AI agents. It ties together persistent storage, large‑language‑model (LLM) providers, prompts, and reasoning so that an agent can remember useful facts across sessions, retrieve the right context, and improve its decisions over time.

Core Ideas

Concept What It Gives You
Memory types Episodic (conversation history), Semantic (knowledge bases), Procedural (tools & workflows), Short‑term (working context), Shared (team workspace).
Intelligence plane The layer that combines the LLM, prompts, planning, tool selection and the memory system. Its goal is higher decision quality and less hallucination.
Continual learning Agents capture tool outcomes, distill successful patterns into reusable skills, and automatically evaluate and demote skills that stop working.
Forgetting mechanism Memories are ranked by recency, importance and relevance; suppression is reversible and governed, mimicking how generative agents forget.

Main Pieces

  1. MemAgent / MemAgentBuilder – The primary class for defining an agent. You set an instruction, choose a model provider (OpenAI, Ollama, etc.), pick a memory scope, and then build a persistent agent.
  2. Memory providers – Plug‑and‑play back‑ends: local filesystem, MongoDB, Oracle, Notion + vector store, etc. They all follow a common contract.
  3. Harnesses – External execution environments (Codex, Claude Code, OpenHands, DeepSeek, etc.). A MetaHarness can run a task on any harness, keep memory scope, enforce budgets, approvals, and verification.
  4. CLI / UI – memorizz command line and a local web dashboard show runs, success rates, token usage, cost, and memory health. You can also expose the system as an MCP server for multi‑user setups.
  5. Plugins for coding assistants – A plugin lets Codex or Claude Code start each session with the project’s remembered facts and previous summaries, and share memory with other agents.

Typical Workflow (Python SDK)

from memorizz import MemAgentBuilder

agent = (
    MemAgentBuilder()
    .with_instruction("Remember useful context and use it to help the user.")
    .with_llm_config({"provider": "openai", "model": "gpt-4o-mini"})
    .with_memory_ids("my-assistant")
    .build_and_save()
)

scope = {"memory_id": "my-assistant", "user_id": "alice", "thread_id": "intro"}
with agent.lifecycle(close_memory_provider=True):
    agent.run("I work on payments systems.", **scope)
    print(agent.run("What did I tell you about my work?", **scope))

The agent stores the first statement in episodic memory; the second call retrieves it automatically.

Getting Started

  • Install via PyPI: pip install memorizz.
  • Provide an API key (e.g., OPENAI_API_KEY).
  • Run memorizz for the interactive CLI or memorizz ui for the dashboard.
  • Configure memory storage with memorizz memory configure (filesystem, Notion, etc.).
  • Use the quick‑start code above to create a persistent assistant.

Who Might Use It

  • Developers of autonomous assistants who need long‑term context (e.g., personal AI, support bots).
  • Teams building multi‑agent workflows where agents share knowledge and delegate tasks.
  • Researchers exploring continual learning and memory‑driven prompting.
  • Tool‑heavy automation that benefits from cached tool results and reversible forgetting.

Maturity & License

  • Experimental – APIs can change, and the project has not been security‑hardened for production.
  • Licensed under PolyForm Non‑commercial 1.0.0 (free for non‑commercial use).

In short: Memorizz is a fairly complete, open‑source Python toolkit that makes LLM agents remember—persisting, retrieving, and refining knowledge across runs, with UI observability, plug‑in support for coding assistants, and a “harness” system for running tasks on various external models.

Related

  • Project
  • Project
  • Project
  • Project
  • Project