Memory

Cross-Ticket Memory

Mopheus's memory system lets agents learn from past tickets and recall that knowledge when handling new ones — making them smarter over time.

Cross-Ticket Memory

Mopheus's memory system lets agents learn from completed tickets and reuse that experience on future ones. When an agent solves a problem on a ticket, the insight — an error code's fix, a failure pattern, a known environment fact — is saved as a memory. The next time a similar ticket comes in, Mopheus automatically recalls the relevant memories and hands them to the agent, so it can apply a proven solution instead of starting from scratch.

How It Works

The memory loop runs automatically in the background:

Ticket completed → Distill memories → Store → Recall for new ticket → Inject into the agent
  1. Distill — After a ticket is completed, Mopheus distills structured memories from what the agent learned.
  2. Store — Memories are saved with smart deduplication: if a similar memory already exists, it is strengthened instead of duplicated.
  3. Recall — When a new ticket is picked up, Mopheus matches the ticket's context (error codes, labels, metadata) against stored memories.
  4. Inject — Matched memories are handed to the agent as part of its task context.

Once the feature is enabled, distillation and recall happen on their own — there is nothing to wire up.

Memory Types

Every memory is categorized into one of six types:

TypeWhat it captures
resolutionAn error and the verified way to resolve it
riskA failure pattern to watch out for
procedureA workflow that worked (preconditions, steps, validation, rollback)
factStable facts about a target environment (versions, topology, parameters)
correctionA case where a human corrected the agent's judgment
preferenceOperational rules or constraints (approvals, maintenance windows)

fact and preference are global knowledge — they apply to every task, so they are always injected regardless of similarity. correction reflects human-verified truth and is prioritized over other types.

Smart Storage

  • Deduplication — When a new memory closely matches an existing one, Mopheus updates the existing record (incrementing how many times it has been confirmed and refreshing its last-seen time) instead of creating a duplicate. A solution confirmed across ten tickets builds confidence, not ten rows.
  • Superseding — For fact and preference, a newer memory automatically replaces the older one of the same kind, so environment parameters and rules always stay current.
  • Provenance — Every memory records which ticket it came from, so you can trace its origin.
  • Distill once — Each ticket is distilled only once. To distill again, re-run distillation with the overwrite option.

How Recall Works

Recall is not a keyword search. It layers several strategies:

  1. Global knowledge — All environment facts and preferences for the current context are injected automatically.
  2. Error-code match — If the ticket mentions a known error code (e.g. ORA-01555), memories recorded for that exact code are matched first.
  3. Context signals — The ticket's labels and metadata (such as database type, profile, or repository) are used to find memories from similar contexts.
  4. Frequency weighting — Memories confirmed more often rank higher.
  5. Human-correction priority — Human-corrected memories always take precedence.

Recall is bounded to the current workspace — memories never leak across workspace boundaries.

Enabling Memory

Memory is gated behind a feature flag. An admin enables it per workspace:

  1. Go to Admin → Features
  2. Set the Memory feature to Enabled (or Selected to whitelist specific workspaces)

Once enabled, agents in that workspace automatically distill memories from completed tickets and recall them when picking up new ones.

Viewing & Managing Memories

Mopheus provides a dedicated Memory view in the workspace where you can browse, filter, and maintain stored memories:

  • Browse — List memories, filter by type or enabled state, and search content.
  • Inspect — Open a memory to read its content, see how many tickets contributed to it, and view its source tickets.
  • Edit — Update a memory's title, content, type, or context tags.
  • Enable / Disable — Disable a memory to hide it from agents without deleting it (useful when a fact is temporarily wrong). Disabled memories stay visible in the UI.
  • Delete — Permanently remove a memory. Deleting a memory that superseded others restores the ones it replaced.
  • Supersede chain — View the chain of memories that replaced (or were replaced by) a given memory.

Triggering Distillation Manually

Distillation normally runs after a ticket is completed, but you can trigger it explicitly from the ticket's memory section to have an agent turn the ticket into memories. For a ticket that was already processed, choose Re-distill without deleting to keep the existing result and distill again, or Delete and re-distill to clear the previous result first.

After distillation, the new memories appear in the memory view and become available for recall on future tickets.

Specialty-Area-Aware Distillation

Not every ticket reads the same way. A legal-contract review and an engineering incident produce very different kinds of insight. Mopheus splits distillation into three layers so each run can apply the right specialty area lens without losing a shared baseline:

  1. Core (always on) — The non-negotiable rules every distillation run follows: use the mopheus memory store CLI, never write files directly, quality over quantity, one fact per memory.
  2. General (always on) — The domain-agnostic distillation playbook and the six memory types.
  3. Specialty (optional, zero or one) — A skill that teaches the agent how to distill a specific kind of work. Mopheus ships four built-in specialty area skills: engineering, legal-contract, people-hr, and sales-customer. To make a workspace skill eligible, enable Memory distillation specialty in the skill detail sidebar and assign the skill to the agent that will run the distillation. The switch and the memory_distillation entry in the SKILL.md capabilities frontmatter stay synchronized in both directions.

Choosing a mode

When you trigger distillation, you pick one of three modes:

ModeBehavior
Auto (default)The agent reads the full ticket transcript first, then selects zero or one specialty area skill from the catalog. Best when the ticket's specialty area isn't obvious upfront.
General onlyApply Core and General only — no specialty area skill, no catalog. Best for generic or mixed-content tickets.
SpecialtyYou pick the single specialty area skill to apply. Your choice is authoritative; the agent cannot override it.

How Auto mode picks a specialty area

In Auto mode the agent is given a catalog of eligible specialty area skills: the four built-ins plus its assigned workspace skills carrying the memory_distillation capability. The same catalog is used by the Specialty picker. After reading the transcript it calls a task-token-authenticated endpoint to record its choice. A run can select a specialty area skill once, re-read the same one idempotently, but can never switch to a different one — this "zero or one" invariant keeps the audit trail honest. If the agent finishes distillation without selecting any specialty area skill, the run is recorded as none.

Audit trail

Every distillation task writes a DistillationContext into the agent task's context: the mode, the Core/General references, the selected specialty area skill (if any), and who supplied it (user, agent, general_only, or none). This is what the transcript audit line renders, so you can always see which specialty area lens was applied to a given run.

Synthesizing Skills from Memories

As memories accumulate, related playbooks and resolutions can be synthesized into reusable Workspace Skills:

  1. Select Memories — In the Memory page, select one or more relevant memories via checkboxes.
  2. Launch Synthesis — Click Synthesize Skill from the batch action bar.
  3. Choose a Synthesizer Agent — Pick an agent that has the Skill Synthesizer (is_skiller) capability enabled.
  4. Review & Save — Inspect the generated skill structure (SKILL.md), edit as needed, and save it directly as a workspace skill.

CLI Usage

# Enable skill synthesis capability on an agent
mopheus agent update <agent-id> --is-skiller

# Dispatch skill synthesis task from memory IDs
mopheus memory synthesize-skill <memory-id-1> <memory-id-2> --agent-id <agent-id>

Tips

  • Label tickets well — Labels and ticket metadata drive recall, so consistent labeling helps the right memories surface.
  • Capture environment facts early — Record stable environment details as memories so every subsequent task starts with them.
  • Curate periodically — Review and disable memories that have gone stale, or correct the agent by adding a correction memory.
  • Synthesize high-frequency playbooks into skills — When multiple procedures or resolutions converge on a standard workflow, synthesize them into a dedicated skill for all workspace agents to use.