# Grant risk classes to an agent

An agent's grant is the set of [risk classes](https://docs.cmdop.ai/reference/tools.md#risk-classes) it may use. A new
agent gets `read` only: it can look, and change nothing.

**In short:** Agents tab → the agent → switch on the classes it needs. A call runs only when the grant and the
machine's [ceiling](https://docs.cmdop.ai/guides/access/ceiling.md) both allow the tool's class.

## When to use this

An agent's call returns [`denied`](https://docs.cmdop.ai/reference/errors/denied.md), or you are about to give an agent a
task that changes files or runs commands.

## Steps

1. Open your page and the Agents tab.
2. Pick the agent.
3. Switch on the classes it needs, and nothing more:

   | To let it | Switch on |
   |---|---|
   | create and change files | `write` |
   | delete files, stop processes | `destructive` |
   | run commands and long tasks | `exec`: a command can do anything your user account can |
   | see the screen and windows | `screen` |
   | click, type and open apps | `control` |

   `screen` and `control` are never on by default. Switching one on asks you to confirm first,
   because a screenshot shows what no folder limit hides. Both also need the machine's ceiling to
   name them: [see and control the screen](https://docs.cmdop.ai/guides/screen.md).

The change applies to the agent's next call; the agent does not reconnect.

## Check

Ask the agent to repeat the refused call. It runs once both the grant and the ceiling allow the
class.

## If it fails

- Still [`denied`](https://docs.cmdop.ai/reference/errors/denied.md): the message names what is missing. When the grant
  holds the class, the ceiling of that machine does not: [set the ceiling](https://docs.cmdop.ai/guides/access/ceiling.md).

## Related

[Set the ceiling](https://docs.cmdop.ai/guides/access/ceiling.md) · [Revoke an agent](https://docs.cmdop.ai/guides/access/revoke.md) ·
[Grants and the ceiling](https://docs.cmdop.ai/concepts/grants-and-ceiling.md)
