Recommended layout
Coevolved does not require a specific project layout, but you’ll move faster if you separate:
- State schemas (Pydantic models)
- Pure steps (deterministic computation)
- Side-effect steps (I/O, tools, provider calls)
- Agent patterns (loops and orchestration)
A simple, scalable starting point:
your_project/
agents/
support_agent.py
steps/
enrich.py
validate.py
tools/
search.py
calculator.py
schemas/
state.py
providers/
llm.py
main.py
Configuration
You typically configure:
- Tracing: sinks, formatting, snapshot policy
- Budgets:
UsagePolicy limits (steps, time, cost)
- Checkpointing: store and policy (when to save)
- Provider configuration: model, tools, request options
Keep provider configuration near the entrypoint (e.g. main.py), and keep Steps importable and testable without needing real credentials.
- Steps: put them in
steps/ and keep them small. Treat a Step as a unit you can test in isolation.
- Tools: put tool functions in
tools/ and wrap them with tool_step(...) where you assemble the agent.
- Agents: put orchestration (loops, routing) in
agents/. Agents are usually steps too (e.g. react_agent(...)).
Development workflow
During development, optimize for:
- Determinism: unit test pure steps without providers.
- Observability: turn on trace sinks early so you can see what the runtime is doing.
- Schema discipline: add Pydantic schemas as soon as state gets non-trivial.
Next steps