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.3.1.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.3.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agenttrace_io-0.3.1.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.3.1.tar.gz
Algorithm Hash digest
SHA256 fe368ecdd90cc8c635f87b8408db03c824bccebe85e81bf9e6aaa752bf8edd58
MD5 a4f0dda6fe0241c80a9881a57f1908ae
BLAKE2b-256 84ae1966d1b5760b31815c73fc687c7c4d7cc2059917a323838605de5ac5d71d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agenttrace_io-0.3.1-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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb4585c728c559967253a1387a289eaa9ff85c10940d6a0493899780957acd9
MD5 5922b98bb7dfa3f004dea1054d46959d
BLAKE2b-256 b7668d0f20022b88fb99f5fdfd29a10af3b60ccbff8a5b1a3fbd7cc525c6110a

See more details on using hashes here.

Provenance

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