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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| akf-1.6.1.tar.gz | 298.2 kB | Without provenance | Details for akf-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| akf-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for akf-1.6.1-py3-none-any.whl |
Total release size: 486.2 kB
Release files / akf-1.6.1.tar.gz
| Download URL | akf-1.6.1.tar.gz |
|---|---|
| Size | 298.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb25fc0fa311c2d23605b103e9b5c0ad51a6640b24cceb2c53cee21e121ddb49
|
|
BLAKE2b-256 checksum How to use checksums |
b5ea25eb98cd54265061c38a3eaf79d845e04d0137433107027d2f32485230b0
|
| 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.1-py3-none-any.whl
| Download URL | akf-1.6.1-py3-none-any.whl |
|---|---|
| Size | 188.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
585278410d63583efb01c67fe493c8017218bf41aa0b091bc7b2684433ec6a91
|
|
BLAKE2b-256 checksum How to use checksums |
0d2fc4d39e6829a62c6bfddbd792d10b3f6584f76101c3115a30a768d2ecd587
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for akf 1.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.