AgentTrace Python SDK
The deterministic execution and replay layer for AI Agents.
Stop guessing why your agents crash in production. AgentTrace records every LLM call, tool execution, and intermediate state—letting you rewind time, fork the execution, and test fixes instantly.
Installation
pip install agenttrace
Quick Start (The "Thin" SDK)
AgentTrace works as a thin data-collection layer. Simply decorate your main entry point, and use with agenttrace.step() to log intermediate actions. The SDK automatically bundles the events and syncs them securely to your dashboard.
import agenttrace
# 1. Initialize with your API Key
agenttrace.init(api_key="at_live_...")
# 2. Add the @agenttrace.run decorator to track the entire execution
@agenttrace.run(name="checkout_agent")
def main():
# 3. Log an LLM call or thought process
with agenttrace.step("Planning Phase", type="thought"):
plan = "Validating the order."
# 4. Log a tool execution
with agenttrace.step("Validate Order", type="tool_call", input={"order_id": 123}):
# Your custom tool code here
result = {"status": "valid"}
agenttrace.set_result(result)
return {"success": True}
if __name__ == "__main__":
main()
When main() finishes, the complete trace is uploaded securely and becomes available in your AgentTrace dashboard for debugging and forking.
Metadata
Release files for agenttrace-py 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agenttrace_py-0.1.2.tar.gz | 5.1 kB | Without provenance | Details for agenttrace_py-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agenttrace_py-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for agenttrace_py-0.1.2-py3-none-any.whl |
Total release size: 11.3 kB
Release files / agenttrace_py-0.1.2.tar.gz
| Download URL | agenttrace_py-0.1.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2c68681e5659d0b815bd9f47e6044d54050c237da57c449050937c4142efef2
|
|
BLAKE2b-256 checksum How to use checksums |
2cbef3969ca128b6ca9bd2a448b3440d5cc329ddd76787f34376285654f9d3df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / agenttrace_py-0.1.2-py3-none-any.whl
| Download URL | agenttrace_py-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c08ddf08c5ebeb44ed9ae1912f46ab2c0dfcf7dc5f93ab409502f1783088f10b
|
|
BLAKE2b-256 checksum How to use checksums |
32d6f3c93c7af916ebcf60c958d5f796325ac20b70c0894ead8d099ad8639f05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for agenttrace-py 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.