项目介绍
Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测
AKF(The AI Native File Format)是面向 AI 场景的文件元数据格式。它把“谁生成了这个文件、依据什么证据、可信度多少、是否已被验证”等信息写入文件本身,用于帮助后续使用者定位已有验证依据;标签和信任分数本身不证明内容真实,也不能替代必要的重新验证。README 将其类比为“AI 领域的 EXIF”,并给出核心理念:“A stamp costs ~15 tokens. Re-verifying costs 15,000.”
项目提供 Python 包 akf、Node.js 包 akf-format,并附带 CLI、MCP 服务器、Agent Skill、编辑器扩展与 CI 集成。需要注意的是,AKF 本身是文件格式与配套工具库,并不是一个可直接对话使用的独立 Agent;它属于供 Agent 与工作流调用的框架/工具类项目。
核心能力
点击能力名称查看输入、输出和原文依据。
- 打标(stamp):为文件写入信任元数据,包括代理标识、证据(如测试通过、类型检查通过)、置信度与来源层级。
- 检查(check):在复用文件前查询状态,返回
OK、LOW、STALE、UNSTAMPED等结论。 - 可反驳探针(replay):打标时可携带可复跑的验证命令,后续通过
akf replay <file> --run得到CONFIRMED、CONFIRMED_DRIFTED或REFUTED。 - 多格式嵌入:README 称支持
.docx、.pdf、.html、.md、图片、音视频(音视频使用 sidecar 伴随文件)等格式。 - 合规与审计:提供
akf audit与 EU AI Act、NIST AI RMF 等映射文档。 - MCP 服务器:README 列出 11 个 MCP 工具,如
check_file、stamp_file、audit_file、detect_threats等。 - 多代理协作:提供委托信任上限、团队信任聚合、A2A 协议导入导出等接口。
实际应用场景
适用场景
- 多代理或多会话接力开发时,避免重复阅读文件与重复跑测试。
- 需要记录 AI 生成内容来源链、供人工复核的文档与代码仓库。
- 在 CI 中设置信任门槛,对未验证或被改动过的文件做拦截。
- 需要按监管框架整理 AI 生成内容透明性材料的团队。
安装与接入
README 给出的安装方式(原文命令):
pip install akf # Python
npm install akf-format # TypeScript / Node.js
akf doctor # Check your install — detects PATH issues and guides setup
若命令找不到,README 建议使用 pipx install akf 或 python3 -m akf。MCP 服务器需从仓库子包安装:
pip install ./packages/mcp-server-akf
README 给出的 MCP 配置片段为 {"mcpServers":{"akf":{"command":"python","args":["-m","mcp_server_akf"]}}};本次采集未获取到独立的 MCP 配置文件,实际可用性待核验。Skill 可通过 npx skills add HMAKT99/AKF、clawhub install akf 或 hermes skills tap add HMAKT99/AKF 添加,具体客户端适配情况以官方为准。
使用条件与限制
- 是否需要部署
- 需自行准备运行环境,具体要求见正文
- 是否需要注册
- 账号和认证要求见正文;未明确说明的项目仍待核验
- 是否需要 API Key
- 待核验
- 费用与额度
- 费用边界见正文,项目许可不代表模型或托管服务免费
- 所需权限
- 待核验
- 许可证与服务条款
- 待核验
权限费用与限制
README 声明 MIT 许可,格式规范保持免费,且称不会有功能被置于付费层之后。仓库代码开源不等于托管站点、第三方模型或未来新增服务免费,相关费用与条款需向官方核验。后台监听(akf install、akf watch)会监视指定目录并对文件写入元数据,涉及本地文件权限,部署前应评估影响范围。信任分数由置信度、来源层级与时间衰减加权计算,属于项目自定义算法,不宜直接等同于客观事实判断。
国内使用情况
网友核验 用户经验分享
与站长实测独立,不代表官方认证或本站已实测。
最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。
分项统计、有效期与样本量
| 核验项目 | 有效人数 | 成功 / 部分 / 失败 / 无法判断 | 成功率 | 最近核验 / 有效期 |
|---|---|---|---|---|
| 官方网站访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| GitHub 仓库访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 安装与运行 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 官方服务国内连接 / MCP 连接 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 国内网络情况 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 国内模型兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 自定义 API | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外服务依赖 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外账号要求 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 中文界面 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 客户端兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 账号及费用信息 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。
最近有效核验
暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。
查看全部有效核验 →国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。
- 官方网站访问
- 尚未实测 待核验
- GitHub 仓库访问
- 尚未实测 待核验
- 官方服务国内连接
- 尚未实测 待核验
- 国内网络情况
- 尚未实测 待核验
- 国内模型兼容性
- 尚未实测 待核验
- 自定义 API
- 尚未实测 待核验
- 海外服务依赖
- 尚未实测 待核验
- 海外账号要求
- 尚未实测 待核验
- 中文界面
- 尚未实测 待核验
- 国内最后核验时间
- 尚未实测
许可与国内使用
仓库采用 MIT License,版权声明为 “Copyright (c) 2025 AKF Contributors”,可商用与再分发需保留许可声明。README 未说明中国大陆网络环境下的安装与使用情况,PyPI、npm 下载是否稳定、是否需要镜像待核验。合规映射文档面向 EU AI Act 与 NIST AI RMF,是否满足国内监管要求资料未提及,需自行核验。仓库当前未归档,但资料中未给出正式版本发布记录与长期维护承诺,建议关注更新状态。
项目资料与来源
字段依据与待核验事项
access:来源确认 · pip install akf # Python npm install akf-format # TypeScript / Node.js
project_type:来源确认 · AKF ships an [MCP](https://modelcontextprotocol.io) server so any AI agent can create, validate, scan, and audit trust metadata.
原始 README(折叠技术参考)
---
_akf: '{"v":"1.0","claims":[{"c":"Trust metadata for README.md","t":0.7,"id":"1979cbeb","src":"unspecified","tier":5,"ver":false,"ai":true,"evidence":[{"type":"other","detail":"updated certify and github action references","at":"2026-03-18T04:21:48.869226+00:00"}]}],"id":"akf-c33254656fc5","agent":"claude-code","at":"2026-03-18T04:21:48.870623+00:00","label":"public","inherit":true,"ext":false,"sv":"1.1"}'
---
<p align="center">
<img src="https://img.shields.io/badge/format-.akf-blue?style=for-the-badge" alt="AKF Format" />
</p>
<p align="center">
<a href="https://github.com/HMAKT99/AKF/stargazers"><img src="https://img.shields.io/github/stars/HMAKT99/AKF?style=flat-square&color=yellow" alt="Stars" /></a>
<a href="https://www.npmjs.com/package/akf-format"><img src="https://img.shields.io/npm/v/akf-format?style=flat-square&label=npm" /></a>
<a href="https://www.npmjs.com/package/akf-format"><img src="https://img.shields.io/npm/dw/akf-format?style=flat-square&label=npm%20downloads" /></a>
<a href="https://github.com/HMAKT99/AKF/actions"><img src="https://img.shields.io/github/actions/workflow/status/HMAKT99/AKF/ci.yml?style=flat-square&label=CI" /></a>
<a href="https://github.com/HMAKT99/AKF/blob/main/.github/akf-badge.json"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FHMAKT99%2FAKF%2Fmain%2F.github%2Fakf-badge.json&style=flat-square" alt="AKF trust" /></a>
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
<a href="https://akf.dev"><img src="https://img.shields.io/badge/docs-akf.dev-blue?style=flat-square" /></a>
<a href="https://stackshare.io/akf-the-ai-native-file-format"><img src="https://img.shields.io/badge/stackshare-listed-blue?style=flat-square" /></a>
</p>
<h1 align="center">AKF — The AI Native File Format</h1>
<p align="center">
<strong>A stamp costs ~15 tokens. Re-verifying costs 15,000.</strong><br/>
Think EXIF for AI — trust metadata that travels with every AI-generated file,<br/>
so the next agent (or human) knows what it can build on.
</p>
<p align="center">
<img src="https://vhs.charm.sh/vhs-3OOIFnSZOds1SrvHNxwNY.gif" alt="AKF Demo — stamp, inspect, audit in 10 seconds" width="700" />
</p>
<p align="center">
<a href="https://github.com/HMAKT99/AKF">⭐ Star on GitHub</a> ·
<a href="https://akf.dev">Website</a> ·
<a href="https://huggingface.co/spaces/HANAKT19/is-this-ai-generated">🛡️ Is This AI-Generated?</a> ·
<a href="https://huggingface.co/spaces/HANAKT19/eu-ai-act-check">🇪🇺 Compliance Check</a> ·
<a href="https://huggingface.co/spaces/HANAKT19/ai-trust-report-card">📊 Repo Scanner</a>
</p>
<p align="center">
<a href="#quickstart">Quickstart</a> ·
<a href="#for-ai-agents">AI Agents</a> ·
<a href="#mcp-server">MCP Server</a> ·
<a href="#skills">Agent Skills</a> ·
<a href="#cli">CLI</a> ·
<a href="https://akf.dev">Website</a>
</p>
---
## Paste this to your agent
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.
## Why agents need this
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:
```console
# 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` |
## Don't trust the stamp — re-run it
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:
```console
# 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.
## Quickstart
```bash
pip install akf # Python
npm install akf-format # TypeScript / Node.js
akf doctor # Check your install — detects PATH issues and guides setup
```
> **`akf` command not found?** Run `akf doctor` to auto-detect your setup, or use `python3 -m akf` (always works).
> - Install with pipx: `pipx install akf` (recommended — auto-handles PATH)
> - **Windows:** use `python3 -m akf` or install via `pipx`
```bash
# 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
```
```python
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`):
```typescript
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`](typescript/README.md).
## For AI Agents
AKF is designed **agent-first**. One-line APIs for checking, stamping, streaming, and auditing.
```python
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
```
## Multi-Agent Teams
AKF supports multi-agent orchestration — Claude Agent Teams, Copilot Cowork, Codex multi-agent, and any A2A-compatible platform.
```python
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:**
```bash
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
```
## MCP Server
AKF ships an [MCP](https://modelcontextprotocol.io) server so any AI agent can create, validate, scan, and audit trust metadata.
```bash
# Install from the repo
pip install ./packages/mcp-server-akf
```
```json
{
"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`
## Ambient Trust
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 |
| **Any skills-compatible agent** | `npx skills add HMAKT99/AKF` — self-contained check/stamp skill for 18+ agents |
| **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 |
| **Manus / Other Agents** | MCP server + shell hook — works with any agent that supports MCP or CLI |
| **Any MCP agent** | 11 MCP tools — check, replay, stamp, audit, embed, extract, detect, validate, scan, trust, create |
| **Any CLI tool** | `eval "$(akf shell-hook)"` — intercepts `claude`, `chatgpt`, `aider`, `openclaw`, `ollama`, `manus` |
**The trust pipeline:**
```
Agent writes code → Git commit stamped → CI runs akf certify → Team reviews with context
```
Set up in 60 seconds:
```bash
# 1. Agent stamps its own work (already in this repo)
cat CLAUDE.md # or .cursorrules / .windsurfrules / AGENTS.md / .github/copilot-instructions.md
# 2. Git hooks stamp every commit
akf init --git-hooks
# 3. CI certifies trust on every PR
# uses: HMAKT99/AKF/extensions/github-action@main
# 4. Shell hook intercepts AI CLI tools
eval "$(akf shell-hook)"
```
## Skills
AKF ships as a self-contained agent skill ([`skills/akf/`](skills/akf/SKILL.md)): the check-before-you-trust procedure, an evidence reference, and a read-only check script.
```bash
npx skills add HMAKT99/AKF # Claude Code, Cursor, Copilot, Cline and 18+ agents
clawhub install akf # OpenClaw
hermes skills tap add HMAKT99/AKF # Hermes Agent
```
## Format at a Glance
**Compact** (~15 tokens — optimized for AI):
```json
{"v":"1.0","claims":[{"c":"Revenue was $4.2B","t":0.98,"src":"SEC 10-Q"}]}
```
**Descriptive** (human-readable — same data):
```json
{"version":"1.0","claims":[{"content":"Revenue was $4.2B","confidence":0.98,"source":"SEC 10-Q"}]}
```
**Full** (with provenance, decay, AI flags, security):
```json
{"v":"1.0","by":"sarah@acme.com","label":"confidential","inherit":true,
"claims":[
{"c":"Revenue $4.2B","t":0.98,"src":"SEC 10-Q","tier":1,"ver":true,"decay":90},
{"c":"H2 will accelerate","t":0.63,"tier":5,"ai":true,"risk":"AI inference"}
],
"prov":[
{"hop":0,"by":"sarah@acme.com","do":"created","at":"2025-07-15T09:30:00Z"},
{"hop":1,"by":"copilot-agent","do":"enriched","at":"2025-07-15T10:15:00Z"}
]}
```
## Works With Every Format
AKF embeds natively — no sidecars needed for most formats:
| Format | How It Works |
|--------|-------------|
| `.akf` | Native standalone knowledge file |
| `.docx` `.xlsx` `.pptx` | OOXML custom XML part |
| `.pdf` | PDF metadata stream |
| `.html` | JSON-LD `<script type="application/akf+json">` |
| `.md` | YAML frontmatter |
| `.png` `.jpg` | EXIF/XMP metadata |
| `.json` | Reserved `_akf` key |
| `.mp4` `.mov` `.webm` `.mkv` | Sidecar `.akf.json` companion |
| `.mp3` `.wav` `.flac` `.ogg` | Sidecar `.akf.json` companion |
| Everything else | Sidecar `.akf.json` companion |
```python
# One API for all formats
akf.embed("report.docx", claims=[...], classification="confidential")
meta = akf.extract("report.docx")
akf.scan("report.docx")
```
## Zero-Touch Auto-Stamping
AKF can automatically stamp every file AI touches — no manual intervention needed.
```bash
# Install the background watcher
akf install
# Or run in foreground
akf watch ~/Downloads ~/Desktop ~/Documents
```
The background watcher monitors directories for new and modified files and stamps them with trust metadata. **Smart context detection** automatically infers:
- **Git author** — from `git log` history
- **Download source** — from macOS extended attributes
- **Classification** — from project `.akf/config.json` rules
- **AI-generated flag** — from LLM tracking timestamps + content heuristics
- **Confidence score** — dynamically adjusted based on available evidence
### Shell Hook (intercept AI CLI tools)
```bash
# Add to ~/.zshrc or ~/.bashrc
eval "$(akf shell-hook)"
```
Automatically detects when you run `claude`, `chatgpt`, `aider`, `openclaw`, `ollama`, or other AI CLI tools, and stamps any files they create or modify. Also pre-stamps files before upload to content platforms (`gws`, `box`, `m365`, `dbxcli`, `rclone`) so trust metadata travels with the file. Use `--no-upload-hooks` to disable.
### Project Rules
Create `.akf/config.json` in your project root:
```json
{
"rules": [
{"pattern": "*/finance/*", "classification": "confidential", "tier": 2},
{"pattern": "*/public/*", "classification": "public", "tier": 3}
]
}
```
Files matching these patterns are automatically classified when stamped.
## CLI
```bash
# ── Quick start ──
akf # Welcome + quick start
akf quickstart # Interactive demo
akf doctor # Check installation health
# ── Stamp & create ──
akf create report.akf \
--claim "Revenue $4.2B" --trust 0.98 --src "SEC 10-Q" \
--by sarah@acme.com --label confidential
# ── Check before you trust ──
akf check auth.py # One line: OK / LOW / STALE / UNSTAMPED
akf check auth.py --json # Structured output; exit codes 0/1/2 for gating
akf replay auth.py # Inspect the stamp's falsifiable probe recipe
akf replay auth.py --run # Re-run it: CONFIRMED / CONFIRMED_DRIFTED / REFUTED
# ── Validate & inspect ──
akf validate report.akf
akf inspect report.akf
akf trust report.akf
# ── Certify (aggregate pass/fail gate) ──
akf certify report.akf # Trust + detection + compliance
akf certify src/ --min-trust 0.8 # Custom threshold
akf certify . --evidence-file results.xml # Attach test evidence
akf certify . --format json --fail-on-untrusted # CI-friendly output
akf certify src/ --team # Per-agent trust breakdown
# ── Compliance ──
akf audit report.akf # Compliance readiness check
akf audit report.akf --regulation eu_ai_act # EU AI Act
akf audit report.akf --trail # Audit trail
# ── Universal format commands ──
akf embed report.docx --classification confidential \
--claim "Revenue $4.2B" --trust 0.98
akf extract report.docx
akf scan report.docx
akf scan ./docs/ --recursive
akf scan . --badge badge.json # shields.io endpoint: "14% stamped · trust 0.76"
# ── Auto-stamping ──
akf install # Install background watcher
akf watch ~/Downloads ~/Documents # Watch directories
akf shell-hook # Print shell hook code
akf shell-hook --no-upload-hooks # Without content platform hooks
akf uploads # View upload stamp log
# ── Git integration ──
akf stamp <file> --agent claude-code --evidence "tests pass"
# ── Agent identity & teams ──
akf agent create --name "Bot" --platform claude-code
akf agent list
akf agent verify <agent_id>
akf agent export-a2a <id> --output card.json # A2A protocol bridge
akf agent import-a2a card.json
# ── Knowledge Base ──
akf kb stats ./kb
akf kb query ./kb --topic finance
```
## Security Detections
10 built-in detection classes: AI content without review, trust below threshold, hallucination risk, knowledge laundering, classification downgrade, stale claims, ungrounded AI claims, trust degradation chain, excessive AI concentration, provenance gap.
```python
from akf import run_all_detections
report = run_all_detections(unit)
for finding in report.findings:
print(f"[{finding.severity}] {finding.detection}: {finding.message}")
```
## Trust Computation
```
effective_trust = confidence × authority_weight × temporal_decay × (1 + penalty)
```
| Tier | Weight | Example |
|------|--------|---------|
| 1 | 1.00 | SEC filings, official records |
| 2 | 0.85 | Analyst reports, peer-reviewed |
| 3 | 0.70 | News, industry reports |
| 4 | 0.50 | Internal estimates, CRM data |
| 5 | 0.30 | AI inference, extrapolations |
**Decision:** score ≥ 0.7 → ACCEPT · ≥ 0.4 → LOW · < 0.4 → REJECT
**Delegation ceiling:** When an agent delegates to another, the delegate's output trust is capped at `min(score, delegation_ceiling)`. This prevents trust inflation in multi-agent chains.
## Integrations & Extensions
**Framework integrations** (install from repo via `pip install ./packages/<name>`):
| Package | Description |
|---------|-------------|
| [`mcp-server-akf`](packages/mcp-server-akf/) | MCP server — create, validate, scan, trust |
| [`langchain-akf`](packages/langchain-akf/) | LangChain callback handler + document loader (experimental) |
| [`llama-index-akf`](packages/llama-index-akf/) | LlamaIndex node parser + trust filter (experimental) |
| [`crewai-akf`](packages/crewai-akf/) | CrewAI tool for trust-aware agents (experimental) |
**Editor & CI extensions** (source in repo):
| Extension | Description |
|-----------|-------------|
| [VS Code](extensions/vscode/) | Syntax highlighting, hover info, validation for `.akf` files |
| [VS Code AI Monitor](editors/vscode/) | Auto-stamp files edited by Copilot, Cursor, and other AI tools |
| [GitHub Action](extensions/github-action/) | CI trust gate — runs `akf certify` on PRs with optional PR comments |
| [Google Workspace](extensions/google-workspace/) | Add-on for Docs, Sheets, Slides (preview) |
| [Office Add-in](extensions/office-addin/) | Add-in for Word, Excel, PowerPoint (preview) |
## For LLMs
Prompt with one example and LLMs produce valid AKF **95%+ of the time**:
```
Output knowledge as AKF:
{"v":"1.0","claims":[{"c":"<claim>","t":<0-1>,"src":"<source>","tier":<1-5>,"ai":true}]}
```
See [LLM-PROMPT.md](spec/LLM-PROMPT.md) for a full system prompt.
## Documentation
| Doc | Description |
|-----|-------------|
| [Full Spec](spec/akf-v1.0-spec.md) | Complete format specification |
| [JSON Schema](spec/akf-v1.1.schema.json) | Machine-readable schema |
| [Producing AKF](spec/PRODUCING-AKF.md) | Quick start for 8 languages |
| [Trust Computation](docs/trust-computation.md) | Scoring algorithm details |
| [Falsifiable Evidence](docs/recipes/falsifiable-evidence.md) | Replay recipes — re-run the probe, don't trust the label |
| [Agent Memory](docs/recipes/agent-memory.md) | Trust-decayed memory stamps |
| [Skill Provenance](docs/recipes/skill-provenance.md) | Supply-chain trust for skill files |
| [LLM Integration](docs/llm-integration.md) | Prompting strategies |
| [EU AI Act](docs/compliance/eu-ai-act-mapping.md) | Compliance mapping |
| [NIST AI RMF](docs/compliance/nist-ai-rmf-mapping.md) | Framework mapping |
## vs Alternatives
| | AKF | C2PA | Watermarking | Manual tracking |
|---|:---:|:---:|:---:|:---:|
| Works on documents/code | ✅ | ❌ (media only) | ❌ | ⚠️ |
| No Certificate Authority needed | ✅ | ❌ | ✅ | ✅ |
| Trust scores | ✅ | ❌ | ❌ | ❌ |
| Source provenance chain | ✅ | ✅ | ❌ | ⚠️ |
| Compliance auditing | ✅ | ❌ | ❌ | ❌ |
| ~15 tokens (LLM-friendly) | ✅ | ❌ | N/A | N/A |
| 20+ file formats | ✅ | ⚠️ (media) | ⚠️ (text) | ❌ |
| Free & open source | ✅ | ⚠️ | Varies | ✅ |
## Compliance
**EU AI Act Article 50 takes effect August 2, 2026** — AI-generated content must carry transparency metadata (penalties up to EUR 35M / 7% of global turnover). Files stamped with AKF already carry it:
```bash
akf audit report.docx --regulation eu_ai_act
```
Mappings for [EU AI Act](docs/compliance/eu-ai-act-mapping.md) and [NIST AI RMF](docs/compliance/nist-ai-rmf-mapping.md).
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and PR process.
## Free and Open — Forever
AKF is free and open source under the MIT license. The format specification will always be free. No feature will ever be gated behind a paid tier. AKF is a standard, and standards must be free to be universal.
## License
MIT — use it everywhere, embed it in everything.
历史前置条件说明(补充参考)
需 Python 或 Node.js 环境以使用对应库;CLI 建议通过 pipx 安装以处理 PATH;MCP 服务器需从仓库子包单独安装;后台监听需本地目录写入权限;是否需要模型或 API Key 资料未说明,待核验;费用与国内网络可用性待核验。
项目来源与清单版权许可
https://github.com/HMAKT99/AKF
整理来源:https://github.com/slavakurilyak/awesome-ai-agents
清单版权与许可:
MIT License
Copyright (c) 2024 Slava Kurilyak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.