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.5.0.tar.gz (287.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.5.0-py3-none-any.whl (179.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: akf-1.5.0.tar.gz
  • Upload date:
  • Size: 287.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.5.0.tar.gz
Algorithm Hash digest
SHA256 76d884082d87d5baf06449a60983cbd2e50c1ab8333f5d6c54d875d251528ebd
MD5 2275aac9515e36b23a196989e3f009dc
BLAKE2b-256 1591e2e53bac9e61e76f9b2baeabf97e702bc5848fce9c03247e379efabfee0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: akf-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 179.8 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1337bcc4afd96fe133bda3936fd1428b9533ef0c67d273a339358ada33c3643d
MD5 e0a5ea1e763c82e58a509df72161ea91
BLAKE2b-256 f4f1c0c089d121a72d3ad28963644f871b98641bfb644728f32c5261b68c7f20

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