# AI use cases for Semantix (Gnosil/semantix)

Repo: [Gnosil/semantix](https://github.com/Gnosil/semantix) | Use cases: 4 | Page: https://dedupedai.com/use-cases/gnosil-semantix/

Semantix is a Go coding agent and memory kernel that stores reusable slices from past sessions and reduces repeated model calls through caching.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Carry project conventions into every new coding session: https://dedupedai.com/use-cases/gnosil-semantix/carry-project-memory-across-coding-sessions/
- Measure how often memory reuse hits on your sessions: https://dedupedai.com/use-cases/gnosil-semantix/measure-memory-reuse-on-your-own-sessions/
- Route an OpenAI-compatible client through the gateway: https://dedupedai.com/use-cases/gnosil-semantix/route-openai-compatible-client-through-gateway/
- Give a custom agent lookup and inject tools from Semantix: https://dedupedai.com/use-cases/gnosil-semantix/add-memory-kernel-to-custom-agent-with-tool-schemas/

## How to carry project conventions into every new coding session with Semantix

Repo: [Gnosil/semantix](https://github.com/Gnosil/semantix) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Reuse build rules, test layout and service flags from past sessions instead of re-explaining them.

**Who it is for:** A developer who restarts coding sessions on the same project and keeps re-stating build conventions, test commands and service flags.

**The problem:** A coding agent loses its entire context when a session ends, so project conventions have to be re-established every time.

**The outcome:** Relevant slices from earlier sessions are pulled back into a new session when a similar task appears, with each hit showing its retrieval zone and source session.

### Steps

1. Run `curl -fsSL https://raw.githubusercontent.com/Gnosil/semantix/main/agent-skill/scripts/install.sh | sh` to install Semantix and semantix-agent into ~/.local/bin.
2. Run `cd ~/your-project` to make the project folder the workspace.
3. Run `semantix` to launch the coding agent and finish provider and API key setup on the first run.
4. Run `semantix extract --input session.jsonl --db .semantix/project.db --project demo` on a finished session transcript.
5. Run `semantix inject --query "fix failing go test" --db .semantix/project.db` to see the reuse block for a similar task. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the Gnosil/semantix repo, install it, extract slices from <session.jsonl> into .semantix/project.db, then run semantix inject with a query describing <task>. Report the slices returned with their retrieval zone and source session. Verify that each returned slice names a session that exists in <session.jsonl>.
```

### Caveat

The README's 80% hit rate comes from a small demo library of 4 extracted sessions, so expect different results on your own project.

Risk, remote script: The install command pipes a script from GitHub straight into sh, so read agent-skill/scripts/install.sh before running it.

Risk, credentials: The first run asks for a provider API key, so store it in your own environment and do not paste it into shared logs or prompts.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/gnosil-semantix/carry-project-memory-across-coding-sessions/

## How to measure how often memory reuse hits on your sessions with Semantix

Repo: [Gnosil/semantix](https://github.com/Gnosil/semantix) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the replay gate on your own transcripts and report the hit rate to the v1.0 tracking issue.

**Who it is for:** A maintainer or power user who wants evidence on whether Semantix reuse works on real work, or who wants to contribute to the v1.0 gate.

**The problem:** The README's measurements are replay and demo results, and the v1.0 gate still needs hit rates from real user sessions.

**The outcome:** A replay relevance result for your own sessions, shown against the README's 70% gate, that you can post to issue #58.

### Steps

1. Run `semantix extract --input session.jsonl --db .semantix/project.db --project demo` for each past session you want to test.
2. Run `semantix verify  --session   --project demo` to run the replay gate.
3. Run `semantix dashboard` to get the one-screen snapshot of the library.
4. Post the resulting hit rate to https://github.com/Gnosil/semantix/issues/58.

### Prompt to paste into your agent

```text
Using the Gnosil/semantix repo, extract slices from <session.jsonl> into a project named <project>, then run semantix verify for that project. Report the relevance result against the README's 70% gate and the dashboard output. Verify that the sessions you tested are the ones you extracted and that no transcript content is posted publicly.
```

### Caveat

The replay gate measures relevance on the sessions you supply, and the README says the v1.0 gate is still open, so one result is not a production benchmark.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/gnosil-semantix/measure-memory-reuse-on-your-own-sessions/

## How to route an OpenAI-compatible client through the gateway with Semantix

Repo: [Gnosil/semantix](https://github.com/Gnosil/semantix) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Change one base URL so an existing client gets Semantix caching with no code change.

**Who it is for:** A developer whose team uses an OpenAI-compatible client or tool and wants lower model spend with no code changes.

**The problem:** Provider prefix caches only hit on byte-identical prompts, so small differences near the head of a prompt cause repeated full-price calls.

**The outcome:** Requests from the existing client pass through semantix-gateway, which applies the prefix hygiene and caching behaviour described in the README.

### Steps

1. Install or start semantix-gateway using the instructions in docs/QUICKSTART.md. (inferred, check the README)
2. Set the gateway's upstream provider and API key as described in docs/QUICKSTART.md. (inferred, check the README)
3. Change the existing client's base URL to the address of semantix-gateway.
4. Send a few similar requests and check the cache token counts the provider returns.
5. Compare the per-turn prompt-token hit rate reported by semantix-agent's status line or the provider's usage data.

### Prompt to paste into your agent

```text
Using the Gnosil/semantix repo, point <client> at semantix-gateway by changing only its base URL, then send <N> similar requests. Report the cache token counts returned by the provider for each request. Verify that the client code and request bodies were not changed except for the base URL.
```

### Caveat

The README's cache hit figures are provider-reported and vary by vendor and stack, so the gain you see depends on your provider and workload.

Risk, credentials: The gateway forwards your provider API key, so keep the upstream key in environment variables and restrict who can reach the gateway address.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/gnosil-semantix/route-openai-compatible-client-through-gateway/

## How to give a custom agent lookup and inject tools from Semantix with Semantix

Repo: [Gnosil/semantix](https://github.com/Gnosil/semantix) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Register two tool schemas so a self-hosted agent can query and reuse Semantix memory.

**Who it is for:** An engineer who runs a custom or self-hosted agent and wants its tools to read from the Semantix memory kernel.

**The problem:** A custom agent starts every task without memory of earlier sessions, and rebuilding that memory by hand is slow.

**The outcome:** The agent calls semantix_lookup to find relevant slices and semantix_inject to add them to context, falling back to its normal path on kernel error.

### Steps

1. Run the install command from the README to get the Semantix binaries, or build from source with `go build -o semantix ./cmd/semantix`.
2. Read the tool schemas in agent-skill/tools/ and the hook notes in agent-skill/hooks/session-bypass.md.
3. Register the semantix_lookup and semantix_inject schemas in your agent's tool list.
4. Export a finished session and run `semantix extract --input session.jsonl --db .semantix/project.db --project demo`.

### Prompt to paste into your agent

```text
Using the Gnosil/semantix repo, register the semantix_lookup and semantix_inject tool schemas from agent-skill/tools/ in <agent>. Run one task that should match an extracted session and report which slices the lookup returned. Verify that the agent still completes the task when the semantix binary is removed, since the README says the kernel fails open.
```

### Caveat

The README describes the two tool schemas and hooks but does not give their full parameter lists, so read agent-skill/tools/ before wiring them in.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/gnosil-semantix/add-memory-kernel-to-custom-agent-with-tool-schemas/
