Skip to main content

Chrome DevTools for AI agents — record, inspect, fork, replay, diff.

Project description

rewind-agent

Python SDK for Rewind — the time-travel debugger for AI agents.

Record every LLM call. See the exact context window. Fork, fix, replay — without re-running.

Install

pip install rewind-agent

Requires the Rewind CLI for recording. Install with:

curl -fsSL https://raw.githubusercontent.com/agentoptics/rewind/main/install.sh | sh

Quick Start

import rewind_agent

# Auto-patches OpenAI/Anthropic clients to route through the Rewind proxy
rewind_agent.init()

# Your existing agent code runs unchanged — all LLM calls are recorded
client = openai.OpenAI()
client.chat.completions.create(model="gpt-4o", messages=[...])

Agent Hooks

Enrich recordings with semantic labels:

@rewind_agent.step("search")
def search(query: str) -> str:
    return client.chat.completions.create(...)

@rewind_agent.tool("calculator")
def calculate(a: float, b: float) -> float:
    return a + b

with rewind_agent.trace("analysis"):
    rewind_agent.annotate("confidence", 0.92)
    result = search("Tokyo population")

Framework Adapters

# LangGraph
graph = rewind_agent.wrap_langgraph(compiled_graph)

# CrewAI
crew = rewind_agent.wrap_crew(crew)

Learn More

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

rewind_agent-0.5.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

rewind_agent-0.5.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file rewind_agent-0.5.0.tar.gz.

File metadata

  • Download URL: rewind_agent-0.5.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for rewind_agent-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3c8ed21ef01e7b978f6db47056876fc75604abd2ed6f35d70cecceeef752a77d
MD5 e9e52e1f1c922abbb10e8ee9daaa2c7a
BLAKE2b-256 ca00e66a941ecd4e284c97633deab58d9034d9d5ccb0afb3e27060067ae64552

See more details on using hashes here.

File details

Details for the file rewind_agent-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: rewind_agent-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for rewind_agent-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac247b86a24d9ec2a09ea3996c59cd9f3471b081b3bd9754f2774585ad22bba0
MD5 b6abd015866f17d91bbc74881d4bbbc7
BLAKE2b-256 0e0a4bc42c157c07c06d894e2edcdf0dd1fe232db45d15f3ffe9baf8538372d4

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