This release is a pre-release and may not be stable for production use.
Dream-RSI SDK · Alpha
Bring your agent. Record its search. Evolve executable exploration policies.
An independent, unofficial Python SDK inspired by Dream-RSI research. Maintained by TheAstrayDev, who is not a Google or Google DeepMind employee. This is a personal research initiative, not a commercial Google development, official SDK or endorsed product.
Python 3.11+ · zero core third-party dependencies · Apache-2.0 · version 0.2.0a3.
Install
python -m pip install --upgrade dreamrsi==0.2.0a3
The package includes the Python API and the dreamrsi command. Publishing policy
packages to GitHub additionally requires GitHub CLI (gh).
New in 0.2.0a3
Discovery trees snapshot attempt data as nodes are added, so later agent-side mutations cannot rewrite recorded observations. The free replay optimizer now tests several branching and stopping policies before parameter tweaks. A deterministic regression tree shows the same recorded quality with one attempted expansion instead of three; unseen-task savings still require independent validation. See the release notes.
Third-party policy and replay packages
Version 0.2.0a2 adds portable JSON bundles and GitHub-hosted package sharing. Community developers can distribute policy versions and recorded discovery trees; recipients import them into local SQLite memory with their own agent, quality metric, task-family contract and acceptance rules. These replay datasets contain observed search transitions, not model weights. Saved policies can avoid repeated development when they meet the recipient's quality floor; new tasks still run the recipient's agent.
dreamrsi list
dreamrsi install OWNER/REPOSITORY
dreamrsi save my-policy-pack --all
dreamrsi publish .dreamrsi/packages/exports/my-policy-pack.dreamrsi.json
Use a real package reference for OWNER/REPOSITORY. Export requires previously saved
memory; publication requires GitHub CLI and creates a public repository. See the
complete walkthrough
for the diagram, executable integration example, and compatibility requirements.
Basic agent integration
from dreamrsi import Budget, DreamRSI
rsi = DreamRSI(
agent=lambda task: task.upper(),
evaluator=lambda answer: float(len(answer)),
budget=Budget(model_calls=4),
)
result = rsi.run_sync("hello")
print(result.best) # HELLO
This example demonstrates integration, not quality improvement. Stateful adapters support
generate/evaluate/refine tasks. Replay uses recorded outcomes without new discovery calls.
LLMPolicyDeveloper writes and iteratively rewrites executable source from measured feedback.
Version 0.2.0a1 adds opt-in persistent champion reuse and more conservative replay
cost accounting. It can replay already recorded runs without a new training call,
delays holdout collection until a replay-improving candidate exists, and stops
repeated policy revisions. The default promotion gate requires paired raw-quality
and probe evidence; applications needing score-only decisions can explicitly use
ReplayOnlyGate. An end-to-end cost advantage for an LLM discovery agent has
not been proven.
The SDK includes configurable Docker-free policy interpreters, optional process execution,
held-out validation, SQLite recovery and reported token/USD accounting.
Two measured experiments
In the Bonsai Q2 experiment, a real local model wrote executable policy code while a deterministic agent solved the tasks. Across 64 fresh fixture tasks, counted operations fell from 256 to 248 with raw quality 0.9 throughout. This is a logical-operation proxy, not a measured token or dollar saving for an LLM agent.
In the GPT-6 Luna xhigh experiment, the real model both solved tasks and developed policies. Deployment fell from 24 to six model requests across six held-out tasks, but 94 preparation requests made the full path 100 versus 24. Mean reported score was slightly lower. This demonstrates learning and reuse, not an all-in economic win.
- Full documentation and roadmap
- Bonsai Q2 experiment
- GPT-6 Luna experiment
- Integration and recovery
- Sandbox configuration
- Issues
- Original Dream-RSI paper
Alpha APIs may change. Generated source runs in a bounded Python-syntax subset, not arbitrary Python. External state isolation and remote cancellation require adapter support. Usage caps depend on accurate provider reports and ceilings. Research-scale performance and broad generalization remain unverified.
Metadata
Release files for dreamrsi 0.2.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dreamrsi-0.2.0a3.tar.gz | 120.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dreamrsi-0.2.0a3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 258.6 kB
Release files / dreamrsi-0.2.0a3.tar.gz
| Download URL | dreamrsi-0.2.0a3.tar.gz |
|---|---|
| Size | 120.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cedf0bab66d50df488154c8108fac474b17d50573e8fb3d247821d285a27c585
|
|
BLAKE2b-256 checksum How to use checksums |
556441d7057dce676777affbb6806be623a09b09216fb1842e35e30f278f38a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / dreamrsi-0.2.0a3-py3-none-any.whl
| Download URL | dreamrsi-0.2.0a3-py3-none-any.whl |
|---|---|
| Size | 137.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7d6f9888d69cf19c7de3434c520e7077512d0c09d15d96e7eab7910bf585df8
|
|
BLAKE2b-256 checksum How to use checksums |
a80b206bbc8d1cd981ee6bf2d2818e9787e25af938e491586b425caebb9a4e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log