Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
Overview

Concepts

How MuBit's memory model works, what the learning loop does, and how it compares to vector DBs, prompt caches, and RAG.

MuBit's job is to give AI agents memory that persists, evolves, and is queryable across runs. This page is an evaluator's overview — read it to decide whether MuBit fits your problem before you write any integration code.

The memory model

MuBit organizes memory by entry type. Each type has different retention, retrieval, and access semantics.

Entry typeWhat it storesLifetimeRecall scope
factAtomic statements grounded in observation (e.g. "Customer Taylor uses SSO")Run-scoped by defaultSame session_id + agent_id
lessonGeneralized takeaways from runs (e.g. "Always flag bare except:")Configurable: run / session / globalCross-session if lesson_scope="global"
ruleHard constraints that must always apply (e.g. "Never PII-log a user.ssn")PersistentCross-session
tracePer-call records of what happened (LLM call, tool call, response)Run-scopedSame session_id
archive_blockExact artifacts you'll need byte-for-byte later (diffs, SQL, raw outputs)PersistentCross-session via reference_id

Storing a fact and asking the wrong session to recall it returns nothing. Storing a global lesson and asking any session keyed by the same user_id returns it. This is the most common shape of "why didn't my recall work" — see SDK helpers → cross-session recall.

More entry types for richer agents

The five types above are what most agents start with. The full taxonomy is larger — multi-agent coordination, tool-call audit, and process-reward learning each have their own entry types.

Entry typeWhat it captures
observationRaw agent observations during a run
tool_input / tool_outputLLM tool call request and response
reflectionNotes a reflection pass produced before lessons crystallize
task_resultOutcome of a discrete sub-task
logFree-form structured log entries
checkpointSnapshot of context for later restore — see SDK methods → helper catalog
step_outcomePer-step success/failure for process-reward learning — see Step-level outcomes
mental_modelCurated high-priority summary, retrieved first
handoffInter-agent task handoff record — see Lane-scoped memory
feedbackVerdict on a handoff

The learning loop

The four-step loop is what differentiates MuBit from a passive store. Read How MuBit works for the full discussion.

  1. Write

    Your agent calls remember() to store facts, traces, or observations as they happen.

  2. Retrieve

    Before the next LLM call, recall() finds relevant evidence and get_context() assembles a token-budgeted context block.

  3. Reflect

    After a run completes, reflect() extracts reusable lessons from what happened. Fresh lessons start as candidates and are validated before they're trusted — a lesson stays pending until enough evidence accrues, then is promoted (run → session → global) or marked stale. See How MuBit works for details.

  4. Reinforce

    record_outcome() feeds success / failure signals back into the lesson store, strengthening what worked and weakening what didn't.

The agent gets better over multiple runs without retraining the model.

How MuBit compares

If you need…Reach for…MuBit's role
Similarity search over a static corpusA vector DB (Pinecone, Weaviate, pgvector)Not the right tool — MuBit is for mutable memory with outcomes
Prompt-level caching of identical requestsA prompt cache (Anthropic prompt cache, Helicone)Orthogonal — MuBit can sit alongside
Stateless RAG against a fixed knowledge baseA RAG framework (LlamaIndex, LangChain)Use the framework + MuBit as its persistent store via the adapters
Memory that persists across sessions and evolvesMuBitThe whole product
Multi-agent coordination with scoped accessMuBit (register_agent, handoff, feedback)Native primitives

Trust and operations

  • Authentication. All calls use a bearer API key formatted as mbt_<instance>_<key_id>_<secret>. The instance segment routes to a region; the key id is safe to log; the secret is not. See Authentication.
  • Scopes. Each agent registers with explicit read_scopes and write_scopes (fact, lesson, rule, archive_block, etc). The runtime enforces them.
  • Rate limits. Per-instance, per-route. See Rate limits.
  • Audit. Every write produces an activity entry. See Activity & audit trail.
  • Data residency / SOC 2. See mubit.ai/security.

Where to go next