mm.tech
agents beta TypeScript

Darwin Agents

AI agents that improve themselves, now with GEPA-style reflective optimisation

Self-evolving prompts via A/B testing, multi-model critics, safety gates. v0.5.0-alpha.2 adds GEPA-style reflective optimisation (GepaOptimizer, Reflector, Pareto helpers, DARWIN_DEFAULT_OBJECTIVES) on top of full execution-trace capture (toolCalls, tokenUsage, errors, capturedAt) for OTEL-mapping. 307 tests, R1+R2 review loops, TypeScript, MIT.

What it solves

You write a prompt, it works well enough, and then it stays exactly as it is forever. Nothing in the normal setup learns from the two hundred runs that came after. Darwin keeps a record of every run, scores it, proposes a variant of the prompt, A/B tests the variant against the original and only adopts it if it actually did better.

How it works

Eight agents ship by default, among them writer, researcher, critic, analyst and blog-writer. Every run is stored in a local SQLite file and scored by a set of critics with several rubrics rather than one number, and when more than one provider key is present the critics are spread across model families so a model does not grade its own family too kindly. Around ten runs is where improvement starts to show: the first five set a baseline, then a variant is generated and tested over the next five. A safety gate handles the downside, and if a variant scores more than twenty percent worse it rolls straight back to the last version that was known good.

When to use it

It earns its place where the same agent runs again and again on similar work, because that is the only situation in which the evidence accumulates. It runs on the Claude CLI, the Anthropic API, an OpenAI-compatible API or a local Ollama, storage is SQLite by default or Postgres if you point it at one, and everything stays on your disk with no telemetry.

When not to use it

Two limits are worth knowing before you read a promotion as proof. The critics are themselves language models grading language models, so judge bias does not disappear, it is only blunted by spreading the rubrics and the model families. And the default A/B test compares means against a five percent threshold, which is a throughput heuristic and not a significance test. Formal sequential tests exist and are one config block away, but they are opt-in. If you have only run an agent a handful of times, there is nothing here for you yet.

Stars

★ 10

installs

↓ 5,332

Clones (14d)

⊟ 84

Language

TypeScript

Updated

2026-08-28

Install

npx -y darwin-agents

Related repos