Skip to main content

AKF — Agent Knowledge Format. Lightweight file format for AI-generated knowledge with built-in trust, provenance, and security.

Project description

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

Project details


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.4.0.tar.gz (276.5 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.4.0-py3-none-any.whl (172.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for akf-1.4.0.tar.gz
Algorithm Hash digest
SHA256 b66a56f4822efb2e7f16dd1206ff556f81704eb6eb23ca128041137bc8c49cad
MD5 5206223b7cb5cae6e5f87a724ba16224
BLAKE2b-256 b682c796fac3ae87378fb6f36dedae186f5555b1b199ae31c252bfccdb6a7701

See more details on using hashes here.

File details

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

File metadata

  • Download URL: akf-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 172.1 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a519ba5f3029ad5d585b550c68c3e321e95b878189ca0d4e293649cf35c89fa5
MD5 56d1596853bbbcf0034885e97461f646
BLAKE2b-256 817183b5dea4ee4383257e0fef7198c198d6ec26381e9b38644c96a726a8e454

See more details on using hashes here.

Supported by

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