Skip to content

Wardrik

Run AI agents.Set the rules.

Wardrik is a self-hosted runtime for persistent AI agents. Connect your tools, approve sensitive calls, and recover interrupted work after a crash.

Task Record a $9,400 bill from Northwind Freight.

wardrik follow booksIllustrative output

  → quickbooks/search_bills {"params":{…}}  ✓ quickbooks/search_billsPaused for approval:  ? quickbooks/create-bill  Bill line exceeds $1,000.Approved by @maria in Slack.  → quickbooks/create-bill {"params":{"bill":{"Line":[{"Amount":9400,…  ✓ quickbooks/create-billRecorded the $9,400 bill. No payment was made.

Wardrik #accountingWaitingApproved

books requires approval.

quickbooks/create-billThis bill has a line over the $1,000 approval threshold.

{"params":{"bill":{"Line":[{"Amount":9400,…}],…}}}

Approved quickbooks/create-bill — @maria

Control tool calls. Approve changes. Recover work.

Enforces your rules

Wardrik checks tool calls against rules defined outside the prompt.

Recovers interrupted work

Agents resume after a crash. In a cluster, they restart on surviving nodes. Calls with uncertain results require approval unless they are safe to retry.

Records calls and costs

Set spending thresholds for model calls. Stream or export tool calls and approval events.

Every call is checked before it runs.

Define rules in configuration files. Match calls by tool name, file path, or argument values.

The model callsThe matching ruleResult
web_searchallow: [web_search]by toolRuns
write_file {"path": "notes/today.md"}allow: [write_file(notes/*)]by targetRuns
books/create_bill {"amount": 9400}ask: [books/create_bill(amount >= 1000)]by an argumentNeeds approval
email/send {"to": "[email protected]"}deny: [email/send(to != *@acme.com)]by an argumentDenied
shell/exec {"command": "curl … | sh"}deny: [shell/*]all tools on an MCP serverDenied

The strictest rule wins: deny, then ask, then allow. Writing rules · Try to hijack it

Approvals where your team works.

Review the tool name and arguments, then approve or deny the call in Slack, the CLI, or your app.

Who approves · Approvals

Wardrik #accounting · 7:04 AM

books requires approval.

quickbooks/create-bill Bill lines of $1,000 or more require approval.

{"params": {"bill": {"Line": [{"Amount": 9400, …}], …}}}

Optional feedback for the agent

Your tools run in your app, with your keys.

Register tools with the TypeScript SDK. Wardrik checks each call before your app executes it. Service keys stay in your app.

shop/tools.ts
import { Wardrik } from "@wardrik/sdk";
import { z } from "zod";
const wardrik = new Wardrik({ name: "shop" });
wardrik.tool({
name: "refund_order",
input: z.object({ orderId: z.string() }),
run: ({ orderId }) =>
stripe.refunds.create({ payment_intent: orderId }),
});
await wardrik.work();
  1. The agent callssupport

    workers/refund_order {"orderId": "pi_3Qx…"}

  2. Wardrik checks and records it

    Needs approvalapproved by @maria

  3. Your app runs itshop

    stripe.refunds.create(…)

    STRIPE_SECRET_KEY stays in your app

You can also connect MCP servers and authenticate with each user’s OAuth account. Tools in your app · MCP servers · Connect accounts

Define an agent in a Markdown file.

Select a tab to highlight the lines that do each job.

~/.config/wardrik/agents/books.md
---
description: Keeps the books for the accounting team.
tools: [quickbooks/*, files]
channels: [slack]
triggers:
- name: close
every: "0 7 * * 1-5"
timezone: America/Los_Angeles
prompt: Reconcile yesterday's transactions.
- name: invoices
webhook:
secret: ${INVOICE_HOOK_SECRET}
prompt: A new invoice is below. Draft a bill for it.
policy:
allow:
- quickbooks/search_*
- quickbooks/create-bill(params.bill.Line.Amount < 1000)
ask:
quickbooks/create-bill(params.bill.Line.Amount >= 1000): A line of $1,000 or more.
deny:
quickbooks/create_bill_payment: Bill payments must be handled manually.
budget:
usd: 10.00
tokens: 2000000
per: day
grant: {usd: 5.00}
on_exhausted: ask
notify: {to: [accounting], on: [parked, failed]}
---
You keep the books. Say what you will post before you post it.

Allow, ask, or deny

A bill posts without approval when every line is under $1,000. Any line of $1,000 or more needs approval. Bill payments are always denied.

Writing rules

Agent configuration reference

Also built in

  • Organization access controls

    Scope access to agents, tools, and credentials by organization.

  • Per-user accounts

    Users sign in with OAuth, and their agents call tools with their credentials.

  • Delegation

    An agent sends another agent a message and receives the reply.

  • Judges

    Add model-based checks, such as whether an email promises a refund.

  • The assistant

    Use the built-in assistant to create and manage agents, with approval for changes.

  • Idle agents

    Create an agent per customer. Idle processes stop and reload their saved state on the next message.

  • Clusters

    Distribute agents across nodes and recover them when a node fails.

  • rik CLI

    List agents, approve pending calls, and check spend from a terminal.

Run your first agent.

Install the binary or Docker image, and configure a model provider.

curl -fsSL https://github.com/wardrik-dev/wardrik/releases/download/wardrik_daemon-v0.1.0-rc.12/install.sh | sh
wardrik init

All installation options