Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agenttrace_py-0.1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agenttrace_py-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file agenttrace_py-0.1.2.tar.gz.

File metadata

  • Download URL: agenttrace_py-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for agenttrace_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c2c68681e5659d0b815bd9f47e6044d54050c237da57c449050937c4142efef2
MD5 4e07ccb61d1d8c93f9c9e4f203bd5c1e
BLAKE2b-256 2cbef3969ca128b6ca9bd2a448b3440d5cc329ddd76787f34376285654f9d3df

See more details on using hashes here.

File details

Details for the file agenttrace_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agenttrace_py-0.1.2-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

Hashes for agenttrace_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c08ddf08c5ebeb44ed9ae1912f46ab2c0dfcf7dc5f93ab409502f1783088f10b
MD5 12d03a122cca855e6cbe6708e96b9a02
BLAKE2b-256 32d6f3c93c7af916ebcf60c958d5f796325ac20b70c0894ead8d099ad8639f05

See more details on using hashes here.

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