Skip to main content

Finite operational ledger toolkit for AI-agent support, omissions, obligations, certificates, environment assumptions, and transitions.

Project description

fost-agent-ledger

fost-agent-ledger is a small Python toolkit for recording the visible support behind an AI-agent output. It writes down what was claimed, what evidence or certificate was used, what remains uncertain, which obligations are still open, and what changed between two runs.

It is based on Takahashi, K. (2026), Finite Operational Structure Theory: A Mathematical Theory of Finite Operational Cuts, DOI: 10.5281/zenodo.20995846.

What Problem This Solves

Agent outputs often look final even when they depend on limited evidence, stale tools, missing checks, or unresolved assumptions. This package gives you a portable ledger for those finite facts. It does not prove truth or safety. It makes the visible support, limits, and required follow-up explicit.

Use it when you want an agent, review pipeline, or evaluation script to answer practical questions such as:

  • What records support this output?
  • Which assumptions, certificates, or tool conditions were used?
  • What remains unresolved or intentionally out of scope?
  • Did the support change between the previous run and this run?
  • Is the output admissible under a chosen mode such as draft, research_summary, or safety_sensitive_advice?

Install

pip install fost-agent-ledger
python -c "import fost_agent_ledger as f; print(f.__version__)"
fost-ledger init --mode research_summary --agent-id agent-1

3-Minute Python Quickstart

from fost_agent_ledger import LedgerBuilder, ModeContract, validate_ledger

builder = LedgerBuilder(agent_id="agent-1", mode="research_summary")
claim = builder.add_claim("The report summarizes the paper's main boundary claims.")
builder.add_support("The summary was checked against the introduction and appendix.", supports=[claim.id])
builder.add_issue("No external replication check was performed.", severity="medium")
builder.add_critic_coverage(role="external_challenge", covered=True)

result = validate_ledger(builder.finalize(), mode=ModeContract.research_summary())
print(result.summary)

The output tells you whether the finite ledger is supported and admissible for the selected mode. For a publishable checked ledger, use builder.finalize_checked() and validate with validate_ledger(ledger, require_finality=True). That stricter path requires separate finite records for the status body, checked status, pre-admissibility support vector, admissibility body, checked admissibility, adequacy dispositions, anchor declarations, and kernel context.

3-Minute CLI Quickstart

fost-ledger init --mode research_summary --agent-id agent-1 > ledger.json
fost-ledger validate ledger.json
fost-ledger validate ledger.json --require-finality
fost-ledger explain validator.timeout
fost-ledger coverage

The CLI is useful in CI, evaluation jobs, and manual review because the output is JSON and the problem codes are stable. Unknown modes fail closed by default. Use --allow-unknown-mode-as-draft only when you explicitly want draft fallback semantics.

Three Ways To Use It

  • Python API: use LedgerBuilder and validate_ledger inside an agent or evaluation pipeline.
  • CLI: run fost-ledger init, fost-ledger validate, fost-ledger diff, and fost-ledger explain CODE.
  • JSON only: write canonical schema_version: "2.0" ledgers and validate them with the exported JSON Schema.
  • Strict finality: require a checked output path with require_finality=True or fost-ledger validate --require-finality.

What A Ledger Contains

A ledger is finite JSON. Typical records include:

  • claims and support summaries;
  • provenance and event order;
  • evidence state and unavailable evidence leaves;
  • certificate targets, uses, and states;
  • issues, residues, obstructions, and obligations;
  • environment tokens such as data age or tool state;
  • transition witnesses for changed support, kernel, certificate, or environment coordinates.

Common Commands

fost-ledger init --mode research_summary --agent-id agent-1
fost-ledger validate ledger.json
fost-ledger summarize ledger.json
fost-ledger diff before.json after.json
fost-ledger explain validator.timeout
fost-ledger coverage
fost-ledger schema

What It Does Not Do

It is not a truth verifier, universal safety guarantee, moral evaluator, or chain-of-thought recorder. It stores visible claims, support summaries, provenance, certificates, issues, residues, obligations, environment tokens, failures, and transition witnesses.

The implementation target is complete finite operational coverage: every tracked manuscript item is represented by finite record types, validators, witnesses, Problem codes, tests, or explicit design-boundary docs. It does not add a theorem prover because FOST treats hidden truth states and completed infinities as outside the runtime contract.

Why It Is Different

Most agent audit logs store a transcript or a score. fost-agent-ledger stores a finite operational cut: a typed, portable, mode-scoped record of what the output is allowed to rely on and what remains unresolved. That makes it useful for review, regression testing, compliance evidence, and agent-to-agent handoff without claiming more certainty than the recorded support provides.

Read Next

License

Apache License 2.0.

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

fost_agent_ledger-2.0.0.tar.gz (144.4 kB view details)

Uploaded Source

Built Distribution

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

fost_agent_ledger-2.0.0-py3-none-any.whl (110.3 kB view details)

Uploaded Python 3

File details

Details for the file fost_agent_ledger-2.0.0.tar.gz.

File metadata

  • Download URL: fost_agent_ledger-2.0.0.tar.gz
  • Upload date:
  • Size: 144.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fost_agent_ledger-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c80f3f820986c9e75b55d4dea90304c555bb463ef48884f93726dd8d7acdd438
MD5 ffdbfba65002ab3beac6dbb680252629
BLAKE2b-256 2b34e82c324dd999a40a376f1678b03818798d59b3f4472d1430fe3ef8596347

See more details on using hashes here.

File details

Details for the file fost_agent_ledger-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: fost_agent_ledger-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 110.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fost_agent_ledger-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec70e73098969d7375b0832796a4acfc7c1a75668ec136ed57c170da92b5ade
MD5 c001813b91f36c7099e36ba21e816a6d
BLAKE2b-256 7fdabfe1d717e5d56575a353d45e99d6541b1b6db5e40aeb4ee59bdb0071144d

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