Midas
v1.1.1Local-first, source-traceable agent memory with offline capture and recall
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
remember Remember
Store a memory for later recall. content: text to remember (a fact, decision, preference, or conversation turn). kind: note | chat | fact | preference | constraint | mission. importance: 1-5 (higher is weighted up in recall and protected from forgetting). 0 = auto-derive from content (no LLM) — concrete facts score higher than chit-chat. session: conversation/thread id used to group related memories. provenance: planning | action | observation | user_confirmation. Use user_confirmation only when the user explicitly confirmed the content; external actions…
| Parameter | Type | Description |
|---|---|---|
content * | string | |
actor | string | |
importance | integer | |
kind | string | |
namespace | string | |
provenance | string | |
session | string |
capture Capture turn
Offer a turn to memory; Midas decides whether to keep it (no LLM). Forward anything that might be durable — a fact, decision, preference, constraint, or correction. Midas scores its importance and keeps it only if it clears the relevance policy and isn't a duplicate, so you can capture freely without polluting memory. Returns whether it was stored and why (so you learn the bar). This is the workhorse for hands-off, automatic remembering. kind: note | chat | fact | preference | constraint | mission. provenance: planning | action | observation | user_confirmation.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
actor | string | |
kind | string | |
namespace | string | |
provenance | string | |
session | string |
remember_code Remember code memory
Capture a CODE memory tagged by category + project, for the coding-agent views. code_kind: one of architecture_decision | dependency_choice | convention | bug_fixed | recurring_failure | forbidden_action | command_worked | command_failed. Use forbidden_action for rules the agent must not violate (they gate `check_forbidden_action`); afterwards `project_state` shows the live state by category. No LLM. Set provenance="user_confirmation" only when the user explicitly confirmed it.
| Parameter | Type | Description |
|---|---|---|
code_kind * | string | |
content * | string | |
project * | string | |
importance | integer | |
namespace | string | |
provenance | string | |
session | string |
recall Recall
Retrieve relevant memories with deterministic, source-traceable evidence. Returns exact stored text plus provenance/source/timestamps and, by default, score components (relevance, importance_norm, recency). No LLM rewrites or rationales are generated. Set hybrid=true to fuse BM25 lexical matching with semantic recall — useful when the query is an exact identifier (an error code, a function name) rather than a paraphrase. as_of: ISO date (YYYY-MM-DD) for a HISTORICAL query — "what did memory say on that date": later records are excluded and revised beliefs resolve t…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
as_of | string | |
explain | boolean | |
fusion | string | |
hybrid | boolean | |
kind | ||
limit | integer | |
min_importance | integer | |
min_relevance | number | |
namespace | string | |
pool | integer |
inspect_memory Inspect memory
Inspect one stored memory by id without search, mutation, or embedding exposure.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string |
build_context Build context
Assemble a budgeted, prompt-ready context block for a query. Highest-value memories first, with same-session neighbours pulled in, trimmed to token_budget. Drop the returned string straight into an LLM prompt. It uses lean memory lines by default; call `recall` or `inspect_memory` when you need full provenance/source evidence. Each line is dated and the header anchors today's date so the reader can resolve relative time. Standing user directives ("from now on…", "always…") are pinned in regardless of query relevance.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
hybrid | boolean | |
limit | integer | |
namespace | string | |
token_budget | integer |
memory_state Memory state
The CURRENT durable state of a project/scope: the live (non-superseded) decisions, constraints, facts, and preferences, newest first. Use this to ONBOARD into a project or before planning — when a broad 'what's the current state?' has no single matching turn, so `recall` under-retrieves. Not a similarity search and no LLM. kinds: optional comma list (constraint,fact,preference,mission) to narrow; empty = all durable kinds.
| Parameter | Type | Description |
|---|---|---|
kinds | string | |
limit | integer | |
namespace | string |
memory_diff Memory diff
What CHANGED in memory in the last `hours`: beliefs newly added, and beliefs revised (old -> new). The 'what's new since our last session' view for resuming long-horizon work without re-reading everything. Deterministic, no LLM.
| Parameter | Type | Description |
|---|---|---|
hours | number | |
namespace | string |
resume Resume session
START OF SESSION: everything needed to pick up where the last session left off, in ONE call — pinned standing directives, live forbidden rules, what changed in the last `hours` (default: a week), the current durable state, open commitments, and unresolved memory conflicts. `context` is prompt-ready and token-budgeted; use it silently, then work. Complements `build_context` (which needs a query): resume is the query-less session start. Deterministic, no LLM.
| Parameter | Type | Description |
|---|---|---|
hours | number | |
namespace | string | |
project | string | |
token_budget | integer |
memory_conflicts Memory conflicts
Live beliefs that CONTRADICT each other with neither superseding the other — the multi-agent failure mode where two clients wrote opposite facts into the shared memory and both stayed live. Returns ranked candidate pairs (NLI-scored when the local NLI model is enabled, else a same-slot heuristic: numbers disagree / one side negates). Midas never resolves these silently: verify with the user, then `forget` the wrong one or capture the corrected value (which supersedes). No LLM.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
namespace | string |
open_loops Open loops
Unresolved commitments — work someone said WOULD be done and never closed — oldest (most overdue) first. Continuity is not only facts: check this when resuming so promised work isn't silently dropped. Record one with `remember_commitment`; close it with `close_loop`.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
namespace | string | |
project | string |
remember_commitment Remember commitment
Record a commitment (an OPEN LOOP): work you or the user said WILL be done — a promised fix, a follow-up, a migration to finish. It stays visible in `open_loops`/`resume` until closed with `close_loop`, so promises survive across sessions. due: optional free-text deadline.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
due | string | |
namespace | string | |
project | string | |
session | string |
close_loop Close loop
Close an open commitment: records the resolution and supersedes the open loop with it, so `open_loops` stops returning it while the promise -> resolution history stays auditable. Get `loop_id` from `open_loops` (the record id).
| Parameter | Type | Description |
|---|---|---|
loop_id * | string | |
resolution * | string |
project_state Project state
The current code-state of a project for a coding agent, grouped by code_kind (architecture_decision, bug_fixed, convention, forbidden_action, dependency_choice, ...). Live (non-superseded) memories only — call this to ONBOARD into a project, or to see what is decided and what is forbidden before acting. Deterministic, no LLM. Capture code memories with the SDK's `midas.coding.remember_*` helpers (they tag `code_kind` + `project`).
| Parameter | Type | Description |
|---|---|---|
project * | string | |
limit | integer |
check_forbidden_action Check forbidden action
Before a code action, check it against the project's live `forbidden_action` rules. Two tiers, by confidence (deterministic, no LLM; superseded/retired rules ignored): - `forbidden` (HIGH confidence, lexical match) → do NOT do it; refuse and cite `rules`. - `possibly_forbidden` (ADVISORY, semantic/paraphrase match) → ASK the user before proceeding; the semantic signal is noisy (~31% false positives, `eval.forbidden_eval`), so it warns, not blocks. Separate from the provenance/currency gate (`check_memory_use`).
| Parameter | Type | Description |
|---|---|---|
action * | string | |
project * | string |
audit_use Audit memory use
The compliance audit artifact for a memory-justified use: the guard decision + the full provenance and belief-revision history of every supporting memory + an attributability score (fraction of evidence with both a source and an actor). Hand this to an auditor to prove WHY an action is or isn't justified. Source-traceable, deterministic, no LLM.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
intended_use | string | |
namespace | string |
memory_policy Memory policy
Return the exact MCP-injected memory policy text and guard parameters.
check_memory_use Check memory use
Decide whether recalled memory may justify the intended use. intended_use: planning | answer | external_action | destructive_action. External/destructive actions require user_confirmation provenance; otherwise ask the user first.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
acting_agent | string | |
intended_use | string | |
limit | integer | |
namespace | string |
forget Forget memory
Delete a single memory by id (ids come from `recall`). Supersession chains through the deleted record are relinked, so belief-revision history stays walkable.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string |
forget_matching Forget matching
Topic-level erasure ("forget what you know about X") with a reviewable audit. Matches memories at relevance >= min_relevance. By default this is a DRY RUN: it returns what *would* be deleted so you (or the user) can review; call again with dry_run=false to delete. Deletion bypasses durability protections — an explicit erasure request outranks retention — and returns the full list of removed memories as the audit trail.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
dry_run | boolean | |
limit | integer | |
min_relevance | number | |
namespace | string |
forget_all Forget all
Clear this project's memories, or the whole store in shared mode.
maintain Maintain memory
Run a no-LLM memory-maintenance pass and return the deletion audit. Bounds storage and keeps recall clean without sending anything to an LLM — the enterprise retention / "right to be forgotten" lever, with a full audit of exactly what was removed: - consolidate_threshold: if > 0, dedup near-duplicate restatements at this cosine (e.g. 0.95). - max_records: if > 0, forget the lowest-value tail until at most this many remain. - min_value: if > 0, forget every (non-durable, unprotected) memory scoring below this value. - ttl: age-based retention, "kind=days" comm…
| Parameter | Type | Description |
|---|---|---|
consolidate_threshold | number | |
max_records | integer | |
min_value | number | |
ttl | string |
stats Memory stats
Memory stats: total count, breakdown by kind, namespace, and the temporal-tier distribution. tiers: short (<= 1 day) / medium (<= 1 week) / long (older) — the short/medium/multi-day horizons. Pass namespace to scope the counts to one project/agent scope.
| Parameter | Type | Description |
|---|---|---|
namespace | string |