ergoda
Measures which steps of your agent can run on a cheaper model, and keeps measuring once they do. Your code keeps calling your own provider with your own key. Ergoda decides which model a step uses, and anything it cannot decide goes to the model you would have called anyway.
pip install ergoda
ergoda onboard --sample # a first report on bundled sample data, offline
The ten-minute path is the quickstart; every term is defined in concepts.
Start: measure before anything moves
Open an account at https://app.ergoda.com/onboarding (about a minute; it is the only place one is made), then connect your project from its directory:
ergoda login
ergoda init --frontier anthropic/claude-opus-5 --step resolve_ticket
source ergoda.env
ergoda login opens your browser to approve this terminal, then writes
ERGODA_URL, ERGODA_KEY (an agent key: it sends events and fetches policy,
nothing else) and ERGODA_SITE to ergoda.env, mode 0600. A coding agent can
run it too: ergoda login --no-browser --no-wait prints the link for a person
to approve and exits 3 until they have. init writes a routes.yaml that
routes nothing, so every step keeps serving the model your code already asks
for, adds ERGODA_POLICY and ERGODA_DEFAULT_MODEL to ergoda.env, and
prints the two lines to paste:
from ergoda.sdk import Client
ergoda = Client.from_env()
create = ergoda.wrap({"anthropic": client.messages.create}, step="resolve_ticket")
# unchanged from here: same arguments, same response object
response = create(model="claude-opus-5", max_tokens=1024, messages=msgs, tools=TOOLS)
Run your agent, then ergoda status: it counts the requests that reached
Ergoda and prints the next command. The dashboard is at
https://app.ergoda.com/: sign in with the email address you signed up with,
then enter the six-digit code Ergoda emails you. Only derived metrics are sent
(hashes, counts, token totals). Prompts and responses stay in your process.
The control plane is a hosted service: it is not in this package, and running
your own is not offered. Without ergoda login, init still works offline:
the SDK serves every call as written and sends nothing.
Then: find what can move
No trace export yet? Wrap your create call as
record(client.messages.create) (from ergoda import record) inside
ergoda.wrap(...), and it writes one to traces.jsonl on your own disk as
your agent runs, with the step name from wrap. Langfuse, LangSmith,
OpenTelemetry, Helicone, Braintrust and LiteLLM exports are read as they are.
ergoda onboard traces.jsonl --step resolve_ticket \
--serve anthropic/claude-haiku-4-5 --escalate-to anthropic/claude-opus-5
ergoda analyse traces.jsonl --model anthropic/claude-haiku-4-5 --html report.html
onboard checks that the export can be replayed, lists the tools whose
effects can be undone, and prints the command that would write the route. It
writes nothing until a named person approves: add --approved-by "Your Name"
and the route is added to routes.yaml in place (the hosted dashboard's
Approve and sign does the same for a site on the control plane, and replaces the
file's route once published; approve a step in one place).
analyse replays your traces against the cheaper model with your own key and
reports agreement per step with an interval. Without that key it stops and
names the variable; a replay the provider refuses, or answers with something
unreadable, is counted as a failure, never as a disagreement. A trace shorter
than 24 hours gets no monthly figure.
What it will and will not do
- Doubt goes to the expensive model. An unknown step, an unreachable control plane, a changed prompt or a refused proposal all serve your own frontier model.
- A route to a cheaper model starts with a person's name on the record.
After that, autopilot may loosen an approved route's checks where your own
traffic shows at most a 2% added failure rate at 95% confidence. That
limit is a published default, not one a person on your team accepted, so
its moves are recorded as
ergoda:default. You can switch it off for your site on the dashboard's Switch autopilot off page, or withPOST /v1/sites/SITE/autopilotand{"by": "your name", "enabled": false}; every move toward the cheaper model then waits for a named person. Moves it already made stay until you revert them or an escalation takes them back; only a route with no traffic for 90 days goes back on its own. Setting a route'senabled: falsesends that step back to your frontier model. - Routing is not meant to cost more than not routing. In the Python SDK, the TypeScript SDK and the proxy, a route whose spend passes what the frontier model alone would have cost is pinned back to the frontier.
- The numbers are estimates with intervals. Agreement is measured on your traffic and reported with its bound. Parity is about task completion; refusal behaviour is not measured.
Latency
The decision is in-process, with no network hop on the request path, and
takes about a millisecond. A step the cheaper model gets wrong is redone by
the frontier model, so that step makes two calls in a row. Shipped
with your deployment, routes.yaml is in force from the first call, and the
control plane is consulted behind it. In a Lambda or Cloud Run handler, build
the client at module scope and wrap the body in with ergoda.request(): so
queued metrics are delivered before the process is frozen.
Python 3.11+. OpenAI, Anthropic, Gemini and Bedrock request and tool-call
shapes are read natively. Other providers go through the optional litellm
extra.
The proxy, for agents you cannot edit
pip install 'ergoda[server]' adds what the proxy needs. Run ergoda dataplane serve --policy routes.yaml --site SITE --control-plane https://api.ergoda.com
with ERGODA_KEY, ERGODA_PROXY_TOKEN and your provider key set, then point the
agent's base_url at http://localhost:8080 and present the proxy token as its
key. There is no published container image; the
proxy page has the Dockerfile, a worked curl
and what each variable does.
Documentation: https://ergoda.com/docs/quickstart/
Licence: FSL-1.1-ALv2, source-available. Use it for anything, in production and commercially, except a product or service that competes with Ergoda; each version becomes Apache 2.0 two years after it is published.
Metadata
Release files for ergoda 0.1.29
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 |
|---|---|---|---|---|
| ergoda-0.1.29.tar.gz | 1.2 MB | Without provenance | Details for ergoda-0.1.29.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ergoda-0.1.29-py3-none-any.whl | Python 3 | none | any | Details for ergoda-0.1.29-py3-none-any.whl |
Total release size: 2.6 MB
Release files / ergoda-0.1.29.tar.gz
| Download URL | ergoda-0.1.29.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0979f1dd7f27640a5923dc5eb519556a6ded657e2dacedcb8780ed9cc215326
|
|
BLAKE2b-256 checksum How to use checksums |
8d7672970176a3e8d3c9bac79fcc461797834d9b966cfa395363b734579cb801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ergoda-0.1.29-py3-none-any.whl
| Download URL | ergoda-0.1.29-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7868eb731bfed9bdc217757c0e48a657e75c27c0fc3cdc8e0e8c82a07680f387
|
|
BLAKE2b-256 checksum How to use checksums |
d28381e40b8f6aef91a389463d76352878c98088c420c537e8c971249521eb6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ergoda 0.1.29
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.