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.0a2"

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.0a2.tar.gz (114.0 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.0a2-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentlint_trace-0.1.0a2.tar.gz
  • Upload date:
  • Size: 114.0 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.0a2.tar.gz
Algorithm Hash digest
SHA256 c0642ab822326cac18914177225ec7030d357b201225335868fc11e7cdadafca
MD5 fb4044a37ffe607498f16c49ed71cc8f
BLAKE2b-256 c275e0184a46838367dc6bd25e6b89af48b7efb29995b19479207d993e3a9ca2

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlint_trace-0.1.0a2.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.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for agentlint_trace-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 c293f157603fa211420775beae5ddb825a6adf8efa2e2c2c6992621ff8359526
MD5 3bce98aeda2d63c8ce353a6e2cef7909
BLAKE2b-256 aa053f8835def1a46001e38e28b908c34c1a81f1f880af12feeec599951a2839

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlint_trace-0.1.0a2-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