# Overview

What rules are and how they shape agent behavior.



A **rule** is a reusable block of instructions that gets injected into an agent's system prompt. Rules are the most direct way to shape how an agent thinks, what it always does, and what it never does — without rewriting prompts every time you start a job.

Each rule has a `title`, a `description`, and a `content` field with the actual instructions. A rule on its own does nothing; it has to be attached to an agent via the [agent resources](/api/agent-resources/overview) API before it influences any behavior.

## How it works [#how-it-works]

1. Create a rule with `POST /artifacts/rules`. The `content` field holds the prompt text — it can be a few words or thousands of lines of guidance.
2. Attach the rule to one or more agents via `POST /agents/{agent_id}/resources` with `entity_type: "agent_artifact_rule"`.
3. Redeploy the agent (or `/deploy` with `update_config_only: true`). The rule's content becomes part of the agent's effective system prompt.
4. Update the rule any time — every agent it's attached to picks up the change on next deploy.

## When to use it [#when-to-use-it]

* **Codify product-facing policy.** Tone of voice, brand guidelines, what the agent will and won't do in front of your end users — written once, attached to every customer-facing agent.
* **Maintain a rule library.** Reusable rules (code-review standards, security policy, on-call runbook, style guide) you mix into different agents instead of pasting into every system prompt.

Rules pair well with [skills](/api/skills/overview) (which add capabilities) and [MCP configs](/api/mcp-configs/overview) (which add tools). Use rules for *what to say and how to think*, skills for *what to do*, and MCP configs for *what to call*.
