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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akf-1.6.0.tar.gz (296.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akf-1.6.0-py3-none-any.whl (186.4 kB view details)

Uploaded Python 3

File details

Details for the file akf-1.6.0.tar.gz.

File metadata

  • Download URL: akf-1.6.0.tar.gz
  • Upload date:
  • Size: 296.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for akf-1.6.0.tar.gz
Algorithm Hash digest
SHA256 76d57a94ece2fe352adf1d15e02135fe5a3b3bda51be31f51d8e103f110986ff
MD5 7b6df576583d620076397241caaa0b5c
BLAKE2b-256 b99fe3aa5fe32f4817ca1366e307cef27cfd32ea20bb79f34aaa1e86795b9ef3

See more details on using hashes here.

File details

Details for the file akf-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: akf-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 186.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for akf-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90716c2045450b4242c44525e90a98015599cfeb54ff8aaa409203f01a75a89d
MD5 d98626f0af54acfc6dd40ae12481cd4f
BLAKE2b-256 98ba95d6ca9234aa9384afe881383df974f17bb9874a46fe4d38fb60ab7e45d9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 files

1.5.0

2 files

1.4.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page