DarwinAgent
Evolution for the Agent Era
An open Python framework for experience-driven recursive self-improvement of agents. Run a task, propose changes to its assets, evaluate candidates independently, and retain effective versions and experience. Version 0.1.2 is experimental; improvement must be measured.
Install
Python 3.11 or newer is required. One package provides both the command-line tool and the Python API:
python -m pip install --upgrade darwinagent
darwinagent --version
Configure a model
Live execution requires your own OpenAI-compatible Chat Completions endpoint. Create .env in the directory where you run commands:
DARWINAGENT_BASE_URL=https://your-provider.example/v1
DARWINAGENT_MODEL=your-model-name
DARWINAGENT_API_KEY=your-api-key
Replace all three placeholders with your API base URL, supported model name, and key. Do not include /chat/completions in the base URL. All roles share this model by default. The CLI loads the current directory's .env; existing environment variables take precedence.
Run the live demo
Check the connection with one real model request, then run two rounds:
darwinagent doctor --check-model --output runs/doctor
darwinagent demo --mode live --rounds 2 --output runs/demo-live \
--max-requests 40 --timeout 1800
The demo asks who maintained a device and when, then tries to improve its prompt using independent answer scoring. Results go to runs/demo-live/. Start with demo-summary.json for decisions and reasons; published/current.json points to retained assets.
The cap counts HTTP attempts including retries; the timeout bounds the whole run. Ties are rejected and scores need not improve. Add --resume to continue an existing run, or use a fresh output directory for another experiment.
Use the Python API
Install the same package, then use the complete live Python example. It explicitly loads .env, creates Config, and passes it to run_demo(..., mode="live", config=config).
For your own records and questions, follow the custom task tutorial, including a complete Pipeline script and an independent evaluator.
Try without model credentials
darwinagent demo --mode replay --rounds 2 --output runs/demo-replay
Replay uses scripted model responses with no network requests or credentials. Expect completion, a first accepted candidate, and a second rejected on a tie. It demonstrates mechanics, not model learning or benchmark gains.
Durable continuation and Wiki queries
Keep saved model responses and tool results across safe restarts and human interventions. Working and adopted candidates are separate. A proposer can query training originals and request fresh Wiki regrouping in the same dialogue, with explicit coverage and evidence references. Unknown requests require explicit recovery or retry. See workspace operations and live-loop acceptance.
Documentation
Distributed under the MIT license.
Metadata
Release files for darwinagent 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| darwinagent-0.1.2.tar.gz | 243.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| darwinagent-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 532.0 kB
Release files / darwinagent-0.1.2.tar.gz
| Download URL | darwinagent-0.1.2.tar.gz |
|---|---|
| Size | 243.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04f86f18e57de6cc361e5826a11c0a1c0a8144cdd5d2d80040fb2019ab6867c2
|
|
BLAKE2b-256 checksum How to use checksums |
981da7c361dbcdaf1ca67606be28260b7a684dacc86f15b3eab89250785fca09
|
| 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 Oct 8, 2026.
Transparency logRelease files / darwinagent-0.1.2-py3-none-any.whl
| Download URL | darwinagent-0.1.2-py3-none-any.whl |
|---|---|
| Size | 288.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0914be0fa9593c94c34d1e4152eb34d4fd852a76384647e467e92c4f58f078aa
|
|
BLAKE2b-256 checksum How to use checksums |
a8e699d0ab59c6fed27af36b956412b25db34f1f5fdc4f930b42b6a8da9e6f0a
|
| 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 Oct 8, 2026.
Transparency log