Guardrails for AI agents. Budget limits, kill switches, approval gates, run traces.
One decorator (Python) or wrapper (TypeScript). No framework lock-in.
Let your agents run. We'll keep them honest.
Python
pip install wickdimport wickd
@wickd.agent(budget=wickd.Budget(per_run=2.00))
def my_agent(task: str):
client = openai.OpenAI()
return client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": task}]
).choices[0].message.content
my_agent.run("Summarise yesterday's support tickets")TypeScript
npm install wickdimport { agent, Budget } from "wickd";
const myAgent = agent({
fn: async (task: string) => {
const res = await new OpenAI().chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: task }],
});
return res.choices[0].message.content;
},
budget: new Budget({ perRun: 2.0 }),
});
await myAgent.run("Summarise yesterday's support tickets");- Budget rails -- hard cost ceilings (per-run, daily, monthly). Agent dies the moment it exceeds the cap.
- Approval gates -- pause at sensitive actions (DB writes, emails, payments) and wait for a human.
- Run traces -- every LLM call, tokens, cost, latency, decision branches. Saved as JSON to
~/.wickd/traces/.
Wickd monkey-patches LLM SDK client methods (openai.ChatCompletion.create, anthropic.Messages.create, etc.) when an agent run starts. Budget checks happen inside the patched call, before the response reaches your code. Your framework doesn't need to know Wickd is there.
Works with OpenAI, Anthropic, Gemini, LangGraph, CrewAI, Vercel AI SDK -- anything that calls an LLM SDK underneath.
wickd init # Scaffold config
wickd traces # View recent traces
wickd traces --cost # Sort by cost
wickd approve # Interactive approval mode
wickd status # List agents and runspackages/
core/ Shared trace schema, cost tables, types
sdk-python/ Python SDK (PyPI: wickd)
sdk-typescript/ TypeScript SDK (npm: wickd)
apps/
web/ Next.js dashboard
docs/ Documentation site
examples/ Framework-specific examples
Open an issue first for anything non-trivial.
# Python SDK
cd packages/sdk-python
PYTHONPATH=. python3 -m pytest tests/ -v
# TypeScript (from root)
npm install && npm run buildMIT
