OKF Agent Memory
A Domain-Neutral, Git-Native Persistent Project Memory for AI Agents based on the Open Knowledge Format (OKF) v0.2.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
A Domain-Neutral, Git-Native Persistent Project Memory for AI Agents based on the Open Knowledge Format (OKF) v0.2.
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.
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:
[!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
# 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 peter/django-5-rules
./bin/okf pull github.com/acme/[email protected]
# Restore all locked vendor bundles in fresh environments
./bin/okf restore
# 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 Hierarchy"]
P["<b>Project</b> (Priority 100)<br/>Prefix: <i>none</i> (e.g. decisions/auth)<br/>Location: ./knowledge/"]
V["<b>Vendor</b> (Priority 70)<br/>Prefix: @bundle/... (e.g. @nextjs-15/routing)<br/>Location: .okf/vendor/"]
U["<b>User</b> (Priority 50)<br/>Prefix: user:... (e.g. user:guidelines/style)<br/>Location: ~/.okf/"]
S["<b>System</b> (Priority 10)<br/>Prefix: system:... (e.g. system:corp/policy)<br/>Location: /etc/okf/"]
end
P -->|shadows| V
V -->|shadows| U
U -->|shadows| S
# Default (--scope all): Search across all layers with automatic shadowing & priority ranking
./bin/okf search "authentication"
# Search strictly within vendor packages
./bin/okf search "routing" --scope vendor
# Search strictly within local project memory (or use alias --scope bundle)
./bin/okf search "architecture" --scope project
# Search user or system layers
./bin/okf search "style" --scope user
./bin/okf search "compliance" --scope system
# Inspect concepts across scopes
./bin/okf show decisions/auth # Local project concept
./bin/okf show @nextjs-15/decisions/routing # Vendor package concept
./bin/okf show user:guidelines/style # Personal user concept
./bin/okf show system:corp/policies # System compliance concept
Scaffold the complete OKF Agent Memory architecture into any new or existing repository with a single command:
# Bootstrap full memory stack into target project
./bin/okf bootstrap /path/to/my-project --name "My Service"
This automatically sets up:
knowledge/ — OKF v0.2 compliant persistent memory bundle (index.md, log.md).agents/skills/okf-memory/ — Embedded agent skill definition and capability guidesAGENTS.md — Project-tailored operating instructions for AI coding agentsMakefile — Convenience tasks for validation (make validate) and search (make search q="...")okf ships with a native Model Context Protocol (MCP) server over stdio to seamlessly connect with Claude Code, Cursor, Codex, and other agent platforms:
./bin/okf mcp knowledge
claude_desktop_config.json or Cursor):{
"mcpServers": {
"okf-memory": {
"command": "/path/to/okf-agent-memory/bin/okf",
"args": ["mcp", "/path/to/project/knowledge"]
}
}
}
okf-agent-memory/
├── .agents/ # Active agent skills and agent configuration
│ └── skills/okf-memory/ # Authoritative OKF memory skill for AI agents (Single Source of Truth)
├── benchmarks/ # Progressive disclosure benchmark suite & hardware test data
│ ├── data/ # Monolith docs vs OKF bundle test fixtures
│ └── results/ # Reproducible benchmark logs across 8+ local & cloud LLMs
├── cmd/
│ ├── okf/ # Standalone CLI and embedded MCP server (`stdio`)
│ └── okf-benchmark/ # Automated benchmark runner for LLM TTFT & token measurements
├── docs/ # Guides, specifications, architecture & release playbook
│ ├── README.md # Central documentation index & navigation
│ ├── guides/ # User guides, CLI/MCP reference & AI instruction best practices
│ ├── spec/ # OKF convention v0.1, compatibility analysis & architecture RFCs
│ ├── security/ # Data governance, secret prevention & adversarial security audits
│ ├── project/ # Project roadmap, release playbook & multi-agent testing
│ └── releases/ # Versioned release notes & changelog archive (v0.1.0 - v0.6.0)
├── examples/ # Domain-neutral reference DMAA projects (AGENTS.md + OKF v0.2 knowledge/)
│ ├── books/ # Literature & editorial analysis repository
│ ├── coaching/ # Executive coaching & client session repository
│ └── software/ # Microservices architecture & ADR engineering repository
├── knowledge/ # Project's own OKF v0.2 persistent memory bundle
│ ├── index.md # Root progressive disclosure index (okf_version: "0.2")
│ ├── log.md # Dated change log (ISO 8601 YYYY-MM-DD)
│ ├── project/ # Overview & value propositions
│ ├── architecture/ # 5-tier architecture, governance model & decisions
│ ├── convention/ # Principles & lifecycle workflows
│ └── roadmap/ # Milestones
├── packaging/ # Distribution packaging
│ └── homebrew/ # Official Homebrew formula & tap instructions
├── pkg/
│ ├── lock/ # Zero-dependency okf.lock parser & serializer
│ ├── okf/ # Core library (parser, validator, BM25, MCP, bootstrap)
│ │ └── assets/ # Embedded bootstrap templates & skills mirrored via `make sync-assets`
│ ├── registry/ # Decentralized OKF Registry client & archive unpacker
│ ├── sync/ # Blind sync engine, 3-way reconcile & hub client/server
│ └── vault/ # AES-256-GCM envelope crypto, Argon2id KDF & CAS blind storage
├── scripts/ # Verification & automated audit review helpers (e.g. Jules integration)
├── AGENTS.md # Operating instructions for AI coding agents
├── CONTRIBUTING.md # Contribution guidelines & development workflow
├── CONTRIBUTORS.md # Community contributors & acknowledgements
├── CODE_OF_CONDUCT.md # Contributor Covenant v2.1 code of conduct
├── Makefile # Build, test, lint, validation & release targets
├── LICENSE # MIT License
├── README.md # Main repository documentation
└── SECURITY.md # Security policy & reporting guidelines
Run the full test suite and validate the repository's self-documenting knowledge bundle:
make check
AGENTS.md.Thank you to all the wonderful contributors who have helped build and refine OKF Agent Memory!
Contributions of all kinds are warmly welcomed! See CONTRIBUTING.md and CONTRIBUTORS.md for details.
If you find OKF Agent Memory valuable for your autonomous agent workflows, consider sponsoring the project on GitHub to help support continuous development, security hardening, and spec compliance!
MIT License. See LICENSE for details.
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 zer
ภาพรวม
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.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Okf Agent Memory ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-26 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.