Deterministic execution and replay layer for AI Agents
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agenttrace_py-0.1.1.tar.gz.
File metadata
- Download URL: agenttrace_py-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bae8b1835c949f8e494483528210ef9400800481b0bb8061caf0e6a2f3f5dd9
|
|
| MD5 |
29c29df8c1be3a0d64a9b0f4b1a4e0e5
|
|
| BLAKE2b-256 |
cca94c0d9130bac799cd85bffe12702d7ae4a84de248d34b72fb0893b84e8be5
|
File details
Details for the file agenttrace_py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agenttrace_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b04eea6601656832addb6a50d0a376945f156ad6bc49cb1ae77a91c8eebc9f5d
|
|
| MD5 |
67f16dba9119a479ec3d1092e48d6143
|
|
| BLAKE2b-256 |
c24ccf597e77abab2785203727f0c829af5c1fe9153ea71795dcbbceef63e147
|