GrayMatter v0.16.3
Persistent memory for Go AI agents. Single binary. Zero infra.
Quick install
go install github.com/angelnicolasc/graymatter/cmd/graymatter@v0.16.3Prebuilt binaries for Linux, macOS and Windows are in the assets below,
with checksums.txt (sha256). Per-platform download commands are in the
README.
Identical contents to 0.16.1/0.16.2, which never produced a release: goreleaser v2 dropped the
gomod.proxybuild option this pipeline initially relied on, and the freshly pushed tag was not yet indexed by the module checksum database for the plain build either. The workflow now applies a temporaryreplaceto the build checkout and reverts it after the release — the publishedgo.modstays replace-free andgo install ...@v0.16.3resolves the tagged versions. 0.16.3 is the first version published with binaries.
Recalldeduplicates identical stored text — the documented contract ("deduplicated by text") is now enforced: storing the same sentence across sessions yields it exactly once per result set. Found by the agent-lifecycle simulation, where repeated session templates stored identical facts.- Tombstones survive concurrent consolidation writebacks (#78). A consolidation cycle's decay pass wrote back its batch snapshot, silently overwriting a tombstone that landed mid-cycle — superseded facts resurrected with
SupersededBy="".UpdateFactandtouchFactsnow enforce update-never-resurrect: when the stored fact is tombstoned and the incoming snapshot is not, the tombstone wins. Found by the new agent-lifecycle simulation; fixed the same day, with the deterministic reproduction (update_never_resurrect_test.go) and the full 100-session re-run reporting 0 superseded facts returned. benchmarks/agent_lifecycle— an end-to-end simulation of one hundred real working sessions: a freshgraymatter mcp serveprocess per session over JSON-RPC stdio (process death between sessions is the durability claim under test), a realistic adversarial corpus with distractor families, a supersede pair, paraphrase and shared-namespace probes, and pre-registered pass/fail bands. Plusbenchmarks/decay_probe, which compresses the 30-day half-life to seconds and verifies decay precision, pin exemption, touch protection and the prune floor. Plusbenchmarks/agent_lifecycle/tombstone_dump, a forensic store dumper.- Registry metadata.
server.json(official MCP registry) andsmithery.yaml(Smithery) let GrayMatter be published and listed across MCP registries. - MCP tool definitions engineered for agent-facing quality (TDQS), pinned by contract tests. Every tool now carries a meaningful title, an opening-verb description with explicit when-to-use guidance and named sibling alternatives, verified return/error disclosure, and fully documented parameters (
top_kdeclares its default; theactionenum is pinned).tdqs_contract_test.golocks the client-visibletools/listshape so description drift becomes a CI failure.docs/AGENTS.mdreturn-shape claims corrected against the real handlers (memory_searchreturns a numbered list, not newline-separated text;checkpoint_resumeerrors when no checkpoint exists). See ADR-012. go install github.com/angelnicolasc/graymatter/cmd/graymatter@versionworks again. The CLI module carried areplacedirective, which makes every tagged version uninstallable viago install(#75); the workspace at the repo root already provides the checkout linkage for in-repo builds. The released CLI now resolves the library at the pinnedv0.15.0, and the release workflow gained an install-smoke job that fails the release if the exact published tag cannot be installed and run.- MCP tools return structuredContent twins with declared output schemas (#76). Every tool publishes an
outputSchemagenerated from typed result payloads; success results carry machine-readablestructuredContentalongside the unchanged text content.checkpoint_resumereturns a typed{error: "not_found", agent_id}payload withisErrorinstead of prose-only errors. Payload↔schema agreement is pinned bystructured_contract_test.go. Text-parsing clients are unaffected — every text string is byte-identical. See ADR-013. memory_reflectdeclaresagent_idin its schema (#77). The alias was previously a runtime-only accommodation invisible to clients readingtools/list; it is now a documented schema property, withagentremaining the required canonical and winning when both are set. Precedence and alias-driven updates are pinned byreflect_schema_test.go; the canonical flip toagent_idis deferred to a dedicated release.agent_idis now the canonical agent parameter onmemory_reflect(#77 step 3, ADR-014). The schema expresses the real contract as ananyOf— exactly one ofagent_id(canonical) oragent(deprecated alias) is required — so callers of either spelling remain schema-valid;agent_idwins when both arrive. Both spellings keep working at runtime. Callers sending both spellings with different agents observe the precedence change; that input is pathological and the new behaviour is the documented one.- Registration-time output-schema generation fails fast (TD-002). mcp-go's
WithOutputSchemaswallows generation errors to stderr and would publish a tool without its declared contract; the newoutputSchemaOf[T]helper panics at registration with the offending type, and generates the schema exactly once per tool. - The MCP wire contract documents concurrent tool-call execution. The stdio server runs a worker pool (default 5), so two pipelined
tools/callrequests may execute out of order; a response guarantees only its own effects. Documented indocs/api-stability.mdrather than "fixed": the concurrency is spec-compliant, benefits real hosts issuing parallel calls, and serialising it would trade genuine throughput for a guarantee the protocol never made (TD-001).