RiskKernel
kill -9 an AI agent and resume it without paying twice
Last verified:
What is RiskKernel?
RiskKernel is an open-source, self-hosted reliability runtime for AI agents that puts deterministic cost, loop, and time budgets around agents with a real kill switch, crash-resumable runs, and human-approval gates. It is a single Go binary (~30-60 MB) that you run on your own infrastructure with your own provider keys, ensuring no telemetry and complete data control. The tool addresses common production failures like runaway loops, surprise token bills, lack of kill switches, crashed long runs re-spending, no human in the loop for side-effecting tools, and missing audit trails.
Key features include hard cost ceilings that fire the kill switch mid-loop before spend lands, loop and time budgets that cap iterations and wall-clock per run, crash-resumable runs that allow resuming from checkpoints without double-spend, and human-approval gates that block side-effecting tool calls and route them for approval over CLI, web, or webhook. RiskKernel also supports OpenTelemetry export for GenAI spans to observability backends like Datadog, Grafana, or Honeycomb.
RiskKernel is designed for teams building AI agents in production, developers evaluating reliability solutions for their agent stack, and organizations wanting deterministic guardrails without license gates or lock-in. It works with OpenAI, Anthropic, and existing stacks through three adoption paths: proxy mode (one environment variable), Python SDK with adapters for LangChain/Claude Agent SDK/OpenAI Agents SDK, and OpenTelemetry integration for already-instrumented apps.
RiskKernel pricing
Pricing model: Freemium
RiskKernel is free to self-host forever under the Apache 2.0 open-source license. The runtime is feature-complete with no license gates, no phone-home, and no lock-in. It is a single Go binary you run on your own infrastructure with your own provider keys. There is no paid tier for the self-hosted runtime. A hosted dashboard featuring runs, spend, and approvals in one place is currently in private beta - join the waitlist for early access and launch updates. No pricing information is available for the hosted dashboard yet.
RiskKernel pros
- Open-source under Apache 2.0 license with no license gates
- Self-hosted on your own infrastructure with full data control
- Deterministic cost budgets with hard per-run dollar ceilings
- Deterministic loop count budgets preventing runaway loops
- Deterministic time budgets capping wall-clock per run
- Real kill switch that fires mid-loop before spend lands
- Crash-resumable runs with checkpointing to avoid double-spend
- Human-approval gates for side-effecting tool calls
- No telemetry - verifiable in the source code
- Your API keys never stored in plaintext or logged
- Single Go binary ~30-60 MB with zero dependencies
- Works with OpenAI and Anthropic providers natively
- Proxy mode requires only one environment variable change
- Python SDK with LangChain, Claude Agent SDK, OpenAI Agents SDK adapters
- OpenTelemetry export to Datadog, Grafana, Honeycomb backends
- Per-run audit trail logging cost, loops, and checkpoints
- OpenAI-compatible endpoint for zero code rewrite adoption
- Framework-agnostic - LLM cannot bypass approval gates
- No phone-home behavior, verifiable outbound communication
- SQLite file storage under your complete control
RiskKernel cons
- Supports only single instance with SQLite, no high availability yet
- Uses only one API token at a time
- Does not support streaming yet
- No hosted dashboard yet - only in private beta on waitlist
- Authentication requires external tools like oauth2-proxy or Authelia
- Only ~20MB static binary limits some advanced customization
- Self-hosting requires your own infrastructure setup
- You must provide and manage your own provider keys
- No multi-tenant support currently
- Limited to Go binary - no other language runtime options
Frequently asked questions about RiskKernel
What is RiskKernel?
RiskKernel is an open-source, self-hosted reliability runtime for AI agents that puts deterministic cost, loop, and time budgets around your agents with a real kill switch, crash-resumable runs, and human-approval gates. It is a single Go binary you run on your own infrastructure with your own provider keys, ensuring no telemetry.
How do I install RiskKernel?
You can install RiskKernel in three ways: run the Docker container with 'docker run ghcr.io/prashar32/riskkernel', install the Python SDK with 'pip install riskkernel', or install from source with 'go install github.com/prashar32/riskkernel@latest'. The binary is ~30-60 MB.
How do I point my agent at RiskKernel?
Point your existing agent at RiskKernel with one environment variable: set OPENAI_BASE_URL=http://localhost:7070/v1. Every call is then metered, logged, checkpointed, and forwarded with your key without any code rewrite.
What providers does RiskKernel support?
RiskKernel works natively with OpenAI and Anthropic. It provides an OpenAI-compatible endpoint, so it also works with any provider that has an OpenAI-compatible API.
Does RiskKernel collect telemetry?
No, RiskKernel has zero telemetry. Nothing phones home, and this is verifiable in the source code. Outbound communication is strictly your provider, your OT endpoint, and your approval webhook.
What happens when I hit a cost budget ceiling?
When the cost ceiling is hit, the kill switch fires immediately mid-loop, before the spend lands. This stops the run before you incur the bill, as shown in the example where a run was killed at $5.00 ceiling.
Can I resume a crashed agent run?
Yes, RiskKernel supports crash-resumable runs. You can send kill -9 mid-run and resume from the last checkpoint with 'resume a91f2c', restoring from checkpoint without double-spend. No re-spending the work already paid for.
How do human-approval gates work?
Human-approval gates block any side-effecting tool call and route it for approval over CLI, web, or webhook. This is framework-agnostic and the LLM cannot bypass it, ensuring human oversight for irreversible actions.
Is RiskKernel open-source?
Yes, RiskKernel is open-source under the Apache 2.0 permissive license. The runtime is feature-complete with no license gates, no phone-home, and no lock-in. You can view the source on GitHub at github.com/prashar32/riskkernel.
Is there a hosted dashboard for RiskKernel?
The hosted dashboard with runs, spend, and approvals in one place is currently in private beta. You can join the waitlist on their website to get early access and launch updates. The self-hosted runtime is open-source and available today.