AKF — Agent Knowledge Format (Python SDK)
Lightweight file format for AI-generated knowledge with built-in trust, provenance, and security.
Install
pip install akf
akfcommand not found? Usepython3 -m akf(always works), or:
- Install with pipx:
pipx install akf(recommended — auto-handles PATH)- macOS: add
export PATH="$HOME/Library/Python/3.9/bin:$PATH"to~/.zshrc- Linux: add
export PATH="$HOME/.local/bin:$PATH"to~/.bashrc
Usage
import akf
# Create a single-claim unit
unit = akf.create("Revenue $4.2B", t=0.98, src="SEC 10-Q", tier=1)
unit.save("report.akf")
# Load and validate
unit = akf.load("report.akf")
result = akf.validate(unit)
# Builder API
unit = (akf.AKFBuilder()
.by("sarah@woodgrove.com")
.label("confidential")
.claim("Revenue $4.2B", 0.98, src="SEC 10-Q", tier=1, ver=True)
.claim("Cloud growth 15%", 0.85, src="Gartner", tier=2)
.build())
# Trust computation
for claim in unit.claims:
result = akf.effective_trust(claim)
print(f"{result.decision}: {result.score:.2f}")
# Agent consumption
brief = (akf.AKFTransformer(unit)
.filter(trust_min=0.5)
.penalty(-0.03)
.by("research-agent")
.build())
CLI
akf create report.akf --claim "Revenue $4.2B" --trust 0.98
akf validate report.akf
akf inspect report.akf
akf trust report.akf
akf consume report.akf --output brief.akf --threshold 0.6
akf provenance report.akf
Metadata
Release files for akf 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| akf-1.6.0.tar.gz | 296.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| akf-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 482.4 kB
Release files / akf-1.6.0.tar.gz
| Download URL | akf-1.6.0.tar.gz |
|---|---|
| Size | 296.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76d57a94ece2fe352adf1d15e02135fe5a3b3bda51be31f51d8e103f110986ff
|
|
BLAKE2b-256 checksum How to use checksums |
b99fe3aa5fe32f4817ca1366e307cef27cfd32ea20bb79f34aaa1e86795b9ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / akf-1.6.0-py3-none-any.whl
| Download URL | akf-1.6.0-py3-none-any.whl |
|---|---|
| Size | 186.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90716c2045450b4242c44525e90a98015599cfeb54ff8aaa409203f01a75a89d
|
|
BLAKE2b-256 checksum How to use checksums |
98ba95d6ca9234aa9384afe881383df974f17bb9874a46fe4d38fb60ab7e45d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|