# AI use cases for Okf Agent Memory (okf-memory/okf-agent-memory)

Repo: [okf-memory/okf-agent-memory](https://github.com/okf-memory/okf-agent-memory) | Use cases: 4 | Page: https://dedupedai.com/use-cases/okf-memory-okf-agent-memory/

A Go command-line tool and library that keeps AI agent project memory as a Git-native OKF v0.2 knowledge bundle, with validation, search, and an embedded MCP server.

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

- Validate a project knowledge bundle before each commit: https://dedupedai.com/use-cases/okf-memory-okf-agent-memory/validate-knowledge-bundle-in-ci/
- Let a coding agent search project decisions before writing code: https://dedupedai.com/use-cases/okf-memory-okf-agent-memory/give-coding-agent-searchable-project-memory/
- Look up rules across project, vendor, user, and system scopes: https://dedupedai.com/use-cases/okf-memory-okf-agent-memory/share-rules-across-personal-and-vendor-scopes/
- Measure token and latency savings on a local model: https://dedupedai.com/use-cases/okf-memory-okf-agent-memory/benchmark-token-savings-on-local-llm/

## How to validate a project knowledge bundle before each commit with Okf Agent Memory

Repo: [okf-memory/okf-agent-memory](https://github.com/okf-memory/okf-agent-memory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Check OKF conformance, broken links, orphans, and description drift on every change.

**Who it is for:** A developer or DevOps engineer maintaining a repo's knowledge/ folder who wants bad memory caught before it merges.

**The problem:** Knowledge notes drift out of sync, links break, and orphaned concepts pile up, so agents read wrong context.

**The outcome:** A pass or fail result for graph integrity and a quality score for the bundle, usable in a pre-commit or CI step.

### Steps

1. Clone the repository and run `make build` to create bin/okf.
2. Run `./bin/okf validate knowledge --strict --drift` to check conformance, graph connectivity, and description drift.
3. Run `./bin/okf validate knowledge --scorecard` to see the three-pillar breakdown and grade.
4. Run `./bin/okf validate knowledge --scorecard --json` to get machine-readable output for a pipeline.
5. Fix any reported broken links, orphans, or drift, then re-run the strict validation before committing.

### Prompt to paste into your agent

```text
Use the okf-memory/okf-agent-memory repo to validate the knowledge bundle at <path-to-repo>/knowledge. Run the strict and drift validation, then the scorecard, and report the grade and every broken link or orphan. Verify that the command exit status is 0 before reporting the bundle as clean.
```

### Caveat

The README excerpt cuts off the exact CI gating example, so confirm the threshold flag in the full README before wiring it into a pipeline.

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/okf-memory-okf-agent-memory/validate-knowledge-bundle-in-ci/

## How to let a coding agent search project decisions before writing code with Okf Agent Memory

Repo: [okf-memory/okf-agent-memory](https://github.com/okf-memory/okf-agent-memory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Store decisions as OKF concepts and have the agent search them before it edits anything.

**Who it is for:** A developer using an AI coding agent who keeps re-explaining architecture decisions and gets inconsistent code as a result.

**The problem:** Context windows reset, so architectural decisions and operational facts are lost unless stored somewhere the agent can find them.

**The outcome:** The agent looks up relevant decisions with search and show before acting, instead of relying on a monolithic AGENTS.md.

### Steps

1. Run `make build` in the cloned repository to create bin/okf.
2. Add a concept file for a decision under the knowledge/ folder, such as decisions/auth.md.
3. Run `./bin/okf validate knowledge --strict --drift` to confirm the new concept is well formed.
4. Run `./bin/okf search "authentication"` to confirm the concept is found by a plain-language query.
5. Run `./bin/okf show decisions/auth` to confirm the full concept text is returned for the agent to read.

### Prompt to paste into your agent

```text
Using the okf-memory/okf-agent-memory repo, search the project knowledge for <topic> with the okf search command before you write any code. Report the concept IDs returned and the decision each one records. Verify that you read the full concept with the show command before making changes.
```

### Caveat

The README describes an embedded MCP server and the okf_search and okf_show tools, but the excerpt does not show how to register them with a specific agent, so check the full docs for that setup.

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/okf-memory-okf-agent-memory/give-coding-agent-searchable-project-memory/

## How to look up rules across project, vendor, user, and system scopes with Okf Agent Memory

Repo: [okf-memory/okf-agent-memory](https://github.com/okf-memory/okf-agent-memory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Find a concept in the right layer, with higher-priority scopes shadowing lower ones.

**Who it is for:** A developer who keeps personal style notes and vendor framework rules alongside a project and needs the agent to pick the right one.

**The problem:** Guidance lives in several places, and an agent can pick an outdated or wrong version without a clear precedence order.

**The outcome:** Searches and lookups return the authoritative concept, with project content overriding vendor, user, and system content.

### Steps

1. Run `make build` to create bin/okf.
2. Run `./bin/okf search "authentication"` to search all scopes with automatic shadowing and priority ranking.
3. Run `./bin/okf search "routing" --scope vendor` to limit the search to vendor packages.
4. Run `./bin/okf show user:guidelines/style` to read a personal concept by its scoped name.
5. Run `./bin/okf show decisions/auth` to read the local project concept, which takes priority over other scopes with the same ID.

### Prompt to paste into your agent

```text
Using the okf-memory/okf-agent-memory repo, search for <topic> across all scopes, then show the concept the search ranks first. Report which scope it came from and whether a higher-priority scope shadows any other matching concept. Verify the scope label before using the concept.
```

### Caveat

Vendor packages and the user and system layers only return results if those folders are populated, and the README excerpt does not explain how to install vendor packages.

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/okf-memory-okf-agent-memory/share-rules-across-personal-and-vendor-scopes/

## How to measure token and latency savings on a local model with Okf Agent Memory

Repo: [okf-memory/okf-agent-memory](https://github.com/okf-memory/okf-agent-memory) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Run the bundled benchmark suite to check the claimed token reduction on your own hardware.

**Who it is for:** A developer or researcher evaluating whether progressive disclosure cuts prompt size for a locally hosted model.

**The problem:** The repo claims large token and latency gains, and a team wants to check those numbers on its own machine before adopting the approach.

**The outcome:** A local benchmark run that reports time-to-first-token and token counts for the progressive disclosure setup.

### Steps

1. Run `make build` to create the tooling.
2. Start a local model server such as LM Studio or Ollama, as the README suggests.
3. Run `make benchmark` from the repository root.
4. Open the Progressive Disclosure Benchmark Suite in the benchmarks/ folder to read the setup and output.
5. Compare the time-to-first-token and token results against the README's claims for your own hardware and model.

### Prompt to paste into your agent

```text
Using the okf-memory/okf-agent-memory repo, run the make benchmark target against the local model server at <endpoint>. Report time-to-first-token and token counts for the run and compare them with the README's claimed reduction. Verify that the benchmark used the local model and not a remote API.
```

### Caveat

The README's headline figures for speed and token reduction are the author's claims, and the benchmark results will depend on your model and hardware.

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/okf-memory-okf-agent-memory/benchmark-token-savings-on-local-llm/
