Skip to main content

Tamper-evident execution recording for AI agents — Python SDK

Project description

AFR SDK

Tamper-evident execution recording for AI agents.

Installation

pip install afr-sdk

Quick Start

from afr_python_sdk import Recorder

rec = Recorder(base_url="http://localhost:3001")
run = rec.start({"model": "gpt-4"})

Full Example

from afr_python_sdk import Recorder

rec = Recorder(base_url="http://localhost:3001", api_key="your-api-key")

rec.start({"model": "gpt-4", "temperature": 0.2})

rec.step({
    "step_type":   "tool_result",
    "tool_name":   "risk_score",
    "tool_input":  {"txn_id": "TXN-001"},
    "tool_output": {"fraud_probability": 0.82},
})

rec.decision({
    "goal_reference":  "evaluate-transaction",
    "selected_option": "block",
    "confidence":      0.92,
})

proof = rec.finish()
print(proof["run_id"])

License

MIT

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

afr_sdk-1.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

afr_sdk-1.0.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file afr_sdk-1.0.1.tar.gz.

File metadata

  • Download URL: afr_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for afr_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 540094186d88e1651ab4f5d8008f4fe97a587e5530c3e072cd81095435be78fa
MD5 d589ffae5037fa1270cc3f93f18718f6
BLAKE2b-256 4539dddd635b73d145008aca5dd0b4235e488ec7f7a7fb1eb8004f0b68762dae

See more details on using hashes here.

File details

Details for the file afr_sdk-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: afr_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for afr_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 083bf694941c0149f0eb08f0934eff463d99a640a18729e126bb49bd0fa6e45f
MD5 c822cac445fbd134f0079f6b8a0226c5
BLAKE2b-256 cbe639793f748d3900ea970cd06a79935e309e45c0137c4c8c431e1579709148

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