by okf-memory
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
# Add to your Claude Code skills
git clone https://github.com/okf-memory/okf-agent-memoryGuides for using ai agents skills like okf-agent-memory.
Last scanned: 9/9/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-09-09T08:40:14.025Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how okf-agent-memory compares with popular alternatives.
okf-agent-memory is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by okf-memory. Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go. It has 831 GitHub stars.
Yes. okf-agent-memory passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/okf-memory/okf-agent-memory" and add it to your Claude Code skills directory (see the Installation section above).
okf-agent-memory is primarily written in Go. It is open-source under okf-memory on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh okf-agent-memory against similar tools.
No comments yet. Be the first to share your thoughts!
30 days in the Featured rail · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
A Domain-Neutral, Git-Native Persistent Project Memory for AI Agents based on the Open Knowledge Format (OKF) v0.2.
Conversations with AI agents reset when context windows close. Valuable architectural decisions, domain discoveries, and operational facts are lost unless stored persistently.
Traditional approaches suffer from two fatal failure modes:
AGENTS.md or CLAUDE.md creates massive context bloat and causes attention drift (agents ignore critical instructions).OKF Agent Memory resolves this dilemma with the Dual-Memory Agent Architecture (DMAA):
flowchart TD
subgraph PUSH["1. Normative Working Memory (Push Layer)"]
direction TB
C1["Canonical AGENTS.md (capped at 400 tokens)"]
C2["Domain Codex (Invariants, Ethics, Tone)"]
C3["OKF Memory Bridge (Deterministic Triggers)"]
C4["Agent Action Grammar (AAG) Micro-Syntax"]
end
subgraph PULL["2. Semantic Domain Memory (Pull Layer)"]
direction TB
O1["OKF v0.2 Knowledge Bundle (knowledge/)"]
O2["0 Tokens baseline in system prompt"]
O3["Selective Retrieval via okf_search / okf_show"]
O4["Persistent Graph of Decisions, Facts & Runbooks"]
end
INPUT["User Request"] --> PUSH
PUSH -->|Enforces Domain Codex & Triggers| AGENT["AI Agent (LLM)"]
AGENT -->|Selective Retrieval| PULL
PULL -->|Context & Facts| AGENT
AGENT --> OUTPUT["Deterministic Response"]
In DMAA, every agent configuration is structured by a universal composition:
$$\text{AGENTS.md} = \underbrace{\text{Domain Codex (AAG)}}{\text{Project Invariants, Tone, Guardrails}} + \underbrace{\text{OKF Memory Bridge}}{\text{Standardized Triggers: Search-Before-Write}}$$
knowledge/) that consumes 0 tokens at baseline and is queried on-demand in microseconds.flowchart TD
L1["1. OKF v0.2 Specification<br/>(Normative Markdown & YAML Format)"]
L2["2. Agent Memory Convention & DMAA<br/>(Dual-Memory Model, Search-Before-Write, Trust)"]
L3["3. Agent Skill & AAG Codex<br/>(Agent Action Grammar, Workflows, Triggers)"]
L4["4. Tooling Layer: Go Library & CLI<br/>(Deterministic Parsing, Validation, BM25, MCP)"]
L5["5. Project Knowledge Corpus<br/>(knowledge/ OKF Bundle)"]
L1 --> L2
L2 --> L3
L3 --> L4
L4 --> L5
AGENTS.md codex) from semantic pull domain memory (knowledge/ bundle), completely eliminating prompt bloat.git diff and git log. No external database required.sources), trust tiers (generated vs. verified), and lifecycle metadata (status, stale_after).index.md files and link graphs) so agents only load the exact concepts they need.code_refs and query active constraints/holds via --for-path before modifying code.Built in Go with zero external dependencies, okf is engineered for high-frequency agent tool calling loops:
| Benchmark Metric | Python / Vector DB Runtimes (Mem0, Letta) | Deno / Node.js Tooling | OKF Agent Memory (Go) |
|---|---|---|---|
| Concept Search Latency | 150ms – 800ms (Embedding API + Vector DB) | 40ms – 120ms | < 300 µs (Microseconds, In-Memory BM25) |
| Full Corpus Parse & Graph Validation | 200ms – 1.5s | 80ms – 250ms | ~4.0 ms (50+ concepts, bidirectional graph) |
| Process Cold-Start Overhead | 250ms – 600ms (Python VM boot) | 80ms – 180ms (V8 / Deno boot) | < 4 ms (Compiled Single Binary) |
| Retrieval Cost per 1,000 Queries | ~$0.10 – $0.50 (Embedding tokens) | $0.00 | $0.00 (Zero API cost, fully local) |
| Memory Footprint (RSS) | ~120 MB – 350 MB | ~60 MB – 140 MB | < 15 MB |
[!TIP] Reproduce Locally with your own LLM: We provide an automated benchmark runner in pure Go to verify Time-To-First-Token (TTFT) speedups and -80% token reduction on your local hardware (LM Studio / Ollama with Gemma, Qwen, Llama). Run
make benchmarkor explore the Progressive Disclosure Benchmark Suite.
Clone the repository and compile the standalone okf executable:
make build
This generates the standalone binary at bin/okf.
# Validate bundle conformance, graph connectivity, and description drift
./bin/okf validate knowledge --strict --drift
# Evaluate bundle quality scorecard (3 pillars: maintenance, stewardship, integrity)
./bin/okf validate knowledge --scorecard
# Gate bundle quality in CI or pre-commit pipelines (fails if score < 80)
./bin/okf validate knowledge --min-score 80
# Search concepts via in-memory BM25 scoring
./bin/okf search "architecture layers" knowledge
# Discover constraints and active holds governing a specific source file before editing
./bin/okf search --for-path pkg/okf/types.go knowledge
# Inspect a concept and its relationships (with --json support)
./bin/okf show architecture/layers knowledge --json
# Create a new concept with automated log.md and index.md bookkeeping
./bin/okf create decisions/auth-flow knowledge \
--type Decision \
--title "OAuth2 Authorization Flow" \
--desc "Standardized on PKCE for client authentication."
# Update an existing concept
./bin/okf update decisions/auth-flow knowledge \
--desc "Updated OAuth2 PKCE token refresh interval."
# Bootstrap full agent memory stack into any target project
./bin/okf bootstrap /path/to/project --name "My Project"
# Initialize only a bare OKF bundle in any directory
./bin/okf init my-project/knowledge
# Zero-Knowledge Sync: initialize vault and print Emergency Kit
./bin/okf hub init-vault knowledge
# Zero-Knowledge Sync: push or sync changes with the Hub (optional: --token or OKF_HUB_TOKEN)
./bin/okf hub push knowledge --password "pass" --secret-key "XXXX-..." --auth-token "my-token"
./bin/okf hub sync knowledge --password "pass" --secret-key "XXXX-..."
# Pull external knowledge bundles from OKF Registry (registry.okf-memory.dev) or Git
./bin/okf pull nextjs-15
./bin/okf pull nextjs-15 --min-score 80 # Gate bundle quality before installation
./bin/okf pull peter/django-5-rules
./bin/okf pull github.com/acme/agent-rules@v1.0.0
# Restore all locked vendor bundles in fresh environments
./bin/okf restore
./bin/okf restore --min-score 80 # Gate all restored bundles
# Inspect and manage installed vendor bundles
./bin/okf vendor list
./bin/okf vendor remove nextjs-15
OKF Agent Memory organises knowledge across four deterministic memory scopes. Higher layers strictly shadow identical concept IDs in lower layers during search, ensuring local project decisions always take precedence over external upstream packages or machine baselines:
flowchart TD
subgraph Scopes ["OKF 4-Tier Memory