AXIGATE FINOPSDocs
Start free
Get started ›

Watch AxiGate stop a runaway agent

Two minutes, no agent and no API key: watch AxiGate stop an agent stuck in a loop. Then put a spending limit on your own.

You will learn

  • How to run the two-minute demo
  • Where to look once it has run
  • How to run your own agent with a spending limit
  • How to read the receipt it prints

Where this works

You don't need a plan to read on.
Free editionyour own machinesHosted FreehostedTeamhostedBusinesshosted
Watch the demo
Run your own agent with a limit

Get AxiGate

If AxiGate isn't on this computer yet, one command installs it on a Mac or Linux. It is free and needs no account.

Terminal
curl -fsSL https://raw.githubusercontent.com/axigatelabs/axigate-finops/main/install.sh | sh

On Windows, to check a download by hand, or for the details, see Install AxiGate.

Watch the demo

Run this to open the dashboard in your browser and send a few invented agents through AxiGate, with a pretend provider in place of the real one. Nothing is charged and no key is needed.

Terminal
axigate-finops run --demo

One of the agents gets stuck, making the same call over and over. A spending limit stops it, just as it would stop a real one.

When it says the demo data is ready, look around, then press Ctrl-C to stop it.

What to look at

  • Dashboard: what the agents spent, and the provider bill that doesn't match what was recorded.
  • Needs a look: the key whose calls were refused and the bill that's off, gathered in one place.
  • Runs: open the stuck one. The top of its page names the limit it hit and the call where it happened.

Run your own agent with a limit

Now the real thing. Your agent keeps using your own provider key; AxiGate records each call and refuses the next one once the limit is reached.

On Connect a gateway, make a key for the computer where your agent runs. The key is shown once, with the command that starts the gateway and a local dashboard, the key already in it. Run that command on the computer with the limit for each run added at the end, as below, and leave it running.

Terminal 1
AXIGATE_INGEST_KEY=<the key from Connect a gateway> axigate-finops serve --ingest-url https://<your workspace>/api/ingest --max-spend-per-run 5

In your own workspace this is Connect a gateway. Start free to get one.

Then, in a second terminal, start your agent through it, with your own agent's command in place of claude. Every call shows up in your workspace, and a receipt is printed when the agent finishes.

Terminal 2
axigate-finops run --gateway http://127.0.0.1:8787 -- claude

Read the receipt

When your agent finishes, AxiGate prints a receipt: how many calls it made and what they cost. If a limit stopped the run, a line says how many calls were refused and why.

Example receipt (invented figures)
axigate-finops: 38 calls served · $1.2040 · cap $5.00
  budget: $1.2040 of $5.00 spent · $3.7960 left

On your own machines it also shows how much of the limit was left. A run with no limit gets a suggested one, about twice what it spent, as a command you can copy; a run stopped for repeating itself gets a note to check the agent instead.

The Runs page lists the costliest runs and any a limit stopped; open one to see each call it made and what it cost. On your own machines the dashboard closes when the agent finishes, and axigate-finops serve starts it again.

Where to go next

Recap

  • axigate-finops run --demo shows a runaway agent stopped, with invented data and no key.
  • axigate-finops run --max-spend 5 -- claude puts a limit on your own agent; with a hosted workspace, the limit goes on the gateway.
  • The receipt and the Runs page show what each run cost and where it was stopped.