Certo
Run coding tasks on a local model. Certo checks the work with your project's own tests, and calls in a cloud model only when the local one couldn't finish.
Local first, with a safety net. That is only safe if the check can be trusted, so Certo is the coding agent that doesn't take its own word for it: when the agent says it's done, Certo runs your real tests and build itself, with no AI involved, and ends with one verdict and an exit code a script can rely on. Certo is Italian for "sure".
pip install certo
certo init # pick Ollama for a local model, or a cloud provider
cd certo-workspace && certo tasks/wordle.md --project wordle
Most of the work never left the machine
In Certo's own benchmark, 9 coding tasks are graded by hidden tests the agent never sees. With a ladder of qwen3.8:27b on Ollama first and claude-haiku-5-5 second:
| Hidden tests passed | Solved on the local model | Median time per task | Cloud cost | |
|---|---|---|---|---|
qwen3.8:27b → claude-haiku-5-5 |
9/9 | 7 of 9 | 7m 44s | $0.019 |
claude-haiku-5-5 alone |
9/9 | none | 45s | $0.085 |
Seven tasks were done and verified locally, so their code and prompts stayed on the machine. The other two were tasks where the local model did no work; Certo saw that in its verdict and handed them to haiku, which solved both. The trade-off is time: a local 27B model took minutes per task where the cloud model took seconds. The money saved on nine small tasks is a few cents; the point is that the cloud became the exception, not the default. Details: Escalation in 0.1.17 (haiku alone is from the 0.1.15 baseline).
One real run of the quickstart's Wordle task with --escalate and a six-model ladder (Certo 0.1.19, 2026-10-19). The local model finished it, so no cloud model was called (the folder path is shortened, and the agent's work in between is left out):
── Certo 0.1.19 ────────────────────────────────────────────
Model escalate: qwen3.8-27b-local → claude-haiku-5-5 → claude-sonnet-5-5 → gpt-6-luna → claude-opus-5-5 → gpt-6.1-sol
Folder …/projects/wordle (project wordle)
Runs on this computer
Checks on, up to 2 fix attempts
Limits 30 min · 50 steps · $0.50
────────────────────────────────────────────────────────────
[… 16 minutes of agent work …]
Verification: verified
Run summary:
Total running time: 16m 00s
Models: ollama/qwen3.8:27b
Total tokens: 554,997 (input 536,968, of which cached 0; output 18,029)
Total cost: $0.0000
Rungs:
1. qwen3.8-27b-local (ollama/qwen3.8:27b): verified, 0 fix attempts, 16m 00s, 554,997 tokens, $0.0000
Final result from rung 1 (qwen3.8-27b-local).
Each model alone, from the 0.1.15 baseline (135 runs):
| Model | Hidden tests passed | Median time per task |
|---|---|---|
claude-sonnet-5-5 (cloud) |
9/9 | 31s |
claude-haiku-5-5 (cloud) |
9/9 | 45s |
gemma4:31b-it-qat (local) |
26/27 | 12m 40s |
qwen3.8:27b (local) |
24/27 | 4m 37s |
A later local run, on Certo 0.1.18, set the default local model: qwen3.8:27b passed 27 of 27, and qwen3-coder:30b, the old default, 18 of 27 (details).
In the 0.1.15 runs, Certo was fooled 3 times in 135: it said verified while the hidden tests failed, each time because the code broke a rule the task stated and the agent's own tests never tried it. Of the 54 runs that failed the hidden tests, it caught all the others. These are small tasks with few repeats, and escalation has so far been measured only after a local model did no work, not after it wrote wrong code. All the numbers and their limits: Benchmark results.
Any model, and the right one for each task
Most coding agents are built around one provider. Certo isn't tied to any: the model is one setting, and the same task runs on Ollama, Anthropic, OpenAI, Gemini, DeepSeek or any LiteLLM model. The same task, run with only that setting changed, was verified on both OpenAI and Anthropic (provider swap). Because Certo checks the result itself, it can also decide which model to use, and switch when one isn't enough:
| What Certo does | Add | |
|---|---|---|
| Escalation | Starts each task on the first model of your ladder, usually local, and moves to a stronger one only when its verdict shows the model couldn't finish. The next model is told what the last one left. | --escalate |
| Best model per task | Reads the task, matches it to a profile you write (in the shipped example, "debugging" weighs reasoning and precision, "scaffolding" favours cheap models), and picks the best-rated model you enabled. No extra model call to decide. Falls back to the next model when a provider fails or a fix attempt still fails the checks. | --auto-model |
| Measure it | Runs the same tasks on your models and strategies, graded by hidden tests, so you choose from your own numbers. | certo bench |
You describe your models once, in two files: models_list.yaml (ids, ratings, task profiles, ladders) and models.yaml (the ones you enabled, with keys). Every choice is written down: MODEL_DECISIONS.md says why each model was picked, and .certo/RUNS.md which models worked on the project. Escalation is the measured one so far (above); auto-model has no benchmark yet. Guides: Escalate between models, Pick models automatically, Auto-model or escalation.
Why the verdict can be trusted
Agents say "done", and sometimes they're wrong. Two real runs from building Certo, both asking a model for a Tower of Hanoi game:
- "There are errors in the tests around sequence handling and state transitions." The truth: the file didn't even run. An
IndentationErrorstopped every test before it started. The agent never re-ran the tests; the diagnosis was made up. - Every unit test passed, and the game crashed the moment a user picked "solve". The agent said success, and so did pytest.
The agent's report is a claim, not evidence. Certo looks at the evidence, and its verdict is also what decides when a local model's work is good enough to keep:
| When the agent... | Certo... | Verdict |
|---|---|---|
| says it's done | runs the project's own tests, build, lint and typecheck | verified or a failure |
| left a check failing | sends the real error back and lets it try again | retry_exhausted if it never gets there |
| tries a fix that changes nothing | stops early instead of burning tokens | no_progress |
| "fixes" a bug without touching a file | asks once more, then refuses to call it verified | unchanged |
| leaves its own to-do list half done | doesn't run the checks at all | incomplete |
| builds something with no tests | never counts "nothing to check" as a pass | inconclusive |
With --escalate, the failing verdicts are what move a task to the next model. Eight cases, and how each one changed Certo: Why agents lie.
Quickstart
pip install certo
certo init
cd certo-workspace
certo tasks/wordle.md --project wordle
certo init asks which provider you use (OpenAI, Anthropic, Gemini, a local Ollama, or any LiteLLM model), takes your API key at a hidden prompt, saves the settings, and makes one real call to check the model works. It also leaves two sample tasks in tasks/: a terminal Wordle in Python and a browser Asteroids game (which needs Node 18+). With a cloud model a run uses your credits, and Certo prints the cost at the end. The generated project lands in projects/wordle.
Local first, cloud when needed
To start every task on a local model and move to a cloud one only when Certo's verdict says the local model couldn't finish, add --escalate:
certo "Add a --verbose flag, with a test" --escalate
Escalation reads two model files. The first time, Certo prints the cp commands that copy the examples it ships:
models_list.yaml, the catalog: every model's id and ratings, and your ladders.models.yaml, your settings: the models you enabled, with their key or server address.
A ladder is a list of models, cheapest first:
# models_list.yaml
escalation:
ladders:
default:
- model: qwen3.8-27b-local
retries: 1 # one fix attempt locally, then hand over
- model: claude-haiku-5-5
How Certo decides to climb, and how to measure it on your own models: Escalate between models.
Or work on one project at a time, new or existing:
cd any-project && certo "Add a --verbose flag, with a test"
This works in any folder when certo init saved your settings for "all projects on this computer", its default. Before the agent edits a folder that already has files, Certo prints a one-line warning if it has uncommitted git changes, or isn't a git repository. certo check shows where each setting comes from and re-runs the model check.
Already have a project? Check it with no agent and no model, for free:
certo verify ./my-project
Without certo init
Set two variables instead, in your shell, in a .env in the folder you run certo from, or in ~/.config/certo/.env for every folder (details):
export CERTO_LLM_MODEL=anthropic/claude-sonnet-5-5 # or openai/..., gemini/..., deepseek/...
export CERTO_LLM_API_KEY=sk-...
certo "Build a CLI todo app in Python, with tests" --project todo
With a local model (no API key):
ollama pull qwen3.8:27b
export CERTO_LLM_MODEL=ollama/qwen3.8:27b
export CERTO_LLM_BASE_URL=http://localhost:11434
qwen3.8:27b passed all 27 runs of Certo's local benchmark and needs roughly 20 GB of GPU or unified memory. With less, try a smaller coder model such as qwen2.5-coder:7b (CERTO_LLM_MODEL=ollama/qwen2.5-coder:7b); Certo hasn't benchmarked it, so expect weaker results on multi-step tasks.
What the verdict means
The last line of every run is the verdict:
| State | Meaning |
|---|---|
verified |
The project's own tests or build ran and passed. |
inconclusive |
Nothing could be checked (no tests yet, unknown project type, missing toolchain). |
unchanged |
The checks passed, but the agent changed no file, so they don't show the task was done. |
retry_exhausted |
A check kept failing after the automatic fix attempts. |
no_progress |
A fix attempt changed nothing in the failing output, so Certo stopped early. |
incomplete |
The agent left items on its own to-do list unfinished. |
budget_exhausted |
The task ran out of its time budget. |
The exit code is nonzero for every failure state, so Certo works in scripts and CI. Add --require-verification to make inconclusive and unchanged fail too. Every state and its exit code: Verdicts. What to do next, verdict by verdict: After the verdict.
Features
Checks you can trust
- Independent verification. Re-runs the project's real test, build, lint and typecheck commands after the agent finishes. It never invents a command the project doesn't configure.
- Works across languages. Detects and verifies Python, Node/JS/TS, Go, Rust and Java (Maven/Gradle) projects. Each Python project gets its own virtual environment, used by both the agent and the checks.
- Verify without an agent.
certo verify [PATH]runs the same checks on any project, with no model needed. - Hard limits. An iteration cap, a wall-clock budget across all retries, and an optional approve-every-action mode.
Local first, any model
- Escalates only when it must. Give Certo a ladder of models, local first. Each task starts on the first, and moves to a stronger model only when verification shows the cheaper one couldn't finish. Add
--escalate. See Escalate between models. - Any model, one setting. Ollama, Anthropic, OpenAI, Gemini, DeepSeek or Moonshot. Switching is one environment variable.
- Picks the best model per task. Rate your models in
models_list.yaml, enable the ones you have keys for inmodels.yaml, and Certo routes each task to the best fit, with fallback when a provider fails. No extra LLM call to decide. Add--auto-model. - A benchmark.
certo benchcompares models and strategies on tasks graded by hidden tests, and counts how often Certo itself was fooled. See Benchmark models and strategies.
Fits how you work
- Resume.
certo --resume "hint"continues a run with its earlier conversation, or with a stronger--model. - Run records. Full transcript, token counts and cost per run, plus a log of which model was picked and why.
- Sandboxed runs (experimental). Add
--execution dockerto run the agent in a container. - Server mode. REST and WebSocket streaming. The OpenAI-compatible
/v1/chat/completionsendpoint and the SQL and Redis task stores are experimental. - Skills and custom tools. Add project conventions or new tools by dropping files in a folder. Installing third-party skills is experimental.
More ways to run it
# Work inside a sandbox
certo "Add a /version endpoint" --project my-api --execution docker
# Start on the local model, hand over to the cloud only if it can't finish
certo "Fix the failing test in payments.py" --project my-api --escalate
# Let Certo choose the model for the task
certo "Fix the failing test in payments.py" --project my-api --auto-model
# Take the task from a file or URL
certo ./tasks/spec.md --project my-api
# Pause and ask you questions instead of guessing
certo "Scaffold a FastAPI service" --project my-api --interactive
# Check a project with Certo's verification only: no agent, no model
certo verify ./projects/my-api
How it works
Certo is built on the OpenHands Software Agent SDK, which runs the agent loop and tools. Certo adds the parts the SDK leaves open: what counts as verified, which model runs and when to fall back, the budgets, and the CLI and server you talk to. The details: How verification works.
Known limits
- Server mode has no authentication. Run it on localhost or behind your own gateway.
- Java projects are detected, but verification needs Maven or Gradle installed.
- Docker execution, the OpenAI-compatible endpoint, the SQL and Redis task stores and third-party skills are experimental: tested, not yet proven in real use. Under Docker, automatic model selection makes the initial pick but does not fall back mid-task.
- Some local models, on some Ollama setups, write their tool calls as plain text and end the run with no work done.
certo checktests for it; with--escalate, such a task goes to the next model. Which models worked in Certo's benchmark: Choose a local model. verifiedproves what the project's tests test, and nothing more. Read the tests: Write a task Certo can check.
The full list is in the documentation.
Documentation
- Documentation home: guides, reference and concepts, organised by what you want to do
- Getting started: install,
certo init, your first task, and reading the verdict - Write a task Certo can check: the habits that turn a vague request into a verified result
- Troubleshooting: the problems people actually hit, with their fix
- Why agents lie: the real cases of agents claiming "done", and how Certo catches each one
- ROADMAP.md: where Certo is going; TODO.md: what's left to do
Contributing
Issues and pull requests are welcome. Issues labelled good first issue are a good place to start, and so is adding a benchmark task. To work on the code:
git clone https://github.com/alessioricco/certo.git
cd certo
uv pip install -e ".[dev]"
uv run pytest -q # no API key needed
License
MIT. Built by Alessio Ricco.
Metadata
Release files for certo 0.1.19
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 | |
|---|---|---|---|---|
| certo-0.1.19.tar.gz | 336.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| certo-0.1.19-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 580.4 kB
Release files / certo-0.1.19.tar.gz
| Download URL | certo-0.1.19.tar.gz |
|---|---|
| Size | 336.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3031ed233f9701863d1c839a8fbf7a672ed730980356dfd2afc064b38f3e3ab3
|
|
BLAKE2b-256 checksum How to use checksums |
d941786813be744b8e7cb7e0c0c81c0ef43e682561d764bcc66a20aed49d388b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 19, 2026.
Transparency logRelease files / certo-0.1.19-py3-none-any.whl
| Download URL | certo-0.1.19-py3-none-any.whl |
|---|---|
| Size | 244.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a039e9ba4bf7b4a1cc33768efc46716e62e898fb0bd34e41f54d790cf7f8b5b
|
|
BLAKE2b-256 checksum How to use checksums |
25bf1b401ae2580193ada0364a5021d9cb157992435ad83df2de0db3d5cc1074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 19, 2026.
Transparency logSecurity for certo 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for certo-0.1.19.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 19, 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.