Skip to main content

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.2.0 is experimental; improvement must be measured.

中文使用指南 · English guide

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for darwinagent 0.2.0
File Size Uploaded
darwinagent-0.2.0.tar.gz 252.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for darwinagent 0.2.0
File Interpreter ABI Platform
darwinagent-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 549.3 kB

Release files / darwinagent-0.2.0.tar.gz

Download URL darwinagent-0.2.0.tar.gz
Size 252.9 kB
Tags Source
SHA-256 checksum
How to use checksums
319df43dbfda2a74eafb8bffe4a579dd2106074bddbbac1a6afaf3c16dcca8ea
BLAKE2b-256 checksum
How to use checksums
6307a9568ee74fcab2628778aee608a67f0a3d0d366159a28530ac0c97fb55a3
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 9, 2026.

Transparency log

Release files / darwinagent-0.2.0-py3-none-any.whl

Download URL darwinagent-0.2.0-py3-none-any.whl
Size 296.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
287cab0e23234bb44fe387a16a5752da1e6c46781885c9fe5d0bf8e689c131ee
BLAKE2b-256 checksum
How to use checksums
9a200fbdd54f4d3e5f8cd534bec4efa509aace001c2b36c09ec36a2580a066be
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 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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