Trust metadata for AI agents — a stamp costs ~15 tokens, re-verifying costs 15,000. Agents stamp what they verify; the next agent runs 'akf check' and builds on it. pip install akf
> /plugin marketplace add HMAKT99/AKF> /plugin install akf@akf
Repo: HMAKT99/AKF
What's inside
Don't install AKF yourself — let your agent do it. Paste this into Claude Code, Cursor, OpenClaw, or any coding agent:
Install AKF (pip install akf, or pipx install akf) and set it up: run `akf init --git-hooks`.
From now on:
- After you create or modify a file, stamp it:
akf stamp <file> --agent <your-id> --evidence "<what you verified, e.g. 42/42 tests passed>"
- Before building on any existing file, check it first:
akf check <file>
OK = fresh stamp with verified evidence, skip re-verification. STALE/LOW/UNSTAMPED = verify before trusting.
If you support MCP, also register the server: {"mcpServers":{"akf":{"command":"python","args":["-m","mcp_server_akf"]}}}
Your agent installs its own provenance layer — and every file it touches carries trust metadata from then on.
Agents redo work constantly: re-read files, re-run tests, re-derive conclusions — because nothing tells them what was already verified. A stamp is cached verification state:
# Session 1 — agent fixes auth, tests pass
$ akf stamp auth.py --agent claude-code --evidence "42/42 tests passed"
# Session 2 — tomorrow, any agent, any tool
$ akf check auth.py
OK trust=0.65 agent=claude-code evidence=test_pass age=1d claims=1
# → build on it, skip re-verification
# Someone edits auth.py without re-testing
$ akf check auth.py
STALE trust=0.65 agent=claude-code evidence=test_pass age=1d claims=1 reason=modified_after_stamp
# → re-verify before trusting (exit code 1 — gate CI or hooks on it)
Stamps are trail markers agents leave for other agents — across sessions, across tools (Claude Code → Cursor → Copilot), across teams. Humans get the same trail: who made this file, AI or human, was it tested, can we trust it.
| What travels with the file | How |
|---|---|
| Trust score | 0–1 confidence, weighted by evidence and source tier |
| Verification evidence | tests passed, type check clean, human reviewed — with timestamps |
| Source provenance | SEC filing → analyst → AI agent chain |
| Compliance | One command: akf audit file --regulation eu_ai_act |
A signature proves who said it; a replay proves it could have been true. A stamp can carry a falsifiable probe recipe, so the next agent re-verifies the claim instead of trusting the label:
# Stamp with a recipe that can be re-run
$ akf stamp auth.py --agent claude-code --evidence "42/42 tests passed" --replay "pytest -q"
# Later — re-run the probe instead of trusting the stamp
$ akf replay auth.py --run
CONFIRMED inputs=intact
# A dependency moved since the stamp was written
$ akf replay auth.py --run
CONFIRMED_DRIFTED inputs=drifted # probe still passes, but against a changed world — re-check
REFUTED when the probe fails, UNREPLAYABLE when there's no recipe. This is the answer to "a trusted source can still be wrong": trust stops depending on who signed it, for any claim with a runnable check.
pip install akf # Python
npm install akf-format # TypeScript / Node.js
akf doctor # Check your install — detects PATH issues and guides setup
akfcommand not found? Runakf doctorto auto-detect your setup, or usepython3 -m akf(always works).
- Install with pipx:
pipx install akf(recommended — auto-handles PATH)- Windows: use
python3 -m akfor install viapipx
# The core loop — stamp what you verified, check before you trust
akf stamp auth.py --agent claude-code --evidence "42/42 tests passed"
akf check auth.py # OK trust=0.65 agent=claude-code evidence=test_pass age=0d
import akf
# Same loop from Python
akf.stamp_file("auth.py", agent="claude-code", evidence=["42/42 tests passed"])
result = akf.check_file("auth.py")
print(result.summary_line()) # OK trust=0.65 agent=claude-code evidence=test_pass age=0d claims=1
# Embed into Office docs, PDFs, images — any format
akf.embed("report.docx", claims=[...], classification="confidential")
# Audit for compliance (EU AI Act, HIPAA, SOX, GDPR, NIST AI, ISO 42001)
result = akf.audit("report.akf", regulation="eu_ai_act")
print(f"Compliant: {result.compliant}")
TypeScript / Node.js (akf-format):
import { create, validate, effectiveTrust, stampFile } from 'akf-format';
// Create a trust-stamped unit from any AI output
const unit = create('Revenue was $4.2B, up 12% YoY', 0.98, {
source: 'SEC 10-Q',
agent: 'claude-code',
});
// Validate against the AKF schema
const { valid } = validate(unit);
// Compute effective trust for a claim
const trust = effectiveTrust(unit.claims[0]);
console.log(`valid: ${valid}, score: ${trust.score}, decision: ${trust.decision}`);
// Stamp trust metadata directly into a file (markdown, json, code, …)
stampFile('report.md', { agent: 'claude-code', evidence: 'tests pass' });
Full TypeScript API and more examples:
typescript/README.md.
AKF is designed agent-first. One-line APIs for checking, stamping, streaming, and auditing.
import akf
# Check before you trust — can I build on this file without re-verifying?
result = akf.check_file("auth.py")
if result.status == "OK": # fresh stamp, verified evidence
... # skip re-verification, save the tokens
# LOW / STALE / UNSTAMPED → verify before trusting
# Stamp with evidence (auto-detected: test_pass, type_check, human_review, etc.)
akf.stamp("Fixed auth bypass", kind="code_change",
evidence=["42/42 tests passed", "mypy: 0 errors"],
agent="claude-code", model="claude-sonnet-4-20250514")
# Stream trust metadata in real-time
with akf.stream("output.md", model="gpt-4o") as s:
for chunk in llm_response:
s.write(chunk)
# Trust-annotated git commits (uses git notes)
akf.stamp_commit(content="Refactored auth module", kind="code_change",
evidence=["all tests pass"], agent="claude-code")
print(akf.trust_log(n=10)) # + ACCEPT ~ LOW - REJECT ? none
AKF supports multi-agent orchestration — Claude Agent Teams, Copilot Cowork, Codex multi-agent, and any A2A-compatible platform.
import akf
# Agent-to-agent delegation with trust ceiling
policy = akf.DelegationPolicy(
delegator="lead-agent", delegate="research-bot",
trust_ceiling=0.7, allowed_actions=["search", "summarize"]
)
result = akf.delegate(parent_unit, policy)
# Multi-agent streaming session
with akf.TeamStream(["research", "writer", "reviewer"]) as ts:
ts.write("research", "Found 3 sources", confidence=0.8)
ts.write("writer", "Drafted summary", confidence=0.75)
ts.write("reviewer", "Approved with edits", confidence=0.9)
scores = ts.aggregate() # per-agent + team trust
# Cross-platform agent identity
card = akf.create_agent_card(name="Research Bot", platform="claude-code",
capabilities=["search", "summarize"])
akf.verify_agent_card(card) # SHA-256 hash verification
# Team certification (per-agent breakdown)
report = akf.certify_team("src/", min_trust=0.7)
# report.all_agents_certified — each agent must individually pass
CLI:
akf agent create --name "Bot" --platform claude-code --capabilities search,summarize
akf agent list
akf agent verify <id>
akf agent export-a2a <id> --output card.json # A2A protocol bridge
akf agent import-a2a card.json
akf certify src/ --team # Per-agent breakdown
AKF ships an MCP server so any AI agent can create, validate, scan, and audit trust metadata.
# Install from the repo
pip install ./packages/mcp-server-akf
{
"mcpServers": {
"akf": {
"command": "python",
"args": ["-m", "mcp_server_akf"]
}
}
}
11 MCP tools: check_file · replay_file · create_claim · validate_file · scan_file · trust_score · stamp_file · audit_file · embed_file · extract_file · detect_threats
AKF works where AI agents work. Drop a config file, and every AI-generated file carries trust metadata automatically.
| Agent | How it works |
|---|---|
| Claude Code | Plugin: /plugin marketplace add HMAKT99/AKF → /plugin install akf — auto-stamp hook + check skill. Or reads CLAUDE.md |
| Cursor | Reads .cursorrules — stamps AI edits before you review |
| Windsurf | Reads .windsurfrules — stamps AI edits with trust metadata |
| GitHub Copilot | Reads .github/copilot-instructions.md (native) + shell hook for CLI |
| OpenAI Codex | Reads AGENTS.md — stamps files in cloud sandbox and local |
| OpenClaw | Skill on ClawHub: clawhub install akf — check/stamp protocol + memory trust |
| Hermes Agent | agentskills.io skill: hermes skills tap add HMAKT99/AKF — files, memories, and skill supply-chain |
FAQ
akf is a Claude Code plugin with 3 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes akf, hermes-akf, openclaw-akf. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it