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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_audit_record-0.1.0.tar.gz (57.4 kB view details)

Uploaded Source

Built Distribution

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

agent_audit_record-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file agent_audit_record-0.1.0.tar.gz.

File metadata

  • Download URL: agent_audit_record-0.1.0.tar.gz
  • Upload date:
  • Size: 57.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_audit_record-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f08e18585b5934a177ef615d84f299340935d6a7bf1cd2a0b1b9ce590fbf4ac3
MD5 6b4dd0783697db66bb828851c1118b05
BLAKE2b-256 5d921acc6dd3336f5cf78e1445b45feb1d4d24473e0e17646efb22565465f286

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_audit_record-0.1.0.tar.gz:

Publisher: release.yml on katekruger/agent-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_audit_record-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_audit_record-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c66b1ec077dd9a645b6da83cde10c0d0dbb01e061137be8d8c1d4666215eaac
MD5 10669bba2693efc904c52855946fa6eb
BLAKE2b-256 d7ae1d8d9a1df3bec67d463a5d0d15f5491db71404b8a6c73a82dc31e0cb1faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_audit_record-0.1.0-py3-none-any.whl:

Publisher: release.yml on katekruger/agent-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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