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.22.tar.gz (27.0 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.22-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agenttrace_io-0.4.22.tar.gz
  • Upload date:
  • Size: 27.0 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.22.tar.gz
Algorithm Hash digest
SHA256 343102fbf4af8badf7ab2dc2cb7c37aa76ca72b9f06dee0ad1fcef7780665d1b
MD5 9cbb07dbd09c3de911e2bc9c64e459ca
BLAKE2b-256 d8a133d4a9befb43a22ffdc3e06c863c37e0d890b96a5c760d2a745477387d8a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agenttrace_io-0.4.22-py3-none-any.whl
  • Upload date:
  • Size: 18.2 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.22-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ed04705f94a5b3681e80c3d68652428494f5b4b928326245b72e0a0b4d63ec
MD5 f57e0f4b2beb39e0a640a44eb6ccc634
BLAKE2b-256 4146636e6b0fbe661375c1e1aacf711629f484c6824a65c002d73e255ad84e75

See more details on using hashes here.

Provenance

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