Rewyn
Build. Run. Replay. Improve AI.
Agents fail in ways tests do not catch. They worked yesterday, they answer differently today, and the run that proves it is gone.
Rewyn records every run so you can go back to it. Every primitive emits a structured event, so any run can be replayed exactly, diffed against another, scored, and turned into a regression test — long after it happened.
It is provider-agnostic, framework-independent, and local-first: no account, no API key, no network.
from rewyn import Agent
agent = Agent(model="openai:gpt-5")
result = agent.run("Research the latest electric vehicle market")
Every primitive emits structured execution events. Every run is recorded
locally under .rewyn/, can be inspected, exported, replayed, diffed and
turned into a regression test.
from rewyn.evaluation.dataset import Dataset
from rewyn.evaluation.metrics import exact_match
from rewyn.evaluation.regression import run_regression
from rewyn.replay.replay import replay
# Reproduce the run exactly, with no provider call.
replay(result.run_id)
# A production run becomes a regression test.
dataset = Dataset(name="critical")
dataset.add_run(result.run_id)
report = run_regression(dataset, agent, evaluators=[exact_match()])
print(report.render())
See it work
uv run python -m demo
A minute, offline, no API key. A support agent that works; the same desk built full stack with retrieval, memory, MCP, a subagent, a graph and a hostile customer email that cannot override policy; the same agent giving a different answer the next day; and the diff, replay and release gate that catch it. See demo/.
Install
pip install rewyn # core, provider agnostic
pip install "rewyn[openai]" # OpenAI adapter
pip install "rewyn[anthropic]" # Anthropic adapter
pip install "rewyn[google]" # Google Gemini adapter
pip install "rewyn[mcp]" # Model Context Protocol client/server
pip install "rewyn[redis]" # shared memory and checkpoints
pip install "rewyn[s3]" # S3-compatible object storage
pip install "rewyn[search]" # Elasticsearch / OpenSearch retrieval
pip install "rewyn[ui]" # the local console (rewyn ui)
pip install "rewyn[all]" # everything
Rewyn is local-first: no account, no cloud, no Rewyn API key.
CLI
rewyn init | runs | inspect | replay | diff | eval | test | datasets
| manifest | drift | export | import | doctor | skills | mcp | agents
| ui | login | logout | sync
Console
pip install "rewyn[ui]"
rewyn ui # http://127.0.0.1:4400
An execution debugger for your own runs: the timeline of everything an agent
did, the execution graph, and a context inspector that shows which item came
from where, at which version, and how much of the budget it cost. No account
and no cloud -- it reads the .rewyn/ you already have. The cloud console
serves the same screens over a team's runs. See docs/ui.md.
Cloud (optional)
Rewyn is complete without it, and always will be. When a team wants shared runs, centralised datasets and evaluation history that outlives one laptop, the SDK syncs to a hosted service:
rewyn login --endpoint https://api.rewyn.dev --key rw_...
rewyn sync
The client half of that protocol is here and open source, so what a deployment speaks stays inspectable. Uploads retry, buffer locally when the service is unreachable, and never raise into your application. See docs/cloud.md and https://rewyn.dev.
Development
make install # uv sync with all extras
make check # ruff + mypy --strict + pytest
Documentation
docs/ has a page per subsystem, each with a concept, a minimal example, a production example, an API pointer and the failure modes. Start with getting started.
The golden demo is one application that uses every subsystem and then replays, diffs, evaluates and gates itself, offline:
uv run python -m examples.enterprise_research_agent
Rewyn also works alongside what you already run: Redis, PostgreSQL with pgvector, S3, Elasticsearch, OpenTelemetry, other agent frameworks, and other agents over an agent-to-agent interface. See integrations.
See docs/ for the subsystem guides, and
CONTRIBUTING.md if you would like to help.
License
Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rewyn-0.1.1.tar.gz.
File metadata
- Download URL: rewyn-0.1.1.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24a444f4b0aef8359029aac56a309c7fd7d3aa075f6184bb9a7c288a716e34de
|
|
| MD5 |
e057243d9d6243a167cc40b027e9e032
|
|
| BLAKE2b-256 |
bf1365d5774f3b9a3618101618498a69cc2e90f5841023173cf74fcb5e4762ea
|
Provenance
The following attestation bundles were made for rewyn-0.1.1.tar.gz:
Publisher:
release.yml on rewyn-dev/rewyn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rewyn-0.1.1.tar.gz -
Subject digest:
24a444f4b0aef8359029aac56a309c7fd7d3aa075f6184bb9a7c288a716e34de - Sigstore transparency entry: 2883408728
- Sigstore integration time:
-
Permalink:
rewyn-dev/rewyn@60e0f3107f7dfefb35dd3afdd8a333f457cc6c5c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rewyn-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@60e0f3107f7dfefb35dd3afdd8a333f457cc6c5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file rewyn-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rewyn-0.1.1-py3-none-any.whl
- Upload date:
- Size: 557.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ded73b9887b2c583ff680ffb4bf0dbe80535fa3281a1af2cc91189eeb64a035
|
|
| MD5 |
76abe6ccf7c909f5cd388898d84dd256
|
|
| BLAKE2b-256 |
72ed70f28cc3d821a54407d33bf36b372aa9dde6343ccb7b2dfd5ac63303003f
|
Provenance
The following attestation bundles were made for rewyn-0.1.1-py3-none-any.whl:
Publisher:
release.yml on rewyn-dev/rewyn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rewyn-0.1.1-py3-none-any.whl -
Subject digest:
8ded73b9887b2c583ff680ffb4bf0dbe80535fa3281a1af2cc91189eeb64a035 - Sigstore transparency entry: 2883408736
- Sigstore integration time:
-
Permalink:
rewyn-dev/rewyn@60e0f3107f7dfefb35dd3afdd8a333f457cc6c5c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rewyn-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@60e0f3107f7dfefb35dd3afdd8a333f457cc6c5c -
Trigger Event:
push
-
Statement type: