AgentDescent
AgentDescent is a parallel, asynchronous framework for self-evolving LLM agents where diffs act as gradients and an aggregator acts as the optimizer. It solves the problem of slow, serial self-improvement by allowing multiple workers to propose edits concurrently and merging them into a version-controlled library. It is for developers and researchers building self-improving agent systems.
✨ Key features
- Parallel, asynchronous evolution with N workers proposing edits
- Barrier-free aggregator merges concurrent edits via conflict resolution
- Version-controlled ledger with git-backed storage
- Pluggable strategies for evolving prompts, rules, or file trees
- Eight policy slots for customizing evolution rules
- Includes 19 ports of published self-evolution algorithms
🎯 Use cases
- Evolve a prompt or instruction from a dataset
- Self-improve agent skills without manual tuning
- Run benchmark-faithful self-evolution algorithms
- Experiment with parallel vs serial evolution scheduling
- Build custom evolution strategies for any artifact
📦 Installation
🧰 Requirements: Python ≥ 3.9, no API key required for core engine; examples may need model access.
pip install agentdescent
To run examples, clone the repo and install with dev dependencies:
git clone https://github.com/Birfy/agentdescent && cd agentdescent
pip install -e ".[dev]"
python -m examples.run_demo # no API key, no network
🚀 Usage
from agentdescent import SingleSlot, evolve, openai_compatible, reflector, scorer, tasks_from
from agentdescent.dataloader import hf_rows
rows = hf_rows("hotpotqa/hotpot_qa", "validation", config="distractor", limit=40)
model = openai_compatible(model="deepseek-v4-flash")
tasks = tasks_from(rows, prompt="question", gold="answer")
run = lambda skill, task: model(f"{skill}\n\n{task.prompt}")
result = evolve(tasks, scorer("exact"), run=run, propose=reflector(model),
strategy=SingleSlot(initial_value="You are a helpful assistant."),
rounds=8, n_workers=8, max_concurrency=8, held_out_frac=0.3,
patience=3, target_reward=0.98)
print(result.rendered)
print(result.final_reward)
print(result.outcomes())
⚠️ Good to know
AgentDescent is a research reference implementation, not a production system; the throughput premise is a testable hypothesis rather than community consensus.
❓ FAQ
What are the core dependencies?
The core engine has zero required dependencies and needs only Python ≥ 3.9.
Can I run the demo without an API key?
Yes, the demo python -m examples.run_demo requires no API key and no network, and runs in under half a second.
How do I use a different model or agent?
You can pass an agent= argument to evolve() instead of run/propose, e.g., LLMAgent(claude(model="claude-haiku-4-5")) or LLMAgent(openai_compatible(model="deepseek-v4-flash")).
What is the difference between strategies like SingleSlot and AppendRules?
Strategies define the artifact being evolved and its key space. SingleSlot evolves a single value (e.g., a prompt) where concurrent proposals always conflict, while AppendRules evolves a deduped list of lessons where proposals almost always fuse.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 6, 2026. Always check the original source before running commands.