Skip to main content

AKF — Agent Knowledge Format (Python SDK)

PyPI Python

Lightweight file format for AI-generated knowledge with built-in trust, provenance, and security.

Install

pip install akf

akf command not found? Use python3 -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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akf 1.6.2
File Size Uploaded Provenance Actions
akf-1.6.2.tar.gz 299.8 kB Without provenance Details for akf-1.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for akf 1.6.2
File Interpreter ABI Platform Actions
akf-1.6.2-py3-none-any.whl Python 3 none any Details for akf-1.6.2-py3-none-any.whl

Total release size: 488.7 kB

Release files / akf-1.6.2.tar.gz

Download URL akf-1.6.2.tar.gz
Size 299.8 kB
Tags Source
SHA-256 checksum
How to use checksums
080661e284c947c2af7a280674d639f4463bb4cee9e3e926460f2851425b9afc
BLAKE2b-256 checksum
How to use checksums
066de908339eb46cea9a24814a8615376e8c79ae6bb219f8b7357baca5a1e2db
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.2-py3-none-any.whl

Download URL akf-1.6.2-py3-none-any.whl
Size 188.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1055c39e8e007947b0621b2ed6c8e30461f359c4fca1bb919dcd4c10de04d447
BLAKE2b-256 checksum
How to use checksums
df70eebe64062507f8afca8aa8198d4b20c8cc0533c1ec67f8b74aea4f2f46e3
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page