
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@timothywalton/agent-top
Advanced tools
htop for AI agents. Live terminal dashboard for token burn rate, $ cost, API call rate, and action loops — press 'k' to kill a runaway agent on the spot. Built on aegis-node.
htop, but for your AI agents. Live token burn rate, $ cost, API call rate, and loop detection — in your terminal, with a one-key kill switch.

You can htop your CPU. You can docker stats your containers. But your AI agent — the thing that can rack up a $400 API bill in 20 minutes from a silent retry loop — runs invisibly until the bill arrives.
agent-top wraps any agent process and shows you, live, in your terminal:
k) to kill it instantly — no Ctrl-C dance, no "are you sure"npx agent-top -- python my_agent.py
For live cost/token tracking, your agent prints one JSON line per event to stdout — these lines are automatically stripped from the visible output:
import json
print(json.dumps({"agent_top": {"tokens": 1500}}))
print(json.dumps({"agent_top": {"api_call": "openai.chat.completions"}}))
print(json.dumps({"agent_top": {"action": "tool:bash:ls"}}))
No telemetry? agent-top still works — you get uptime, exit status, and the kill key, no code changes needed.
agent-top pid 5821 uptime 00:01:42
tokens/min ████████████████████████░░░░░░░░ 38,400 / 50,000
api calls/m ████████████████░░░░░░░░░░░░░░░░ 16 / 60
total tokens 194,200
total api calls 78
est. cost $0.3884
top action tool:web_search:query=1 (x14/min) ⚠ possible loop
[k] kill agent now [q] detach aegis-node: active
agent-top is the dashboard; aegis-node is the enforcement layer. Install both — agent-top detects aegis-node automatically and shows enforcement status in the footer. Use agent-top to watch, aegis-node to guarantee the limits hold even when you're not looking.
npm install agent-top aegis-node
By default, cost is estimated at $0.002 / 1k tokens (rough blended small-model rate). Override with --price-per-1k:
npx agent-top --price-per-1k 0.015 -- python my_agent.py
Or report cost_usd directly per event for exact accounting:
{"agent_top": {"tokens": 1500, "cost_usd": 0.0225}}
agent-top panes for agent swarms)Part of the agent-economy infrastructure stack: aegis-node (kill switch), proof402-middleware (x402 payments — RLUSD/XRPL or USDC/Base), and the full agent-payment architecture.
→ scriptmasterlabs.com/stack · Full architecture map
MIT
FAQs
htop for AI agents. Live terminal dashboard for token burn rate, $ cost, API call rate, and action loops — press 'k' to kill a runaway agent on the spot. Built on aegis-node.
The npm package @timothywalton/agent-top receives a total of 3 weekly downloads. As such, @timothywalton/agent-top popularity was classified as not popular.
We found that @timothywalton/agent-top demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.