Python SDK
The NeverHalt Python SDK that is included in the runtime: heartbeat, activity events and human approvals.
Agents hosted by NeverHalt can import neverhalt without installing anything: it is part of the base image. Events are queued in memory and sent by a background thread, so a slow or unreachable control plane never blocks your agent.
import neverhalt
neverhalt.beat() # proof of life for the watchdog
neverhalt.llm("claude-sonnet-5-5", tokens_in=812, tokens_out=140, cost_eur=0.004, name="plan next step")
neverhalt.tool("backtest", duration_ms=5400)
neverhalt.error("backtest failed")
if neverhalt.ask("Place a live order?", timeout=1800):
place_order()- beat(): call it from your main loop. If it stops, the watchdog treats the agent as stalled and restarts it.
- ask(): returns True only if the owner approves. Denied, expired or an unreachable control plane all return False.
- Agents you run yourself use the HTTP endpoints described in Connect an agent you run.