Skip to main content

Requirements

Coevolved is a Python framework. To follow the examples in these docs, you’ll want:
  • Python 3.9+
  • A virtual environment (recommended)
  • An LLM provider account (for LLM examples). These docs assume OpenAI first.
Coevolved itself is provider-agnostic. OpenAI is just the first built-in provider implementation.

Install

Install from your package manager of choice.
pip install coevolved

LLM provider credentials

For OpenAI-backed examples, set your API key as an environment variable:
export OPENAI_API_KEY="..."
Don’t hardcode keys in source files. Prefer environment variables or a secret manager.

Verify installation

Create a tiny script to confirm imports work:
from coevolved.base.step import Step
from coevolved.base.compose import run_sequence

def inc(state: dict) -> dict:
    return {**state, "n": state["n"] + 1}

workflow = run_sequence([Step(inc)], {"n": 0})
print(workflow)
If you see {'n': 1}, you’re ready to continue.

Next steps