# Put guardrails, policies and approvals on an agent

Check what a letter-writing agent takes in, gives out and passes to tools with a guardrail profile, and hold the tool call that sends a letter until an administrator approves it.

A guardian checks or stops the work of other agents. On Katonic the checking is done by three platform controls: a guardrail profile on the agent, a tool-call policy on the tool it calls, and the **Approvals** queue where a held call waits for a person. This tutorial puts all three on an agent that drafts customer letters, so that no letter goes out unchecked. It is the tenth form in [Which builder for which agent](/agents/choose-a-builder).

**Who can use it:** the **Builder** role or higher picks a profile and attaches tools on an agent. Creating a profile needs the **Admin** or **Super Admin** role or the **Security** grant. Creating a policy and deciding a tool call need the **Admin** or **Super Admin** role. The tenant needs the guardrails and agent governance licences.

## Prerequisites

- An acting agent that drafts the letter, here `Customer Letter Drafter`; build it as in [Build an agent that acts on a request](/agents/forms/act-on-a-request).
- The system that sends letters, registered as an MCP server by an **Admin**; see [Add an MCP server](/tools/add-an-mcp-server).
- A guardrail profile, a named set of safety checks called rails. An administrator creates one from a template; see Guardrail profiles.
- An administrator to work through the last two sections with you, if you are not one.

## Put a profile on the agent

  
**Step 1. Open the agent's Guardrails section**

In Studio, open **My Agents**, open the agent in the builder and select **Guardrails**. Each card is a profile, with its rails and how many are on.

  
**Step 2. Pick the profile**

Select the profile whose rails should run on this agent. For letters, pick one with the rails that redact personal data switched on. You should now see the card marked as selected, and a line saying this profile is what the runtime enforces.
    ![The Guardrails section of the Customer Letter Drafter draft with one guardrail profile selected: a card per profile listing its rails and how many are on, the selected card marked, and a No profile option at the end.](https://docs.katonic.ai/img/agents/forms/put-controls-on-an-agent/forms-guard-profile.png)
*Pick the guardrail profile whose rails should run on this agent's turns.*

## Attach the sending tool and publish

  
**Step 1. Attach the tool**

Open **Tools**, select **Pick tools** on the mail system's card, tick the tool that sends a letter and select **Done**. The tool is marked **WRITE**. You should now see a notice under the cards saying that one attached tool requires human approval before each call.
    ![The Tools section of the Customer Letter Drafter draft: Connected servers with two tools attached, the first server card showing two of two tools, and a notice under the cards saying one attached tool requires human approval before each call.](https://docs.katonic.ai/img/agents/forms/put-controls-on-an-agent/forms-guard-write-tool.png)
*A tool that writes is marked when you attach it, and the notice counts the attached tools that need approval before each call.*

  
**Step 2. Publish**

Select **Publish**. When the agent is published, a tool that writes and has no tool-call policy yet gets one that requires approval. [Before you build a form of agent](/agents/forms/before-you-build) has the rule in full.

## Check or set the policy

An administrator does this section.

  
**Step 1. Look for the tool's row**

In the Control Room, open **Policies**. Find the row whose **Scope** names the mail server and the sending tool. If it is there and its action requires approval, go to the next section.

  
**Step 2. Create the policy if there is none**

Select **Create Policy**. Enter a **Policy Name** that says what it governs, such as `Customer letters need approval`. Under **Action**, choose **Requires Approval**. Leave **Approvers** empty to notify all admins, or type the email addresses of the administrators who check letters. Under **Scope**, choose the **Server** and the **Tool**. Set **Priority** to 10, keep the switch on **Active** and select **Create Policy**.
    ![The Create Policy dialog: the Basics section with the Policy Name and Description fields, the Action section asking what should happen when the policy matches a tool call with the choices Requires Approval and Block, and the start of the Approval Routing section with its Approvers field.](https://docs.katonic.ai/img/admin/policies/policy-create-dialog.png)
*Create Policy: name the policy, choose Requires Approval or Block, optionally list approvers, then set the scope and priority further down.*

  
**Step 3. Check that it is enforced**

A row can read **Active** and still carry **Saved but not enforced**, which means the tool gateway is not applying it. The header counts such policies. Do not rely on the row until that label is gone and the test below has held a call.

## Decide a held letter

  
**Step 1. Ask the agent to send a letter**

In the Work Room, open the agent and ask it to send a letter on a test case.

  
**Step 2. Open the request**

As an administrator, open **Approvals** in the Control Room. On **Tool Calls**, select the pending row. The detail names the tool call, who requested it, the agent and the **Tool Arguments**, with personal data marked as redacted.
    ![An approval request opened from the queue: the tool call named as server and tool, its Pending status, who requested it and when, the Approve and Deny buttons with their A and D keys, the line saying a decision is required because the tool call is waiting on a human, and the Team, Agent, Risk level and Requested at fields above the Decision required bar.](https://docs.katonic.ai/img/admin/approvals/approval-request-detail.png)
*A request's detail: which tool the agent wants to call, who asked, the team, the agent and the risk level, then Approve or Deny. The same two buttons repeat in the Decision required bar at the foot.*

  
**Step 3. Check it and decide**

Read the letter in the arguments against the disclosure rules. Select **Approve** or **Deny**, add a **Decision Note** saying what you checked, and confirm.

## Verify

Ask the agent to send one letter. Three things show the controls work:

- A pending row appears on **Approvals** naming the mail server and the sending tool, and no letter leaves the mail system while it is pending.
- After **Deny**, still no letter has been sent. After **Approve** on a second request, ask the agent to go ahead: the call runs when the agent makes it again, and one letter is sent.
- The **Audit Trail** tab on **Approvals** records who decided each one, with the note.

## Troubleshooting

- **The letter was sent with no pending row.** No policy is being applied to the tool. Open **Policies**: if the row reads **Saved but not enforced**, or there is no row, create the policy as above and test again; see Policies.
- **A person who checks letters cannot decide.** Only the **Admin** and **Super Admin** roles decide tool calls. Naming someone under **Approvers** notifies them; it does not give them the role.
- **A request expired.** A request with a deadline that nobody decides reads as expired with no decision. Ask the agent again.
- **No profile selected** in the agent's Guardrails section. The workspace default applies once the agent is published, if the workspace has one.
- **Approvals isn't enabled in this license.** The tool-call queue needs the approvals licence.
- **You want a second agent to review each draft first.** There is no separate guardian agent to attach. Put a checking step and an approval in a workflow; see [Build a workflow of fixed stages](/agents/forms/fix-the-order-of-the-work).

## Related

- [Which builder for which agent](/agents/choose-a-builder)
- Guardrails
- Create and manage a policy
- Decide tool calls

Source: https://docs.katonic.ai/agents/forms/put-controls-on-an-agent
