Skip to main content

Myles — the circuit breaker for AI agents

Stop your agent bankrupting you overnight. A zero-config local proxy that catches runaway loops and budget blowouts before they burn money — any agent, any language, any provider, no code changes.

pip install myles-ai
myles demo            # see it work in 15s (no API key)
myles run             # start watching your agents (observe-only, safe)

Myles catching a runaway loop and saving money


The problem

Autonomous agents get stuck — a broken tool retried thousands of times, a reflection loop that never converges, dozens of parallel sessions grinding the same impossible lookup. Developers wake up to $2k-in-4-hours and $8k-overnight bills. Platform daily caps kick in after the runway is gone. (real stories.)

Myles sits in the request path and stops the bleed in real time.

See the value in 15 seconds

myles demo
  call  5  forwarded  $0.0153   <-- MYLES: runaway loop detected!
  call  6  BLOCKED    $0.0000   (Myles refused — would have cost $0.0153)
  ...
  SAVED : $0.1530 on this ONE loop

Try it on your own agent (safe — observe-only)

myles run                                   # observe mode: logs, never blocks
export ANTHROPIC_BASE_URL=http://localhost:8788   # Claude Code
# ...use your agent normally...
myles report                                # what it WOULD have stopped + saved

When you trust it, flip on enforcement:

myles run --enforce --budget 5.00           # now it actually blocks

What it stops

Problem How Myles catches it
Runaway loop Semantic novelty detection — flags calls that stop carrying new information, even when the agent rephrases the same failing request or spreads it across tools.
Budget blowout Real-dollar metering from actual token usage + a hard cap. Blocked calls never reach the provider — they cost $0.
Fan-out Cross-run detection: the same doomed intent across many concurrent sessions, contained fleet-wide — something per-process tools can't do.

Not a compressor. Not a router. Not a dashboard. A wire-level kill switch that refuses the bad call mid-flight and shows you what it saved.

Why it works (30s)

The detector measures information novelty per step: a healthy loop keeps exploring new state; a runaway collapses to near-zero novelty while still spending. Similarity is IDF-weighted (learns your boilerplate, so read file src is ignored and the real intent decides) and response-aware (only a proxy sees responses — that's what separates a refining loop from a stuck one). Built and validated with an open probe — see probe/FINDINGS.md.

Install

pip install myles-ai   # zero dependencies, stdlib only, Python 3.9+ · provides the `myles` command

Or run from source: python -m myles run.

Status

v0.1 — early MVP, seeking feedback. Enforcement validated end-to-end. Honest limits:

  • Observe-only by default on purpose — try it with zero risk, then --enforce.
  • Cross-run uses a coarse intent key; can be sensitive on common short intents (tuning next).
  • Streaming is buffered (fine for coding-agent sizes); true pass-through is a later optimization.

Issues and PRs welcome. Apache-2.0.

Let's connect

I'm building Myles in the open and I'd genuinely love to hear from you — whether it's feedback on the idea, a bug, a horror story of your own agent going rogue, or you just want to talk about the project. Reach out:

— Elam Olame Mugabo


Built for people who ship agents and hate surprise bills.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myles_ai-0.1.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myles_ai-0.1.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file myles_ai-0.1.0.tar.gz.

File metadata

  • Download URL: myles_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for myles_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab121c474f7aad865405dbf1a69e7fcebd53cb258fa26f9dd184ae2a164cd6cc
MD5 7b3c03bac93f27f058e2e286abf34c63
BLAKE2b-256 3b1a4e6da583caaa086e97f629b25f5f3c66a1285c239d1014dbfb545f57c481

See more details on using hashes here.

Provenance

The following attestation bundles were made for myles_ai-0.1.0.tar.gz:

Publisher: publish.yml on ElamOlame31/Myles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file myles_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: myles_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for myles_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1e852218e20482fdacb905f9f632538d1a5d1e3313566f6202978bff32b202
MD5 af0041b809457f339aaa006424619680
BLAKE2b-256 e9c6ef6b922042c4783e8bc13e8b5f82a61b03380e1254face37c9d8f1db7c80

See more details on using hashes here.

Provenance

The following attestation bundles were made for myles_ai-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ElamOlame31/Myles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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