Skip to main content

A CI linter for AI agent execution traces.

Project description

AgentLint

CI Python 3.12+ PyPI

AgentLint checks recorded agent runs for unsafe tool use, missing approvals, sensitive-data flows, and unsupported claims.

Integrations

Integration Workflow
OpenAI Agents SDK Automatic pytest capture or instrument() in any Python runner
OpenTelemetry Import existing OTLP-style JSON

Install

python -m pip install "agentlint-trace[openai-agents]==0.1.0a1"

AgentLint requires Python 3.12 or newer.

Define a policy

Create agentlint.yaml:

version: 1
policy_id: customer_support

tools:
  lookup_status:
    permission: allowed
    approval: not_required

  issue_refund:
    permission: allowed
    approval: required

rules:
  unknown_tool: error
  denied_tool_call: error
  missing_approval: error

Run

Pytest is optional. Choose the workflow that fits the project.

Pytest

pytest --agentlint --agentlint-policy agentlint.yaml

The command runs the tests, captures their agent traces, and checks the saved run. Artifacts are written to .agentlint/runs/.

agentlint check-run .agentlint/runs/latest.json

Use a test marker or routing file when tests require different policies.

Any Python runner

from agentlint.integrations.openai_agents import instrument

session = instrument(".agentlint/openai-agents")

# Run the agent.

snapshot_paths = session.close()

Check the capture directory:

agentlint check-capture .agentlint/openai-agents --policy agentlint.yaml

check-capture also accepts one JSON file and detects OpenAI Agents, OpenTelemetry, and native AgentLint formats.

Sample output

AgentLint Report
traces: 0 passed, 1 failed, 0 not verifiable, 0 invalid
diagnostics: 1 error, 0 warning, 0 info

error[DENIED_TOOL_CALL]: tool call "evt_delete_account" uses tool
"delete_account" denied by trace policy
  related events: evt_delete_account
  remediation: Remove the call or update the trace policy when this tool
  should be permitted.

Documentation

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

agentlint_trace-0.1.0a1.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

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

agentlint_trace-0.1.0a1-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

Details for the file agentlint_trace-0.1.0a1.tar.gz.

File metadata

  • Download URL: agentlint_trace-0.1.0a1.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentlint_trace-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 04843d2d8f25e1c4c4cc455572dc36edf59b2094feff6944d49bd63da675ad66
MD5 516065f5216ed98283f11181a6e08deb
BLAKE2b-256 b57874b3f5a7152a1dbb50dad33318c15bc4142b45efe9c1fd1ed8ef0dd78a75

See more details on using hashes here.

Provenance

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

Publisher: release.yml on DarrelFW321/AgentLint

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

File details

Details for the file agentlint_trace-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentlint_trace-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 854fc1ece6ebacc5c98ef7cbf6be4b8db14afd157fc5b2e31affef3dcb2756b7
MD5 f8ce182633c61030d2810e10d02ed9e1
BLAKE2b-256 7a2a538762ea93ffc0d1917ac73ecf30125e8693cb607046d8aa6c9066250b6d

See more details on using hashes here.

Provenance

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

Publisher: release.yml on DarrelFW321/AgentLint

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

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