Skip to main content

Record, replay, fork & share AI agent executions

Project description

retrace-sdk

The execution replay engine for AI agents. Record every LLM call, tool invocation, and error your AI agent makes. Replay step-by-step. Fork from any point. Share interactive traces via URL.

Install

pip install retrace-sdk

Requires Python 3.10+.

Quick Start

import retrace

retrace.configure(api_key="rt_live_...")  # Get your key at retrace.yashbogam.me/settings

@retrace.record(name="my-agent")
def run_agent(prompt: str):
    response = client.chat.completions.create(
        model="gpt-5.5",
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content

run_agent("What is quantum computing?")

Auto-Instrumentation

Retrace automatically captures LLM calls from all major providers:

# OpenAI — captured automatically
# Anthropic — captured automatically
# Google Gemini — captured automatically

No extra setup needed. Install the provider SDK alongside retrace-sdk and calls are captured.

Features

  • Record — One decorator captures every LLM call, tool call, and error
  • Replay — Step through executions with play/pause/speed controls
  • Fork — Branch from any step, modify input, watch a new path diverge
  • Share — Publish traces as shareable "tapes" with interactive playback
  • Retrace AI — Built-in evaluations, memory extraction, and semantic search

API Key

A Retrace API key (rt_live_...) is required. Get yours free at retrace.yashbogam.me/settings.

Links

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

retrace_sdk-0.2.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

retrace_sdk-0.2.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file retrace_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: retrace_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for retrace_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c01e51509986067d426597ad4659ec3643f110eb6c5fa75df78d6d290adbfe53
MD5 3fd6d1c981409bbfc06fbefe7ee304ea
BLAKE2b-256 252364830634882fdb144c83e92a4e7a834e22e616936963d8707d58aadf2a89

See more details on using hashes here.

File details

Details for the file retrace_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: retrace_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for retrace_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dff75eae1361d95de2f06e7eb3f23bd5f8b81c10a76953e7ce5088a88f9c04c9
MD5 c7e2858b627a16b59a36150360e98542
BLAKE2b-256 f8964885318b0228b41a90a7d055accc957a6e67dea99776daba471f13aa7244

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