Honest multi-agent research framework — engine + DSL/gates kits + LLM Protocols
Project description
rainforest-lab (Python package)
pip install rainforest-lab — the engine of the rainforest research framework.
This package implements the rainforest engine (v1 + v2.0 multi-agent deliberation + v2.1 trajectory
primitives), four LLM Protocols, a LiteLLM reference adapter, and two reusable kits (dsl, gates)
so each new domain plugin stays ~150 lines.
See the top-level README for the project vision; this README is package-level.
Install
pip install rainforest-lab
# Optional: LiteLLM reference adapter (~100 providers behind one interface)
pip install "rainforest-lab[litellm]"
30-second tour
from rainforest_lab import (
DemoDomain, Forest, run_cycle,
MockGardener, MockInspector, MockSkeptic,
DeliberationConfig, ParallelGardenersConfig,
)
# Build a Forest, then drive one cycle with mocked LLMs (replace with real ones in production).
# See examples/quick_start.py for a runnable end-to-end demo.
examples/quick_start.py— end-to-end demo with mocked LLMs.examples/bring_your_own_llm.py— plug your own LLM SDK in via the framework's builders.examples/write_your_own_domain.py— template for a new market plugin (~150 lines).
What's in here
| Module | What |
|---|---|
state · validate · classify |
Canonical state model + fail-loud validator + result classification |
weather · seeds · roles · events · handoff |
Per-cycle attention router, seed scoring/nursery, agent-attributed events, schema'd handoff protocol |
cycle · deliberation · trajectories |
The cycle driver, v2.0 multi-agent deliberation, v2.1 trajectory evolution primitives |
domain |
The ResearchDomain ABC + cache_dir() helper |
dsl.types · dsl.parser · dsl.evaluator · dsl.random_formula |
The DSL kit |
gates.factor_gates · gates.matched_random · gates.profiles |
The gates kit |
llm.protocols · llm.builders · llm.litellm_adapter · llm.mocks |
LLM-agnostic protocols + builders + reference adapter |
domains.demo |
Reference domain plugin using the kits |
Rigor invariants (test-guarded)
- Gate completeness is a type invariant — a result cannot classify as
fruitwithout a completeGateRecordandexecution_mode == "tool_executed". - Single writer —
cycle.run_cycleis the only forest-state mutator; deliberation and trajectory operators are pure (read-only onForest). - Different-model skeptic —
make_llm_skepticrefuses to run when its model family equals the gardener's. - No fruit by lineage — trajectory
mutate/crossoverproduce children withfinal_classification = None; sick parents are excluded. - No silent fallback — LLM unavailability is always hard fail.
License
MIT. See ../LICENSE.
Project details
Release history Release notifications | RSS feed
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 rainforest_lab-0.1.0.tar.gz.
File metadata
- Download URL: rainforest_lab-0.1.0.tar.gz
- Upload date:
- Size: 65.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da7f97739e268e335a62bb4b463072ed3e901276df86f26c5b8ca57d915f289
|
|
| MD5 |
09a74b2f5f6e6e842054b9600a36eeac
|
|
| BLAKE2b-256 |
c6e6ef6253ffc06ebab7e0419a929d0eee76be55f1a9c86553440527c34a5da1
|
Provenance
The following attestation bundles were made for rainforest_lab-0.1.0.tar.gz:
Publisher:
release.yml on KrakenP/rainforest-lab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rainforest_lab-0.1.0.tar.gz -
Subject digest:
3da7f97739e268e335a62bb4b463072ed3e901276df86f26c5b8ca57d915f289 - Sigstore transparency entry: 1657166819
- Sigstore integration time:
-
Permalink:
KrakenP/rainforest-lab@6020371d53a7590b124683c49342b8fce6cd0625 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KrakenP
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6020371d53a7590b124683c49342b8fce6cd0625 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rainforest_lab-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rainforest_lab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2ad5f72f9dc34b288024d4912f877fecee8b291ec7675f5858d285a65e2adf1
|
|
| MD5 |
7d3a58b6eae51266f2009f93f04512ba
|
|
| BLAKE2b-256 |
3a27f73d393fa86e88281b0c71387bff02dcf06908ca862db552c3b7997a13ee
|
Provenance
The following attestation bundles were made for rainforest_lab-0.1.0-py3-none-any.whl:
Publisher:
release.yml on KrakenP/rainforest-lab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rainforest_lab-0.1.0-py3-none-any.whl -
Subject digest:
f2ad5f72f9dc34b288024d4912f877fecee8b291ec7675f5858d285a65e2adf1 - Sigstore transparency entry: 1657166939
- Sigstore integration time:
-
Permalink:
KrakenP/rainforest-lab@6020371d53a7590b124683c49342b8fce6cd0625 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KrakenP
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6020371d53a7590b124683c49342b8fce6cd0625 -
Trigger Event:
push
-
Statement type: