Skip to main content

Poisson Break

PyPI version Python versions Licence: MIT

Injects tool faults into an agent and finds the smallest case that fails.

What poisson-break confirm prints on the desk example, drawn in a terminal: confirmed, 3 of 3 candidates fail more than the control, then one row for each finding (a timeout, a rate limit and an error on the first call to lookup_order), the three finding files it wrote, and the next command

Break runs the agent you already have, many times, while it makes the agent's tool calls fail the way they fail in production and changes what the user asks. It keeps the conditions under which the agent fails more often than it does with no change, and tests each again on fresh runs against a control. What holds is a finding: a named condition you can replay, with the numbers behind it, that a fix can later be checked against. Poisson Break is one of the open-source tools from Poisson Labs.

python -m venv .venv
. .venv/bin/activate
pip install poisson-break
poisson-break init --example desk
poisson-break hunt --yes
poisson-break confirm --yes

With uv, the install line is uv pip install poisson-break.

  • No key and no network for the example, once it is installed: its model is scripted.
  • Break opens no connection of its own and sends nothing anywhere.
  • Break's own checks use no model: a failure is something the agent did that code can see.
  • Python 3.11 or later, on macOS and Linux. confirm and recheck need Poisson Trace, which runs on Python 3.11 to 3.13. MIT licensed. Version 0.2.0 is an alpha.

init --example desk writes a small help desk into the folder: an agent with two tools and a scripted model, six requests to try it on, and break.toml, the settings. hunt looks for conditions that make it fail. confirm tests what the hunt found on fresh runs. To run Break on an agent of your own, go on to On your own agent.

Break calls your tools for real. Run it against a test environment. It refuses a tool that changes something outside until you say how that tool is made safe to repeat.

How Break changes a tool

The desk's model is a plain Python function, scripted_model, that picks the next step from the request and from what the tools have returned so far. That is why the example needs no key and no network. Break makes no model call of its own; on your own agent, the model calls are the ones your agent makes.

Break starts no app and no server. It imports the function break.toml names, desk_agent:desk here, and calls it once for each run, in Break's own process. One run is one call of that function, on one case, with one seed, under one condition. The control runs the same cases with no change, and every condition is compared with it; each condition the desk's hunt tries is one change.

Each tool is wrapped once with wrap, which puts Break between the agent and the tool. On the call a condition names, such as the first call to lookup_order, Break applies the condition's fault. A timeout, an error or a rate limit is raised where the tool's own failure would arrive, and the tool does not run, so a timeout reaches the agent as a TimeoutError. Other faults run the tool and change what comes back: empty hands back an empty result, malformed breaks its structure, and stale hands back the previous call's result. lost_reply lets the tool act and then reports an error. Every other call runs the real tool, as every call does in the control.

What you see

hunt shows its plan, then runs the agent with no change (the control), then tries one change at a time:

plan  a hunt of desk on 6 cases, at most 120 runs
  target      desk_agent:desk (rollout)
  tools       lookup_order (read), check_policy (read)
  may change  tool behaviour (4 faults), inputs (2 operators)
  strategy    screen
  stages      control 12 runs, search and shrink up to 108
  cap         120 runs, 2 hours
  estimate    at most 120 runs and 2 hours, with no prices to put in dollars, from the settings' limits
note: Break calls your tools for real: run it against a test environment, never against anything that matters
found  3 candidates in 42 runs
  control  12 runs · 0 failed (0.000)
  search   30 runs · 10 conditions tried on 3 cases each
     condition                         failed         kind
  1  tool:lookup_order#1=timeout       3 of 3 failed  failed
  2  tool:lookup_order#1=rate_limited  3 of 3 failed  failed
  3  tool:lookup_order#1=error         3 of 3 failed  failed
  not looked at: faults turned off: slow, cut_off, malformed, stale, lost_reply, planted_instruction; 0 single changes and 33 pairs of them untried
  these are candidates, not findings: a few runs each, chosen for having failed
  wrote    break-runs/desk-1/hunt.json, proposals.jsonl, candidates.json and every run in store/
next: poisson-break confirm

The desk never failed in its 12 control runs. Of the 10 conditions the hunt tried, three made it fail on every case they were tried on: a timeout, a rate limit and an error on the first call to lookup_order. The other seven, among them every fault on check_policy and both changes to the request, did not. The line not looked at says what this hunt left untried.

Those three are candidates: a few runs each, and chosen because they failed. confirm runs each of them again on every case, three times, beside a control arm. The control arm is the set of runs on the same cases with no change, and each candidate's runs are compared with it. confirm then asks Trace whether the difference holds. Trace is the Poisson Labs tool that checks whether a fix held:

plan  confirm 3 candidates against a control
  design     6 cases × 3 repeats, once with no change and once under each candidate · 72 runs
  reference  up to 54 more runs, 18 for each candidate that is confirmed
  cap        120 runs, 2 hours
  Trace will say if this is too small to see a difference of 0.200, and how many repeats would be enough
  estimate   126 runs, about 0 s; no prices, so no dollars, from the control stage's 0 s a run
note: Break calls your tools for real: run it against a test environment, never against anything that matters
confirmed  3 of 3 candidates fail more than the control (0.000)
     condition                         verdict    numbers
  1  tool:lookup_order#1=timeout       confirmed  1.000   +1.000
  2  tool:lookup_order#1=rate_limited  confirmed  1.000   +1.000
  3  tool:lookup_order#1=error         confirmed  1.000   +1.000
  wrote      break-runs/desk-1/findings/1.toml, 2.toml, 3.toml
  reference  54 runs
next: poisson-break findings 1

All three hold, and each is now a finding. Read one, and run it once more to see what the agent did:

poisson-break findings 1
poisson-break replay 1
note: Break calls your tools for real: run it against a test environment, never against anything that matters
failed  finding 1 on case status-4821, seed 56661626: failed
     tool          call  change                       real tool ran
  1  lookup_order  1     tool:lookup_order#1=timeout  no

The desk has no second try: one failed look-up ends the request. Reading a finding goes through every line a finding prints.

The hunt called the desk's function 42 times, once for each run: 12 control runs, two on each of the six cases, and 30 runs for the ten conditions it tried. confirm called it 126 more times: 72 runs with no change and under the three candidates, and 54 for the reference, the runs recheck later compares a fix with.

Everything is kept in break-runs/desk-1/, one folder for each hunt. hunt.json holds the settings as resolved and the stages run, candidates.json the candidates hunt handed to confirm, findings/1.toml and the two beside it one finding each, and store/ every run, as a Prove store. Prove is the Poisson Labs tool that tells you whether a difference is real, and its own commands read the store.

A stored run is Break's record of the run: the case by its id, the change, the outcome and the kind of failure, and each tool call with whether the real tool ran. It holds none of the agent's prompt, reply or tool results. replay is how you see what the agent did: it runs a finding once more, stores nothing, and shows each tool call with the change on it.

On your own agent

A way in is how Break runs your agent and reaches its tools. This version has one, rollout: your agent as a Python function that Break calls once for each run.

The function takes cfg and seed and returns an Episode. cfg is one case from your case file, as a mapping that holds the request under input. seed is the run's seed. Episode is Prove's record of one run, and Break reads the agent's own outcome from it.

from poisson_prove import Episode


def refund_agent(cfg, seed):
    reply = run_my_agent(cfg["input"])                 # your agent, as it is
    return Episode(outcome="resolved", t=1.0, horizon=1.0, meta={"reply": reply})

Break needs to know which functions are your agent's tools. init asks for their names and writes where each one is into break.toml, as at on the tool's line. When Break loads your agent it puts itself between the agent and each of those functions, and your code needs no line from Break.

The at setting needs Poisson Break 0.2.0 or later. Version 0.1.x uses a wrap line for each tool.

[tools]
lookup_order = { class = "read", at = "my_app.tools:lookup_order" }

Break reaches a tool wherever a module holds it by name or in a dict or list at the top of a module. A tool that something else took hold of first (a closure, a partial, a framework's tool object) needs a wrap line where it is defined, and doctor names any it finds. A function you have not named as a tool is called as it is.

The wrap line is the second way, for the tools loading cannot reach and for anyone who would rather have the line in the code:

from poisson_break.apply import wrap

lookup_order = wrap("lookup_order", lookup_order)      # one line a tool, where it is defined

You write it yourself, once for each tool, where the tool is defined, at the top of its module, and not at each call. init does not add it: it finds the tools already wrapped by importing your module, and then asks for no names. The line makes your module import poisson_break. Outside a run the wrapped tool is the tool itself, so the line can stay in. A tool reaches Break one way or the other, not both. Either way a tool that is async def is refused. Adapters for agent frameworks and MCP servers are not in this version (see Status).

In the folder that holds your agent, poisson-break init asks where the agent is, where your test cases are, which tools it calls when it finds none wrapped, and, for each tool, whether calling it changes anything. It chooses everything else, says what it chose, and writes break.toml, where you can change any of it. poisson-break doctor checks that everything loads and says how each tool is reached. hunt and confirm work as above. The rollout way in has the details, and ends with a whole agent to start from: two files to copy and the commands that take them to a hunt. The catalogue lists every change a hunt can make.

When you have changed the agent, poisson-break recheck runs every finding again and says whether each now fails less: Checking a fix.

Checking a fix

A finding is a plain TOML file you can commit. When you have changed the agent, poisson-break recheck runs every finding again on the agent as it is now, over the cases and repeats of the finding's reference runs, and prints Trace's answer for each: fails less, fails more, no significant difference or too small to tell. In CI, poisson-break recheck --yes --check exits 4 when a finding fails more than it did, and --strict adds a finding that is too small to tell. The full-loop example goes round the whole loop, and Checking a fix explains each part.

The examples

Each is written into the folder by poisson-break init --example NAME, and each runs with no key and no network against a scripted model.

Example What it is What it ends with
desk a help desk with two read tools 3 findings: the desk gives up when its order look-up fails
full-loop an order desk, and the same desk with a fix 3 findings; after the fix is copied in, recheck reads all 3 as fails less
stand-in a refund desk whose refund tool moves money, with a stand-in for it 1 finding: after a lost reply the desk refunds twice (duplicate_write)
own-check a desk that always answers, with a check of the team's own 3 findings judged by that check (own:made_up)
own-fault a desk, with a fault the team added to the catalogue 1 finding: the desk falls over on an error page (crashed)

The examples page walks through each.

The commands

  • init: asks where the agent is, where the cases are and, for each tool, whether calling it changes anything, and writes break.toml. init --example NAME writes an example.
  • doctor: reads the settings and the cases, loads the agent, lists its tools and names the first problem it finds.
  • hunt: runs the control, searches for conditions that fail, shrinks each, and writes the candidates, best first.
  • confirm: tests every candidate on fresh runs against one shared control, with Trace's test, and writes the findings.
  • findings: lists the findings; findings 1 shows one whole.
  • replay: runs one finding once and shows each tool call with the change on it.
  • recheck: runs every finding on the agent as it is now and reads Trace's answer.
  • catalog: lists every change Break knows; --labels adds the labels a change carries from two published lists.

hunt, confirm and recheck show a plan and ask start? before they run anything; --yes answers, and --dry-run shows the plan and runs nothing. Every command takes --json. The reference has each command's options and exit codes.

The docs

These pages are also on the site, at poissonlabs.ai/docs/break.

What Break does not claim

A hunt that finds nothing has shown that the conditions it tried, on the cases you gave it, did not fail more than the control in the runs it had. It has not shown more than that, and Break does not say it has. A finding says the agent fails more under one named condition; it does not say how often that condition happens to you. Every test, interval and p-value Break prints beside a finding is computed by Trace or Prove; Break itself only counts runs and divides. Each finding prints the command that gives the full report. What Break does not claim sets the limits out.

Where Break sits beside Tasks, Prove and Trace

Tasks generates controlled test tasks. Break finds the conditions under which an agent fails. Trace checks whether a fix held: confirm and recheck ask it. Prove tells you whether a difference is real, and stores every run: a hunt's store/ is a Prove store. Installing Break installs Prove and Trace with it. Break does not need Tasks.

Status

This is version 0.2.0, an alpha. It has one way in, rollout: an agent Break can call as a Python function. It changes tool behaviour (ten faults) and the request (five operators), and searches with two strategies that do not learn. Adapters for agent frameworks and MCP servers, changes to the conversation and to the model's own calls, and a search that learns are not in this version; the catalogue names what waits for them. It runs on macOS and Linux, on Python 3.11 or later. confirm and recheck hand their test to Trace, which runs on Python 3.11 to 3.13: on Python 3.14 Break installs without Trace, those two commands say so and name what to do, and the other commands work as they do on 3.13.

Break is on PyPI as poisson-break, and its page on the site is poissonlabs.ai/tools/break. It depends on Prove 0.4.0 or later and Trace 0.1.0 or later, with no upper bound on either, so it installs beside the newest of both, and pip installs both from PyPI with it. With uv the line is uv pip install poisson-break.

The reference has the commands, the settings file, how runs are stored, and the library under the command.

Development

In a checkout, with a virtual environment in .venv, .venv/bin/python -m pip install -e ".[dev]" installs Break with what its tests need, .venv/bin/python -m pytest -q runs the suite, .venv/bin/ruff check . lints and .venv/bin/mypy checks the types. The suite runs under a guard that fails any connection. The reference says more under Developing.

Licence

MIT. See LICENSE and NOTICE for what Break includes from others.

Citation

@software{poisson_break,
  title  = {Poisson Break},
  author = {{Poisson Labs}},
  year   = {2026},
  url    = {https://github.com/poisson-labs/break}
}

Metadata

Release files for poisson-break 0.2.0

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

Source distribution (sdist)

Source distribution for poisson-break 0.2.0
File Size Uploaded Provenance Actions
poisson_break-0.2.0.tar.gz 977.0 kB With provenance Details for poisson_break-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for poisson-break 0.2.0
File Interpreter ABI Platform Actions
poisson_break-0.2.0-py3-none-any.whl Python 3 none any Details for poisson_break-0.2.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / poisson_break-0.2.0.tar.gz

Download URL poisson_break-0.2.0.tar.gz
Size 977.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7188c7d13506249e12afd66320ac1fd021997dda67ffff3c04ee8c94cda771bb
BLAKE2b-256 checksum
How to use checksums
f37f26ec3840017a6e31099d624428dcc85a924d6abb8d9f92a223f293f187fe
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 Nov 30, 2026.

Transparency log

Release files / poisson_break-0.2.0-py3-none-any.whl

Download URL poisson_break-0.2.0-py3-none-any.whl
Size 208.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9edc63da416fc665813050215a9fb67e33b0e217f53fc51f77bef799cbaf29f1
BLAKE2b-256 checksum
How to use checksums
ae928e821867fde2136701ccffc64d19efcf104a2a63ca01e6828e82d937ece9
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 Nov 30, 2026.

Transparency log

Security for poisson-break 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for poisson_break-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 Nov 30, 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