Skip to main content

agent-audit-record

Reference Python emitter for the agent-audit OpenTelemetry semantic convention — a portable record binding what an agent proposed, what a human decided, what executed, and what it cost.

This package is the reference implementation, not the specification. The normative definition lives in spec/SPECIFICATION.md at the repository root.

Status: v1 reference emitter implemented (milestone M3). Claude Code hooks and MCP middleware integrations (M4, M7) are not yet built — see BUILD-PLAN.md.

Install

pip install agent-audit-record

Usage

from agent_audit_record import ActorType, Cost, Decision, Emitter, Outcome, PrincipalType

emitter = Emitter()  # no-op until a host configures an OTel LoggerProvider

emitter.proposed(
    action_id="7c1e9a3b-4d2f-4a6e-9b1c-2d3e4f5a6b7c",
    actor_id="agent-crm-assistant",
    actor_type=ActorType.AGENT,
    target_system="salesforce",
    target_resource="Opportunity/006xx000004TmiQAAS",
    target_operation="bulk_delete",
)
emitter.decided(
    action_id="7c1e9a3b-4d2f-4a6e-9b1c-2d3e4f5a6b7c",
    decision=Decision.DENY,
    principal_type=PrincipalType.HUMAN,
    cost=Cost(amount=0.0037, currency="usd", wasted=True),
)
# No executed() call follows: spec §5.2 Pattern C forbids one after a denial.

See spec/SPECIFICATION.md for the full event model and ../examples/ for worked examples of every completion pattern.

Development

uv sync
uv run pytest
uv run ruff check .
uv run pyright

Metadata

Release files for agent-audit-record 0.1.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 agent-audit-record 0.1.0
File Size Uploaded
agent_audit_record-0.1.0.tar.gz 57.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-audit-record 0.1.0
File Interpreter ABI Platform
agent_audit_record-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.0 kB

Release files / agent_audit_record-0.1.0.tar.gz

Download URL agent_audit_record-0.1.0.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f08e18585b5934a177ef615d84f299340935d6a7bf1cd2a0b1b9ce590fbf4ac3
BLAKE2b-256 checksum
How to use checksums
5d921acc6dd3336f5cf78e1445b45feb1d4d24473e0e17646efb22565465f286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / agent_audit_record-0.1.0-py3-none-any.whl

Download URL agent_audit_record-0.1.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c66b1ec077dd9a645b6da83cde10c0d0dbb01e061137be8d8c1d4666215eaac
BLAKE2b-256 checksum
How to use checksums
d7ae1d8d9a1df3bec67d463a5d0d15f5491db71404b8a6c73a82dc31e0cb1faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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