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.13.tar.gz (26.6 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.13-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agenttrace_io-0.4.13.tar.gz
  • Upload date:
  • Size: 26.6 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.13.tar.gz
Algorithm Hash digest
SHA256 e1608259a4477cac38dc636ab32c2e4ed1ca097701d76aa977a3d82b3207f086
MD5 b889d756722af57b1e50c225b31d6739
BLAKE2b-256 5b18b00c558adf5098a857e74482c3267ea5192baf541b6bfc64a04fafb18f46

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenttrace_io-0.4.13.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.13-py3-none-any.whl.

File metadata

  • Download URL: agenttrace_io-0.4.13-py3-none-any.whl
  • Upload date:
  • Size: 18.0 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.13-py3-none-any.whl
Algorithm Hash digest
SHA256 76aa015396218e3d92bd9bf05645d3c3c2f09d5ce57e462263169ad27ea0e1b8
MD5 68d87f0ed9dd3257ebe7fdb4dc9ce3f3
BLAKE2b-256 1a44964da95f8ffeeeebaca2f1e32349878c34195d3d9df939598cb5a0c0c7e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenttrace_io-0.4.13-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