buildwright
The craftsman who builds per the spec — one model per agent: mechanical steps go to the local model (cheap, fast), important decisions to the remote one (strong). The role→model mapping is configuration, not code — switching models touches zero lines of pipeline.
Install
uv tool install buildwright # once published to PyPI
# or for development:
uv sync
Division of roles (one tool, one job)
| Piece | Role | Where it lives |
|---|---|---|
| LangGraph | the ORDER of the steps (graph, state, retries) | graph.py |
| PydanticAI | EACH STEP (agent with structured output) | agents.py |
| LiteLLM | WHO serves the model (optional proxy, fallbacks) | litellm/config.yaml |
| Langfuse | WHETHER IT WORKED (traces, scores) | observability.py |
The pipeline
START → plan (local) → execute (remote) → review (local) → END
Plan struct. final answer Review struct.
Each node is a PydanticAI agent; the model is decided by the role in
Settings (BW_ROLE_*), resolved against the models.yaml registry.
Quickstart
uv sync
cp .env.example .env # adjust BW_ROLE_* and keys
uv run buildwright models # list local and remote models
uv run buildwright roles # role -> model mapping
uv run buildwright ask "write a snake game in python with pygame"
With no endpoints available, ask fails naming the exact model and the missing
env var.
Local and remote models
The whole registry speaks OpenAI-compatible (models.yaml):
- local/qwen3 → Ollama at
localhost:11434/v1 - local/llamacpp →
llama-serveratlocalhost:8080/v1(your GGUF) - remote/gpt-4o-mini, gpt-4o → OpenAI (key via
OPENAI_API_KEY) - remote/claude-sonnet → Anthropic's OpenAI-compat layer
- litellm/* → via the LiteLLM proxy (see
docker-compose.yml)
Registry resolution: BW_MODELS_FILE > project-local ./models.yaml > the
models.yaml bundled with the package. Adding a model = adding 5 lines.
Reassigning one to an agent = changing a BW_ROLE_* in .env.
Optional full stack (LiteLLM + Langfuse + Ollama)
With Docker, docker compose up -d brings up LiteLLM (routing/fallbacks),
Langfuse (traces) and Ollama. Langfuse keys show up in its admin UI; copy them
to .env and tracing turns itself on (without keys, the tracer is a no-op).
Publishing to PyPI
Trusted publishing — no API tokens:
- Create
github.com/jordimarsal/buildwrightand pushmain. - On pypi.org: Add a pending publisher → owner
jordimarsal, repobuildwright, workflowrelease.yml, environmentpypi. git tag v0.1.0 && git push --tags→ the workflow runsuv buildand publishes.
Harness runtime (phase 0)
In a project initialized with harness-standard:
buildwright harness status # feature board + planned role -> model routing
buildwright harness status ~/src/kafka-adapter-telemetry
Read-only: parses and schema-validates harness/feature_list.json (protocol v1),
shows the board and which model each role would use. Phases 1+ (unattended
implement→verify→review in a worktree) are designed in
docs/specs/2026-10-27-harness-runtime-design.md.
Tests
uv run pytest # offline: pydantic-ai's TestModel, zero network
Anti-mess rules
- Everything speaks OpenAI protocol; PydanticAI never imports litellm.
- One agent = one node = one job. No agents inside agents.
- Tracing registered exactly once (
observability.py); never scattered. - Offline evals in CI rule; Langfuse is production monitoring.
- Each piece joins when it has a real trigger (fallbacks→LiteLLM, non-linear flow→LangGraph is already in).
Metadata
Release files for buildwright 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| buildwright-0.2.0.tar.gz | 177.5 kB | With provenance | Details for buildwright-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| buildwright-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for buildwright-0.2.0-py3-none-any.whl |
Total release size: 190.7 kB
Release files / buildwright-0.2.0.tar.gz
| Download URL | buildwright-0.2.0.tar.gz |
|---|---|
| Size | 177.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ff2f90afbb857b9a96530bd4cf39b8a330edb0c4bac5fd7743135f943d75378
|
|
BLAKE2b-256 checksum How to use checksums |
4168d53b6a10786d8c9f8e4c3d58bc8fa6d2f8cfafbaa4a0cc22f29fb1c4dddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 27, 2026.
Transparency logRelease files / buildwright-0.2.0-py3-none-any.whl
| Download URL | buildwright-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
119f0214e24eea2f679c86f1b1560205917f86be998a7e77016f86e3a5455924
|
|
BLAKE2b-256 checksum How to use checksums |
188e5c07071213823d004bf506af6064c38328c361225de1a97a6e806e6efbb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 27, 2026.
Transparency logSecurity for buildwright 0.2.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for buildwright-0.2.0.tar.gz
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 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.