Skip to content

Policy as code for AI agents

Write the rules an agent must follow as code, test them, and watch the agent stop when it should. Build it from a starter template.

Status
Planned
Level
Intermediate
Length
3 hours
When
To be announced
Get notified of dates ↗

Agents are easy to start and hard to trust. This lab is about the second part: writing down what an agent may do, in code, so the rules are visible, testable, and reviewed like any other change.

What you will build

You start from the starter template, which already runs an agent with a few tools. You then write a policy that decides, for each tool call, whether to allow, ask a person, or block, and you add tests that fail when the policy is wrong.

How the session runs

  1. A short walkthrough of the starter and the idea of policy as code.
  2. You build the policy yourself, in small checkpoints, with others building beside you.
  3. You break your own agent on purpose, and fix the policy.
  4. You leave with a working repository you can adapt.

Bring

A laptop, Node, and an API key for any model provider you already use.

An idea worth building?

Bring the problem, the insight, and the ambition. Let’s figure out what we could build together.

Start a conversation