← all repositories
Gnosil/semantix

Fixing AI agents' goldfish memory, one byte-stable prompt at a time

Semantix exists because AI coding agents forget everything between sessions, and provider prefix caches are so byte-fussy that a single edit near the head invalidates the entire prompt.

525 stars Go Coding AssistantsAgents
semantix
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does Semantix is a Go-based memory kernel that either ships as a full coding agent or attaches to one you already use. It extracts reusable slices—task patterns, project knowledge, verified results—from finished sessions into a local scored library, then reinjects the relevant ones when a similar task shows up. The aim is to stop your agent from rediscovering your build conventions every time you open a new terminal tab, while also making provider prefix caches byte-stable so they actually hit.

The interesting bit Instead of treating prompt caching as a free lunch, Semantix treats it as a brittle engineering problem. Provider caches demand byte-identical prefixes, so the kernel orders retrieved slices by ID rather than score, strips per-request attribution markers like Claude Code’s billing header, and canonicalizes tool arrays. The README cites a spec attributing a 133× hit-rate difference to a single un-stripped header, and notes that a week-long GLM study found the same model behind different hosts holding prefixes for 1–8 minutes on one stack and roughly 2–5 minutes on another.

Key highlights

  • Ships as both a standalone kernel (semantix) and a bundled agent (semantix-agent), with gateway, tool-registration, and hook-based integration paths for Claude Code, LangChain, and any OpenAI-compatible client.
  • Claims a 79.8% cost reduction in synthetic replays and an 80% L2/L3 cache hit rate on a four-session demo library; the authors explicitly label these replay measurements, not production benchmarks.
  • Fail-open by design: if the kernel errors, the agent falls back to its normal execution path without blocking.
  • Real-world validation is the open v1.0 gate: the maintainers are asking users to run semantix verify on their own sessions and post hit rates to issue #58.

Caveats

  • The eye-catching cost and cache-hit numbers come from synthetic replays and a tiny demo library; the README openly states these are not production benchmarks, and crowdsourced validation is still underway.
  • The project is early-stage software at v0.7.3, so architectural assumptions are still being tested.

Verdict Worth a look if you are tired of re-explaining your repo structure to Claude Code every morning, or if you run a self-hosted agent and want a harness-independent memory layer. Skip it if you need mature, production-guaranteed tooling today—the authors are still collecting real-world hit rates to clear their own v1.0 gate.

Frequently asked

What is Gnosil/semantix?
Semantix exists because AI coding agents forget everything between sessions, and provider prefix caches are so byte-fussy that a single edit near the head invalidates the entire prompt.
Is semantix open source?
Yes — Gnosil/semantix is open source, released under the MIT license.
What language is semantix written in?
Gnosil/semantix is primarily written in Go.
How popular is semantix?
Gnosil/semantix has 525 stars on GitHub.
Where can I find semantix?
Gnosil/semantix is on GitHub at https://github.com/Gnosil/semantix.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.