Agent Memory Bridge
v0.39.1Local MCP memory for coding agents: store decisions with their reasons, recall them on request.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
store
Store one entry in the bridge for later retrieval or coordination. Use this tool when you want to persist a compact memory record or write a signal that another workflow can poll later. Write durable knowledge as `kind="memory"` and transient coordination events as `kind="signal"`. Returns the stored entry identifier, timestamp, and duplicate information. Repeated `memory` writes may deduplicate; `signal` writes are intended to remain append-like.
| Parameter | Type | Description |
|---|---|---|
content * | string | Machine-readable memory payload to persist. Prefer compact claims, fixes, decisions, or signals over long transcript-style prose. |
namespace * | string | Logical memory bucket to write into, such as `project:<workspace>`, `domain:<name>`, or `global`. |
actor | Optional writer identity such as an agent, reviewer, or user profile. | |
client_session_id | Optional external client session or thread identifier when the caller can provide one. | |
client_transport | Optional transport label such as `stdio`, `http`, or `sse`. | |
client_workspace | Optional external client workspace root or project label when useful for provenance. | |
correlation_id | Optional shared identifier used to link related writes, handoffs, or workflow events across entries. | |
expires_at | Optional ISO-8601 expiry timestamp for a signal. Use this when a coordination event should stop being claimable after a deadline. | |
kind | string | `memory` stores durable knowledge for later retrieval. `signal` stores pollable coordination events for handoff or workflow triggers. |
session_id | Optional session or thread identifier used to trace entries back to one conversation or work unit. | |
source_app | Optional source name for the writer, such as `codex`, `codex-session-watcher`, or another local automation. | |
source_client | Optional external client identifier such as `codex`, `antigravity`, or `claude-code`. | |
source_model | Optional external model identifier such as `gpt-5.4` or `gemini-2.5-pro`. | |
tags | Optional stable labels for retrieval and filtering, for example `kind:gotcha`, `domain:retrieval`, or `project:demo-app`. | |
title | Optional short label for UI display or scanning. Keep it concise and stable when possible. | |
ttl_seconds | Optional relative expiry in seconds for a signal. Useful for short-lived handoff or review events. |
recall
Recall matching entries or poll for new signals from the bridge. Use this tool to search durable memory, filter by metadata, or poll for fresh coordination signals. For issue-like work, prefer project and domain recall before external search. For workflow polling, pass `since`, an empty query, and `kind="signal"`. Empty-query Signal recall returns a `next_since` cursor for the next polling cycle; other recall modes return `next_since=null`. The cursor tracks later insertions, not status changes to older Signals.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | Namespace to search or poll, such as `project:<workspace>`, `domain:<name>`, or `global`. |
actor | Optional actor filter for entries written by a specific agent or user. | |
correlation_id | Optional correlation filter to recall entries linked to the same workflow, handoff, or task. | |
evidence_context | Optional caller-declared evidence labels. Only `model`, `harness`, and `chat_template` are accepted; signed receipts contain bounded SHA-256 digests, never raw values. These labels are not authenticat… | |
kind | Optional type filter. Use `memory` for durable knowledge recall and `signal` for coordination or polling flows. | |
limit | integer | Maximum number of entries to return. Smaller values keep context tighter. |
query | string | Optional text query for full-text recall. Leave empty to use filter-only retrieval or polling. |
session_id | Optional session filter to narrow results to one conversation or run. | |
signal_status | Optional status filter for signals. Useful when you want only pending handoffs, currently claimed work, or already-acked coordination events. | |
since | Optional cursor for polling only entries newer than a previously seen same-namespace entry id used as a Signal polling anchor. Requires an empty query and `kind="signal"`. | |
tags_any | Optional OR-style tag filter. Any matching tag is enough for an entry to qualify. |
browse
Browse recent items when you do not yet know what to search for. Use this tool to inspect a namespace by filters alone. It is useful when you want to see recent memory, scan a domain bucket, or confirm that signals are flowing before writing a more specific recall query.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | Namespace to inspect without a text query, such as `project:<workspace>`, `domain:<name>`, or `global`. |
domain | Optional domain tag to narrow the list, using the plain domain name without the `domain:` prefix. | |
kind | Optional type filter. Use `memory` for durable knowledge and `signal` for coordination events. | |
limit | integer | Maximum number of items to list. Smaller values keep browse output readable. |
signal_status | Optional status filter when browsing signal entries. |
stats
Return a quick health summary for one namespace. Use this tool when you want to inspect what is in the bridge without opening SQLite directly. It returns total item count, a kind breakdown, top domains, and the oldest and newest entry timestamps for the namespace.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | Namespace to summarize, such as `project:<workspace>`, `domain:<name>`, or `global`. |
forget
Delete one stored entry by id. Use this tool to remove a bad memory, an accidental write, or a signal that should no longer exist. The response tells you whether anything was deleted and returns the removed item metadata when a match is found.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact memory identifier to remove. Use this when a record is noisy, wrong, or no longer belongs in the bridge. |
feedback
Record structured retrieval feedback for one recalled memory result. Evidence is append-only/shadow-only. Provenance is caller-declared and not authenticated. This tool does not mutate memory records, recall results, or ranking behavior.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | Exact recalled memory id being evaluated. |
namespace * | string | Namespace used by the recall receipt, such as `project:<workspace>` or `global`. |
recall_receipt * | string | Signed recall receipt token returned by a durable memory text `recall` response. |
result_rank * | integer | One-based rank of the memory in the recalled result list. |
feedback_type | string | Append-only feedback event type. Defaults to a root vote. |
outcome | Declared retrieval outcome. Required for votes and corrections; optional for retractions. | |
provenance | Optional declared provenance fields such as source_app, source_client, source_model, client_session_id, client_workspace, client_transport, or actor. | |
reason | Optional compact reason. Required for `misleading` and `outdated` outcomes. | |
supersedes_feedback_id | Current feedback head id. Required for corrections and retractions; omitted for root votes. |
promote
Manually promote one stored memory to a stronger durable record type. Use this tool when you know a record should be treated as a learn, gotcha, or domain note even if the reflex layer has not promoted it yet. Promotion keeps the same id and updates the stored title, tags, and structured content in place.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact memory identifier to reclassify. Use this when a stored record should be treated as a stronger kind of durable memory. |
to_kind * | string | Target durable record type. Use `learn` for reusable claims, `gotcha` for pitfalls and fixes, or `domain-note` for broader synthesized guidance. |
annotate
Explicitly enrich one durable memory without pretending the write was a new fact. Use this after `store` reports `duplicate_with_new_metadata`. The original content remains unchanged; title/tag changes and additional provenance are written to an auditable annotation record.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact durable memory id whose metadata should be explicitly enriched. |
actor | Optional identity of the human or agent performing the explicit annotation. | |
provenance | Optional additional provenance fields such as source_client, source_model, session_id, or correlation_id. They are retained in the annotation audit trail. | |
tags | Optional tags to add. Existing tags remain and the annotation is audited. | |
title | Optional replacement title. Content and memory identity remain unchanged. |
revise
Create a new durable memory that explicitly supersedes an older record. The predecessor remains available for audit. The bridge adds an exact `supersedes` edge and records the revision receipt instead of silently mutating content in place.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact durable memory id that the new revision supersedes. |
replacement_content * | string | Complete replacement content for the new auditable memory revision. |
actor | Optional identity responsible for the revision. | |
provenance | Optional provenance overrides for the new revision. | |
reason | Optional compact reason stored with the predecessor/successor audit link. | |
tags | Optional tags for the new revision. Defaults to compatible predecessor tags. | |
title | Optional title for the new revision. Defaults to the predecessor title. |
export
Export bridge content into a readable or portable format. Use this tool when you want to inspect a namespace outside the MCP client, create a human-readable snapshot, or move memory into another system without opening the database directly.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | Namespace to export, such as `project:<workspace>`, `domain:<name>`, or `global`. |
format | string | Output format for the exported memory. Use `markdown` for readable notes, `json` for structured interchange, or `text` for plain text. |
kind | Optional type filter for the export. | |
limit | integer | Maximum number of entries to export in one call. |
query | string | Optional full-text query to narrow the export. Leave empty to export by filters alone. |
signal_status | Optional status filter when exporting signal entries. | |
tags_any | Optional OR-style tag filter. Any matching tag is enough for an entry to be included. |
begin_run
Start one explicit, stateless run and return server-minted run/work-item IDs. The bridge does not retain an implicit current run. Callers must pass the returned handles to later event, read, and completion calls. Idempotent retries return the same handles and reject conflicting payloads.
| Parameter | Type | Description |
|---|---|---|
goal * | string | Root goal for the run. Keep it bounded and outcome-oriented. |
idempotency_key * | string | Caller-generated retry key. The bridge stores only its SHA-256 digest and returns the original server-minted run for an identical retry. |
workspace_key * | string | Declared workspace scope for this run, such as `project:<workspace>`. The server uses it to reject cross-workspace run access. |
acceptance_criteria | Optional structured acceptance criteria with stable id or criterion_id values. | |
agent_id | Optional declared agent or worker identifier. It is provenance, not authenticated identity. | |
budget | Optional bounded JSON budget metadata, such as token or time limits. | |
chat_template_digest | Optional lowercase SHA-256 digest of the chat template. | |
constraints | Optional bounded constraints declared for this run. | |
continuation_of_run_id | Optional same-workspace prior run that this run continues. | |
evidence_profile | string | Evidence governance profile. governed-v2 requires typed events and server-minted receipts. |
harness_digest | Optional lowercase SHA-256 digest of the harness configuration. | |
memory_scopes | Optional declared memory scopes available to the run. These do not grant authorization. | |
model_digest | Optional lowercase SHA-256 digest of the model identity or configuration. | |
non_goals | Optional bounded non-goals declared for this run. | |
provenance | Optional bounded declared provenance for the run. | |
risk_level | string | Declared run risk level; high and critical preflight reviews require a rollback plan. |
thread_id | Optional external thread or conversation identifier. | |
tool_schema_digest | Optional lowercase SHA-256 digest of the tool schema used by the run. |
record_run_event
Append one structured event to a run's durable authority ledger. Sequence allocation, event persistence, child work-item creation, and projection updates occur in one transaction. This tool never sets an implicit current run.
| Parameter | Type | Description |
|---|---|---|
event_type * | string | Structured v1 or governed-v2 logical event type. |
idempotency_key * | string | Caller-generated retry key scoped to this run; only its SHA-256 digest is stored. |
run_id * | string | Server-minted run identifier returned by `begin_run`. |
summary * | string | Bounded factual event summary. Raw transcript or hidden reasoning is not allowed. |
workspace_key * | string | Declared workspace scope that owns the run. |
agent_id | Optional declared agent responsible for the event. | |
event_schema_version | integer | Event payload schema version; governed-v2 runs require version 2. |
evidence | Optional structured evidence references, limited to 32 KiB. | |
expected_database_epoch | Database epoch CAS precondition; required by governed-v2 runs. | |
expected_last_sequence | Optional compare-and-swap precondition. The append is rejected without writes when the authority ledger has a different latest sequence. | |
expected_run_generation | Run generation CAS precondition; required by governed-v2 runs. | |
expected_work_item_status | Optional compare-and-swap precondition for an existing work item. Conflicts report the actual authority-derived status. | |
memory_attribution | Required receipt-bound or explicit manual memory attribution for memory_recalled, memory_applied, and memory_rejected. Recall receipt tokens are validated but never persisted. | |
owner_agent_id | Optional declared owner for a newly created child work item. | |
parent_work_item_id | Parent work-item identifier, used only when creating a child work item. | |
payload | Optional structured JSON payload, limited to 32 KiB. Raw reasoning fields are rejected. | |
provenance | Optional bounded declared provenance for the event. | |
thread_id | Optional external thread or conversation identifier for the event. | |
work_item_goal | Goal for a new child work item, used only with `work_item_started`. | |
work_item_id | Existing server-minted work-item identifier. Omit only for `work_item_started` when creating a child work item. |
get_run
Read current run/work-item projections plus append-only events for reconnect or compaction recovery.
| Parameter | Type | Description |
|---|---|---|
run_id * | string | Server-minted run identifier returned by `begin_run`. |
workspace_key * | string | Declared workspace scope that owns the run. |
event_limit | integer | Maximum number of ordered events to return in this page. |
since_sequence | integer | Return only events whose per-run sequence is greater than this value. |
complete_run
Append or correct a run outcome without changing memory ranking or policy. On new runs, `verified_success` requires a matching current server-minted governed receipt. Outcome corrections form an append-only supersession chain.
| Parameter | Type | Description |
|---|---|---|
evaluator_type * | string | Evidence source class. Agent self-report cannot establish verified success. |
idempotency_key * | string | Caller-generated retry key scoped to this run; only its SHA-256 digest is stored. |
outcome * | string | Declared outcome for this append-only outcome revision. |
run_id * | string | Server-minted run identifier returned by `begin_run`. |
workspace_key * | string | Declared workspace scope that owns the run. |
evaluator_digest | Optional lowercase SHA-256 digest of the evaluator implementation or configuration. | |
evaluator_version | Optional bounded evaluator version label. | |
evidence | Structured outcome evidence, limited to 32 KiB. | |
expected_database_epoch | Database epoch CAS precondition; required by governed-v2 runs. | |
expected_last_sequence | Current run sequence CAS precondition; required by governed-v2 runs. | |
expected_run_generation | Run generation CAS precondition; required by governed-v2 runs. | |
metrics | Optional structured outcome metrics, limited to 32 KiB. | |
provenance | Optional bounded declared provenance for the outcome. | |
regression_of_run_id | Distinct same-workspace run with a current `verified_success` outcome; required for a `regression` outcome. | |
supersedes_outcome_id | Current outcome head to supersede when recording a correction. | |
termination_reason | Optional bounded reason the run ended. | |
verification_receipt_id | Server-minted governed verification receipt. Ordinary MCP callers cannot mint receipts; required for verified_success on new runs. |
claim_signal
Claim one signal with a short lease for lightweight work coordination. Use this when a worker should take ownership of a pending signal before it acts. If `signal_id` is omitted, the bridge claims the next eligible signal in the namespace that matches the optional filters, with a small fairness bias inside the oldest pending window so one polling consumer does not keep winning by accident.
| Parameter | Type | Description |
|---|---|---|
consumer * | string | Stable worker or agent identifier that will own the lease, for example `reviewer-a` or `worker:planner`. |
namespace * | string | Namespace that holds the coordination events to claim, such as `project:<workspace>`. |
correlation_id | Optional workflow correlation id used to claim signals from one handoff thread. | |
lease_seconds | integer | How long the claim lease should last before another consumer can reclaim the signal. |
signal_id | Optional exact signal id to claim. Leave empty to claim the next eligible signal. | |
tags_any | Optional OR-style tag filter used to narrow which pending signals are claimable. |
extend_signal_lease
Extend the active lease on one claimed signal. Use this when a worker still owns a signal but needs more time before another consumer can reclaim it. Expired leases cannot be extended; those signals must be reclaimed instead. Hard signal expiry still takes precedence over lease renewal.
| Parameter | Type | Description |
|---|---|---|
consumer * | string | Consumer identity that currently owns the lease. Only the active claimant can extend it. |
id * | string | Exact signal id whose active lease should be extended. |
lease_seconds * | integer | Additional lease duration in seconds. The bridge extends from the current lease end when possible, but never beyond the signal's hard expiry. |
ack_signal
Acknowledge one claimed or pending signal so downstream polling can stop treating it as active work.
| Parameter | Type | Description |
|---|---|---|
id * | string | Exact signal id to acknowledge after the work is done. |
consumer | Consumer identity that must match the owner of an active claim. It may be omitted only when acknowledging a pending, unclaimed signal. |