Skip to main content

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.

Metadata

Release files for fost-agent-ledger 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fost-agent-ledger 2.0.0
File Size Uploaded
fost_agent_ledger-2.0.0.tar.gz 144.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fost-agent-ledger 2.0.0
File Interpreter ABI Platform
fost_agent_ledger-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 254.8 kB

Release files / fost_agent_ledger-2.0.0.tar.gz

Download URL fost_agent_ledger-2.0.0.tar.gz
Size 144.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c80f3f820986c9e75b55d4dea90304c555bb463ef48884f93726dd8d7acdd438
BLAKE2b-256 checksum
How to use checksums
2b34e82c324dd999a40a376f1678b03818798d59b3f4472d1430fe3ef8596347
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / fost_agent_ledger-2.0.0-py3-none-any.whl

Download URL fost_agent_ledger-2.0.0-py3-none-any.whl
Size 110.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ec70e73098969d7375b0832796a4acfc7c1a75668ec136ed57c170da92b5ade
BLAKE2b-256 checksum
How to use checksums
7fdabfe1d717e5d56575a353d45e99d6541b1b6db5e40aeb4ee59bdb0071144d
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page