Skip to main content

The Potter PromptPotter

An LLM-driven prompt optimizer for the whole pipeline

Hand it a labeled dataset and a pipeline. It evolves the prompt and the pipeline's parameters together,
cuts a losing candidate the moment the evidence says it will not win, and shows you every measurement behind the winner.

CI PyPI Downloads Python License: MIT-RG

Open the app →  ·  nothing to install, sign in and bring your examples
Or pip install promptpotter and run it on your machine; or self-host it for your team.

It sits behind your stack, never in place of it. PromptPotter calls your pipeline the way your users do, measures it on your examples, and hands back a better configuration as a file.

The PromptPotter control plane on a finished campaign

A real, finished campaign — seven rounds on JustLogic. Every figure on this page is an in-campaign reading from a small run, not a benchmark result.

Works with what you already run

You built it with How PromptPotter meets it
An agent framework, a managed agent service or a workflow builder — LangGraph, CrewAI, the OpenAI Agents SDK, Bedrock Agents, n8n, Dify, or plain FastAPI Three endpoints — POST /matches, GET /pipeline, GET /status — and the knobs your /pipeline declares become what is tuned (backend integration)
DSPy PromptPotterOpt, where you would reach for GEPA (dspy-optimizer)
An agent in a sandbox Each candidate runs as a Harbor trial, graded by the task's own checker
Langfuse / MLflow Every round fans out as traces; the winner lands in MLflow's Prompt Registry (observability)
OpenRouter, OpenAI, Anthropic, Groq Any of them, for your pipeline and for the optimizer

What you get back: export.json — the winning prompt and settings by field name, with the evidence behind them. We never load, host, route or hot-swap anything in your production path.

What it does differently

Prompt optimization that stops paying for losers. Every measurement costs money, so the whole design is most fitness per dollar.

Replay of one real round: three candidates measured, the third eliminated after 7 of 34 samples

One real round, replayed from its readout.log: candidate 3 is cut after 7 of 34 samples; the other 27 are never bought — Posterior-of-Being-Best.

  • It moves the pipeline, not just the words. Model, temperature, node thresholds, the output schema — whatever your pipeline.yaml declares tunable — mutate and are selected jointly with the prompt.
  • The budget goes where candidates separate. Scoring goes to the samples that tell candidates apart; anything already measured is replayed, never re-bought. Every number opens down to the call: one candidate on one sample, with prediction, ground truth, the exact input each node received, and whether it was paid for or replayed.
  • It does not certify its own winner. Scores are a subset-invariant ability (Rasch θ), and each round says when its lift is noise (what a winner's number may claim).
  • A campaign is an object on disk. Each round is a JSON file the app renders as a scoreboard; pause, resume, rewind to any round, or fork a sibling and compare (persistence and recovery).

A walk through the app: the chat thread, the run card, the dashboard, the sample leaderboard, one opened cell

📺 Longer: Live #2 — a Swiss-invoice campaign, run raw.

Quickstart

Python 3.13+ and an OpenRouter key — the optimizer's default provider.

pip install "promptpotter[all]"
python -m promptpotter new tickets.csv --set task_description="classify support tickets by urgency"
python -m promptpotter resume

Bring a labeled dataset — input/output pairs as any delimited text, JSON, JSONL or a spreadsheet — and say what the job is. resume picks up wherever the last run stopped: Ctrl+C pauses a campaign rather than losing it. The DSPy and Harbor connectors are opt-in extras ([dspy], [harbor]).

To watch it in the app shown above:

python -X utf8 -m uvicorn promptpotter.main:app --port 8001    # then open http://localhost:8001/

Already in DSPy? from promptpotter.presentation.teleprompter import PromptPotterOpt installs where you would reach for GEPA (dspy-optimizer.md). Six chapters from install to troubleshooting: the manual.

Five entry points

Webapp The chat-first browser control plane — app.promptpotter.com hosted, http://localhost:8001/ local (spec).
/potter-run Claude Code skill — an agent launches, supervises and diagnoses a campaign from your editor.
CLI python -m promptpotter new <name> / resume.
REST API Every control verb the webapp issues, for when another system drives the campaign.
Embedded in Python A host program drives one campaign inside its own event loop; the DSPy optimizer is the simple-case entry.

How the search works

The loop: generate, score and critique repeat until a stopping rule fires; L2 and L3 escalate lazily on a stall

Every round generates, scores and critiques (L1). When L1 stalls, L2 rewrites how it searches; when L2 stalls, L3 rewrites the plan. The loop exits on a stopping rule — goal, budget or plateau — not a fixed trial count (the loop). It searches a tree, not a trail: when a branch is spent, a UCB rule picks the ancestor to re-expand — AlphaZero-shaped MCTS over the lineage, with deterministic evaluation in place of rollouts (the mapping).

PromptPotter belongs to the LLM-driven evolution family beside GEPA, MIPROv2, CAPO and AlphaEvolve; it evolves a whole declared pipeline jointly with the prompt, and it is a bench built to run other people's optimizers under one grader, one budget meter and one stopping rule. The capability comparison: the landscape; what we measure on: promptpotter.com/benchmarks.

Extending the engine

git clone https://github.com/PromptPotter/prompt-potter-optimizer && cd prompt-potter-optimizer
python scripts/gate.py          # every check CI runs; the first run builds .venv from uv.lock

The optimizer is itself a pipeline of nodes, so it can be pointed at its own optimizer prompts (self-optimization, L4), and every optimizer runs end to end at zero spend (offline-run.md). Start at the developer guide, then CONTRIBUTING.md.

Limitations

  • Parameter-based optimization only — prompts, thresholds, model settings; not model weights or architectures.
  • Needs a known answer or a verifier — the example's expected output, or the backend's own checker (Harbor).
  • In-campaign figures are not held-out figures. The headline is the winner's score on a held-out bench set no optimizer sees: python -m promptpotter bench.

Documentation

The manual · docs index · architecture · roadmap

Citation

@software{promptpotter,
  title  = {PromptPotter: LLM-Driven Evolution of Prompts and Pipelines},
  author = {Streuli, David},
  year   = {2026},
  url    = {https://github.com/PromptPotter/prompt-potter-optimizer}
}

Metadata

Release files for promptpotter 0.8.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for promptpotter 0.8.19
File Interpreter ABI Platform Actions
promptpotter-0.8.19-py3-none-any.whl Python 3 none any Details for promptpotter-0.8.19-py3-none-any.whl

Release files / promptpotter-0.8.19-py3-none-any.whl

Download URL promptpotter-0.8.19-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
863ad4ca3fe882011b0e51c56681a3ce6eacf36d49c2a3c4946d4ebc4859ed71
BLAKE2b-256 checksum
How to use checksums
886221c566989945167f501021d20585a8d9abae042ce7a36cb0f6c92ff67f1e
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 Nov 6, 2026.

Transparency log

Security for promptpotter 0.8.19

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

1 file in this release has been uploaded with provenance metadata.

Attestation for promptpotter-0.8.19-py3-none-any.whl

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 Nov 6, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page