Base URL for HTTP: http://localhost:7654 (default).
HMG exposes 48 MCP tools across core memory, governance, MemoryQL,
observation, secret-vault, panorama, and graph-health workflows. The core
tools below accept an optional context object with scope fields for
branch-aware memory.
Store durable information.
{
"content": "Text to memorize",
"source": "optional-source-label",
"modality": "text",
"context": {
"tenant_id": "tenant-acme",
"workspace": "platform",
"repository": "my-repo",
"branch": "main"
}
}Response:
{
"success": true,
"added_atom_count": 1,
"added_atoms": ["01KSEFSC29QX8RQ78N3110ATC9"],
"snapshot_version": 8
}Retrieve relevant memories.
{
"query": "What database did we choose?",
"max_results": 10,
"response_profile": "compact",
"output_format": "yaml"
}Response profiles: compact (default), summary, full, debug.
Output formats: yaml (default), markdown, json.
Correct, negate, confirm, demote, or replace an atom.
{
"target_atom": "01KSEFSC29QX8RQ78N3110ATC9",
"action": "replace",
"reason": "Database changed to SQLite for simplicity",
"new_content": "Decision: Use SQLite for user data."
}Actions: negate, confirm_actual, confirm_necessary, demote, replace.
Apply governance: quarantine, seal, tombstone, or derive a lesson.
{
"target_atom": "01KSEFSC29QX8RQ78N3110ATC9",
"action": "tombstone",
"reason": "Contains sensitive API key reference"
}Actions: quarantine, seal, tombstone, derive_lesson.
Inspect correction and governance history for an atom.
{
"atom_id": "01KSEFSC29QX8RQ78N3110ATC9"
}Write a cross-session handoff summary.
{
"summary": "Implemented X, validated with Y tests, remaining risk: Z.",
"source": "session-end"
}Get a compact, branch-aware brief at task start.
{
"query": "context for current coding task",
"brief_format": "compact_yaml"
}Get graph and index statistics.
{}Same parameters as memory_memorize, as JSON body.
Same parameters as memory_recall, as JSON body.
Same parameters as memory_correct, as JSON body.
Actions: quarantine, seal, tombstone, derive_lesson.
Returns atom count, edge count, index statistics.
Exports the full memory graph as JSON.
Returns snapshot history for a specific atom.
Returns full audit trail (correction + governance history).
HMG supports hierarchical scope for coding agents:
tenant_id → workspace → repository → branch
↳ task_id
↳ decision_id
When scope fields are provided, recall automatically prioritizes branch-specific memories over broader workspace or tenant memories.
All responses follow a consistent structure:
{
"success": true,
"snapshot_version": 905,
"..."
}Error responses:
{
"success": false,
"error": "description of the error"
}