Skip to main content

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

Rewyn demo

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

rewyn-0.1.0.tar.gz (545.6 kB view details)

Uploaded Source

Built Distribution

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

rewyn-0.1.0-py3-none-any.whl (614.1 kB view details)

Uploaded Python 3

File details

Details for the file rewyn-0.1.0.tar.gz.

File metadata

  • Download URL: rewyn-0.1.0.tar.gz
  • Upload date:
  • Size: 545.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rewyn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22001f1f03f1db888d3bac6ccc5ce217b30625e2eac96e3ff49a64e237992725
MD5 8dbd2c4e3cde959611873c1a18f94eba
BLAKE2b-256 d74dc642cce72003fc358a558345cdd8e7a53454d52a9f85f033b9d9dd441728

See more details on using hashes here.

Provenance

The following attestation bundles were made for rewyn-0.1.0.tar.gz:

Publisher: release.yml on rewyn-dev/rewyn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rewyn-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rewyn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 614.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rewyn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d31525f31889ecd6193a9d946fbf34668c174bb4f3a69c33a75f13c47dca9763
MD5 ae960caabb02c419700cc9c4a98f9382
BLAKE2b-256 9fb8c399e0bb462ba8c4f9250c6228fdf7be9a3e9efe4f4b6b1aff2a69048a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for rewyn-0.1.0-py3-none-any.whl:

Publisher: release.yml on rewyn-dev/rewyn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page