v1.7.6 Public docs release Free Community Edition

Long-Term Memory
for Coding Agents

HMG is a local-first memory kernel that gives coding agents branch-aware context, correction history, and governed recall across sessions.

curl -fsSL https://github.com/HMG-AI/HMG-public/releases/latest/download/install.sh | sh
Apache-2.0 Protocol Rust runtime Linux · macOS MCP / HTTP / SDK 10 languages
memory_agent_briefsoftware-engineering · compact_yaml
hmg_brief_v2:
  scope: "tenant/platform/HMG/main"
  status: "public docs synced to v1.7.6"
  decisions:
    - "generated from export/docs"
    - "coding-agent memory is the wedge"
  risks: ["verify branch scope"]
  next_steps: ["run drift checks"]
47
MCP surfaces
100K
Community atoms
4
Release platforms
10
Site languages

What changed in v1.7.6

A reliability-focused release for real coding-agent sessions: stricter MCP behavior, agent-native extraction, and clearer recall output.

Stricter client compatibility

Spec-correct MCP ping, capability probes, and daemon-proxy fallback keep HMG usable when strict clients or store locks would otherwise interrupt a session.

Agent-native extraction

DomainLens keeps software-engineering entities, relations, and recall views explicit, so branch, task, decision, and risk context survive between runs.

Answer before context

Recall marks the primary answer cluster separately from supporting same-scope context. Agents can act on the answer first and still audit the evidence.

The agent memory problem

Coding agents lose project decisions, branch assumptions, rejected approaches, and handoff notes between sessions. HMG turns that work history into governed recall.

Memorize decisions

Persist decisions, root causes, constraints, validation results, and next steps as typed graph atoms with scope and provenance.

Recall the right scope

Hybrid semantic + keyword retrieval and graph projection return context for the current workspace, repository, branch, and task.

Correct stale knowledge

Replace or demote wrong memories without erasing history. Future recalls prefer the canonical answer and retain lineage.

Govern sensitive facts

Quarantine, seal, tombstone, or derive safe lessons so ordinary recall stays useful without leaking governed payloads.

Memory primitives

HMG is not a vector database wrapper. It combines typed memory atoms, branch-aware scope, correction lineage, governance state, and agent-readable output.

One-shot task brief

One MCP call returns current status, prior decisions, unresolved risks, next steps, and knowledge gaps for the next agent turn.

Branch-aware scope

tenant → workspace → repository → branch. Memories stay isolated where they should, and merge-time context remains traceable.

Governance control plane

Quarantine, seal, tombstone, and derive lessons with policy tags and audit context carried through the recall path.

Local-First

Embedded storage, zero external dependencies. Data stays local, works offline.

47 MCP Tools

Core memory, governance, MemoryQL, observation, vault, panorama, and graph-health workflows.

Open Protocol

hmg-protocol (Apache-2.0) standalone crate defines types and serialization for all memory operations.

Get a working memory loop in 5 minutes

Install → automatic readiness → connect an agent

Terminal
$ curl -fsSL https://github.com/HMG-AI/HMG-public/releases/latest/download/install.sh | sh
  Installing HMG v1.7.8 for x86_64-unknown-linux-gnu...
  HMG v1.7.8 installed, configured, and ready

$ hmg doctor
  Core ready · store ready · daemon ready

$ hmg license status
  Edition: Community (free)
  Atoms: 100,000 limit | Used: 0
# Store a decision
$ curl -s -X POST http://127.0.0.1:7654/api/memorize \
  -H 'Content-Type: application/json' \
  -d '{"content": "Decision: use Rust for performance-critical paths"}'

# Recall
$ curl -s http://127.0.0.1:7654/api/recall \
  -d '{"query": "what language did we choose?"}'
// Agent MCP config (e.g., in AGENTS.md or .cursor/mcp.json)
{
  "mcpServers": {
    "hmg": {
      "command": "hmg",
      "args": ["--mcp"]
    }
  }
}

// Agent tools become available:
// memory_memorize, memory_recall, memory_correct,
// memory_govern, memory_history, memory_handoff,
// memory_agent_brief, memory_stats

Editions

Single binary, runtime edition detection. No reinstall needed.

Community

Free
Personal use, no license key needed
  • 100,000 memory atoms
  • 5 agents / instance
  • 47 MCP tools
  • Correction + Governance
  • Open protocol (Apache-2.0)
  • TUI dashboard
  • One-Shot Recall
  • Observation capture
  • Vector semantic search

Enterprise

Contact Us
Teams & organizations
  • Unlimited everything
  • All Developer features
  • SSO / RBAC
  • Audit export
  • All domain packs
  • API key management
  • Priority support
  • Custom domain packs

Agent memory loop

Each session writes usable context for the next. Decisions persist, corrections keep lineage, and governance defines what normal recall can see.

Memory lifecycle
capture → canonicalize → recall → correct → govern → consolidate → brief next session

# Session 1: Store a decision
memory_memorize(content="Decision: use Rust for performance-critical paths")

# Session 2: Agent wakes up with full context
memory_agent_brief(domain_pack_id="software-engineering")
  → scope: tenant/platform/repo/main
  → decisions: "use Rust for perf paths"
  → risks: "WASM integration not yet validated"
  → next_steps: "benchmark Rust vs Go paths"

# Session 3: Correct stale knowledge
memory_correct(target_atom="01ABC...", action="replace",
  new_content="Use Rust + WASM for cross-platform perf")

# Session 4: Govern sensitive data
memory_govern(target_atom="01DEF...", action="seal",
  reason="contains internal API endpoint")

Coding-agent workflows

Four daily flows where HMG acts as memory infrastructure, not just retrieval.

1. Task brief — start with context

Before editing code, the agent recalls prior decisions, constraints, risks, and next steps for the active scope.

memory_agent_brief(
  domain_pack_id="software-engineering",
  brief_format="compact_yaml",
  language="en"
)
POST /api/agent-brief
Content-Type: application/json

{"domain_pack_id": "software-engineering",
 "brief_format": "compact_yaml"}
hmg brief --domain software-engineering

Agent-readable output

hmg_brief_v2:
  scope: "tenant/platform/repo/main"
  engine: one_shot_recall
  answer: |
    Sprint 3 completed with RBAC v2.
    Key decision: use Redis for session cache.
    Rejected: JWT-only (no revocation).
  sources:
    - "01KSC7J75FVQHC5TCHGA1JQRWS"
  related: []
  gaps: []
  validate_hint: "Query-directed recall"

2. Decision trace — stop re-arguing settled choices

Store decisions with rationale and rejected alternatives, so later sessions know both the choice and why it was made.

# Store a decision with rationale
memory_memorize(
  content="Decision: use PostgreSQL 16 over MongoDB for ACID compliance",
  source="ADR-014",
  modality="text"
)

# Later: recall the decision and its context
memory_recall(query="Why did we choose PostgreSQL?")
  → "Decision: use PostgreSQL 16 over MongoDB for ACID compliance"
  → source: ADR-014
  → related: ["data integrity requirements", "transaction guarantees"]

3. Correct stale memory — fix the canonical answer

When a memory becomes wrong or outdated, replace it while preserving the old version in correction history.

# Old (incorrect) memory:
"API runs on port 8080"

# Replace with correct value:
memory_correct(
  target_atom="01PORT...",
  action="replace",
  new_content="API runs on port 7654",
  reason="changed in config.rs v0.9.2"
)

# Subsequent recall returns:
memory_recall(query="what port does the API use?")
  → "API runs on port 7654" # canonical

Correction history

memory_history(atom_id="01PORT...")

  # Returns full lineage:
  v1: "API runs on port 8080"        # original
  v2: "API runs on port 7654"       # canonical ✓
  correction_reason: "changed in config.rs"
  correction_timestamp: 2026-05-29T...
  superseded: v1 → v2

4. Govern sensitive memory — control recall visibility

Seal, quarantine, tombstone, or derive lessons. Governed memories stay out of normal recall while audit can still explain what happened.

seal
Hide payload while keeping metadata. Normal recall skips it.
tombstone
Mark as deleted. Payload handling follows policy.
derive_lesson
Extract a safe lesson and seal the sensitive original.
memory_govern(
  target_atom="01SENS...",
  action="derive_lesson",
  reason="contains customer PII",
  lesson_content="Customer data must be encrypted at rest (derived from incident 2026-05-28)"
)

# Normal recall: invisible
memory_recall(query="customer incident")
  → # (no governed results returned)

# Audit recall: lesson visible
memory_recall(query="customer incident", mode="audit")
  → "Customer data must be encrypted at rest"

Troubleshooting

Common issues and how to fix them.

Daemon Issues

  • Port conflict: hmg daemon stop && hmg daemon start --port 3001
  • Permission denied: Check ~/.local/share/hmg/ ownership
  • Not starting: Run hmg doctor for diagnostics
  • Stale lock: Remove ~/.local/share/hmg/stores/default/.lock

MCP Connection

  • Tool not found: Verify hmg --mcp runs in terminal
  • Timeout: Increase startup_timeout_sec in MCP config
  • Agent can't connect: Check daemon is running: hmg daemon status
  • Wrong edition: hmg license status shows active edition

License & Edition

  • Apply license: hmg license apply <key>
  • Check status: hmg license status
  • Store location: ~/.local/share/hmg/stores/

hmg doctor

Run hmg doctor to check: edition, store path, daemon, MCP readiness, agent adapters, and disk usage.

$ hmg doctor
  Edition: Community
  Store: ~/.local/share/hmg/stores/default
  Daemon: running on :7654
  MCP: ready
  Agents: pi, cursor
  Disk: 12MB / 100K atom limit
  ✅ All checks passed

SDKs & Integrations

Official Python and TypeScript SDKs covering the full Community Edition API.

Python hmg-sdk

pip install hmg-sdk

import hmg
client = hmg.HmgClient()
client.memorize("key decision: use Rust")

TypeScript @hmg_ai/sdk-ts

npm install @hmg_ai/sdk-ts

import { HmgClient } from "@hmg_ai/sdk-ts";
const client = new HmgClient();
await client.memorize({content: "noted"});

Community

Open protocol, open communication, open contributions.

Open Protocol

hmg-protocol (Apache-2.0) defines types and serialization for memory atoms, corrections, governance, and scope.

Contributing

Contributions welcome! Read CONTRIBUTING.md, submit a PR or Issue.

Security

Found a vulnerability? Disclose privately via GitHub Security Advisories. 48-hour response commitment.