Stop runaway agents.
Cap per-user spend.
Audit every LLM decision your team ships.
Hard cost ceilings and loop detection for every agent your team ships. Five lines of code. Zero infrastructure.
Works with LangGraph · CrewAI · OpenAI Agents SDK · any framework
Runtime protection for every LLM call.
My agent might loop and burn $200.
Runtime governance for agent runs — hard budget ceilings, loop detection, and a kill switch that fires before the money is spent.
My users could drain my OpenAI bill.
Per-user spend enforcement with atomic Redis. Blocks the API call before it executes — no tokens burned, no cost incurred.
Your agent shouldn't be able to spend $200 on a $2 task.
Autonomous agents are non-deterministic by design. One stuck loop, one bad tool call, one hallucinated retry — and a $0.40 task becomes a $40 incident. You won't see it until the OpenAI bill arrives.
Thskyshield wraps every agent run with a hard budget, a tool-call policy, and a circuit breaker. Set the policy once in your dashboard. Enforce it across every agent your team ships. Audit every decision.
Agent retrying the same call 80 times — killed at the loop signature, not at midnight.
Task hits the per-run ceiling — terminated with partial result, not infinite retry.
Agent tries to call send_email 50× or hit an unallowlisted domain — blocked at the call site.
Cost-per-successful-task creeping up after a deploy — flagged before the bill lands.
import { Thskyshield } from '@thsky-21/thskyshield'
const shield = new Thskyshield({
siteId: process.env.THSKYSHIELD_SITE_ID!,
apiKey: process.env.THSKYSHIELD_KEY!,
})
const run = await shield.beginRun({
agent: 'research-agent',
user: userId,
policy: 'default', // policies live in your dashboard
})
try {
while (!done) {
const ok = await run.beforeStep({ tool, args, estimatedTokens })
if (!ok.allowed) break // budget, loop, or policy hit
const result = await callLLMAndTool()
await run.afterStep({ tokens, toolResult })
}
} finally {
await run.end()
}Five lines. Drop into any agent loop. Works with LangGraph, CrewAI, OpenAI Agents SDK, or your own.
Design partners. We're working with a small group of teams to shape the agent SDK. Free forever for the first five. Want in?
Talk to usThree SDK calls. Complete runtime governance.
Wrap your agent loop with beginRun, beforeStep, and afterStep. The control plane enforces your policy on every call — atomically, in under 10ms.
shield.beginRun()Set a dollar budget, max iterations, timeout, and loop detection threshold. Returns a run handle tied to your API key and site.
run.beforeStep()A single atomic Redis round-trip checks all four limits — budget, iterations, timeout, loop — before the API call fires. Returns allowed or throws ShieldKilledError.
run.afterStep() + run.end()afterStep reconciles the actual token cost in Redis. end() writes the final summary to Supabase — total cost, iteration count, kill reason if applicable.
import { Thskyshield, ShieldKilledError } from '@thsky-21/thskyshield'
const shield = new Thskyshield({ siteId, apiKey })
const run = await shield.beginRun({
budgetLimitUsd: 2.00,
iterationLimit: 30,
loopThreshold: 5,
})
try {
while (!done) {
const { requestId } = await run.beforeStep({
stepType: 'llm',
model: 'gpt-4o-mini',
estimatedTokens: { input: 500, output: 200 },
promptInput: currentPrompt,
})
const result = await callYourLLM(currentPrompt)
await run.afterStep({
requestId,
actualTokens: result.usage,
model: 'gpt-4o-mini',
})
}
} catch (e) {
if (e instanceof ShieldKilledError) {
// e.reason: 'killed_budget' | 'killed_loop' | 'killed_iterations' | 'killed_timeout'
console.log(`Agent stopped: ${e.reason}. Spent: $${e.spent}`)
}
} finally {
const summary = await run.end()
console.log(`Total: $${summary.totalCostUsd}`)
}killed_budgetkilled_loopkilled_iterationskilled_timeoutNot a library. A layer above your code.
runs in-process · per developer · stops with the process
runs above your code · per org · persists across deploys
Drop-in budget libraries are great — for one developer protecting one script. They run inside your process, log to stdout, and stop where your code stops.
The moment you have a team, multiple services, policies that need to match across them, or a finance lead who wants to see what's actually happening — you need a layer above the code. A place where policy lives. A place where every decision is logged. A place that doesn't disappear when the process exits.
That's Thskyshield. The SDK is two functions. Everything else — policies, dashboards, audit logs, alerts, cross-service visibility — lives in the control plane.
Simple. No surprises.
- 1,000 agent runs / month
- 100 LLM-app active users
- 1 policy
- 7-day audit retention
- —Webhooks
- Community support
- Unlimited agent runs
- Unlimited active users
- Unlimited policies
- 90-day audit retention
- Webhooks
- Email + Slack support
Common questions.
Ship agents with a safety net.
Free tier. No credit card. Deploy in 60 seconds.