Skip to main content

AgentTrace Python SDK - Drop-in tracing for any AI agent

Project description

agenttrace-io (Python SDK)

Drop-in tracing for any AI agent. Local SQLite storage, zero dependencies, zero cloud.

Installation

pip install agenttrace-io

Requires Python 3.10+.

Quickstart

from agenttrace import init, trace

agent = init(db_path="./traces.db")

# Trace a callable
result = agent.trace("my-op", lambda: 42 * 2)

# Use as decorator
@trace("greet")
def greet(name: str) -> str:
    return f"Hello, {name}"

# Use as context manager
with agent.trace("context-op") as t:
    value = "computed"
    t.set_output(value)

# Query and export
traces = agent.get_traces()
stats = agent.get_stats()
agent.export("json")
agent.close()

See the full README for more.

License

MIT © Klepsiphron

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

agenttrace_io-0.4.19.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

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

agenttrace_io-0.4.19-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file agenttrace_io-0.4.19.tar.gz.

File metadata

  • Download URL: agenttrace_io-0.4.19.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agenttrace_io-0.4.19.tar.gz
Algorithm Hash digest
SHA256 0dba789004a5abc52d86a88136bb31c6e2a1a7641bb2bed3641296f4565b448b
MD5 6cd5799a6acddbfc65f29082b461720d
BLAKE2b-256 59d9af3aeb5a3afa0bf072bc4adf49beb655ad8b967b62447b64e848b444806b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenttrace_io-0.4.19.tar.gz:

Publisher: release.yml on Klepsiphron/agenttrace

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

File details

Details for the file agenttrace_io-0.4.19-py3-none-any.whl.

File metadata

  • Download URL: agenttrace_io-0.4.19-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agenttrace_io-0.4.19-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d9b5541895ab04ca96d7f3aa6c5677eb39d7eeebd146e6e460af9abb3c43cc
MD5 dc053daf34e6521470417e7dbb829bcf
BLAKE2b-256 d73dca4bd05454d5654e9ab51bab7b7e0ab9a30f51881f4142bfebe7c8306c4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenttrace_io-0.4.19-py3-none-any.whl:

Publisher: release.yml on Klepsiphron/agenttrace

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