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.4.4.tar.gz (20.6 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.4.4-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rewind_agent-0.4.4.tar.gz
  • Upload date:
  • Size: 20.6 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.4.4.tar.gz
Algorithm Hash digest
SHA256 35109aac8bfab294a068b4c6cda10ec1da20adff530cb3ab1f69c392b951b5ee
MD5 2c505f686ead7c47fb0e8920d5c3ef28
BLAKE2b-256 7ab84634a79d0819fa96f6bb693214c294cb36337c6445376a36fb2e875fc72c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rewind_agent-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 21.1 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.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0812aad62a4fc20dc66ada851aab8a4647d6879a9b0313e550617f3d02ec910e
MD5 3216fdec40e66dabb80bae9207f6358e
BLAKE2b-256 9aa51d26dc2d61742b05e5730c204357eb2edd34b015d569b568b0e55d3162b1

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