Metadata-Version: 2.4
Name: rewind-agent
Version: 0.4.3
Summary: Chrome DevTools for AI agents — record, inspect, fork, replay, diff.
Project-URL: Homepage, https://github.com/agentoptics/rewind
Project-URL: Repository, https://github.com/agentoptics/rewind
Project-URL: Issues, https://github.com/agentoptics/rewind/issues
Project-URL: Changelog, https://github.com/agentoptics/rewind/blob/main/CHANGELOG.md
Author: Rewind Contributors
License-Expression: MIT
Keywords: agents,ai,anthropic,crewai,debugging,langgraph,llm,observability,openai,time-travel
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Provides-Extra: all
Requires-Dist: anthropic>=0.18; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.18; extra == 'anthropic'
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == 'openai'
Description-Content-Type: text/markdown

# rewind-agent

**Python SDK for [Rewind](https://github.com/agentoptics/rewind) — the time-travel debugger for AI agents.**

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

## Install

```bash
pip install rewind-agent
```

Requires the Rewind CLI for recording. Install with:

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

## Quick Start

```python
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:

```python
@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

```python
# LangGraph
graph = rewind_agent.wrap_langgraph(compiled_graph)

# CrewAI
crew = rewind_agent.wrap_crew(crew)
```

## Learn More

- [GitHub](https://github.com/agentoptics/rewind)
- [Changelog](https://github.com/agentoptics/rewind/blob/main/CHANGELOG.md)
- [Examples](https://github.com/agentoptics/rewind/tree/main/examples)
