Stoke / Guides

Guides

Task-shaped walkthroughs for running agents behind Stoke — capping spend, killing runaway loops, and keeping prompts on your own hardware. Every command here is one we run ourselves.

Security

Block Prompt Injection at the Gateway

Most prompt injection tools only observe and alert. Wire a detector into a Stoke webhook plugin and it refuses the request before any model sees it.

Read the guide →
Security

Cache Identity and Scope

Understand the exact request identity and caller scope used by Stoke's response cache.

Read the guide →
Security

Expose Ollama to Your Network Safely

Setting OLLAMA_HOST=0.0.0.0 publishes an unauthenticated model server to your whole LAN. Put an authenticated Stoke gateway in front of Ollama instead.

Read the guide →
Cost

Cap Claude Code API Spend with a Local Budget Gateway

Cap Claude Code API spend with Stoke, a local gateway enforcing a hard budget, rate limits, and a loop breaker before any request reaches Anthropic.

Read the guide →
Cost

Named-Route Response Cache Policy

Opt into exact response caching and bounded coalescing on eligible named routes.

Read the guide →
Cost

Stop a Runaway AI Agent From Burning API Credits

An AI agent that loops at 2am burns API credits until morning. Stop runaway agent spend at the request path with hard budget caps and a loop breaker.

Read the guide →
Routing

Connect Codex and Ollama Through Stoke

Use native Codex Responses traffic and discovered Ollama models behind one authenticated Stoke gateway.

Read the guide →
Routing

Run Ollama Across Two Machines Without Exposing It

Run Ollama across two machines by federating two Stoke gateways. Your desktop GPU serves the laptop over LAN while Ollama stays bound to 127.0.0.1.

Read the guide →
Efficiency

Use Optional Headroom for JSON Tool Results

Compact eligible JSON tool-result whitespace before native Responses requests, with an authenticated local Headroom worker.

Read the guide →

Put a control point in front of your agents

Stoke is a single Rust binary: hard budget caps, a runaway-loop kill switch, and local-first routing — enforced before a provider is ever called. Open source, MIT.

Get Stoke on GitHub