Skip to main content
These examples show AI agents doing real DevOps work on their own, each with an API Policy Token (Preview) that allows exactly that job and nothing else. Qovery checks the policy on every API request the agent makes, through the CLI or the API. So the agent does not need a human to approve each action, and anything outside the job is refused. Each page gives you:
  • the use case, and what the agent does step by step,
  • what the policy allows and what it blocks,
  • the full policy, ready to copy,
  • a prompt to create the token with the qovery-policy-token skill,
  • a prompt to give the agent its task.

Examples

Start at the top. The first jobs only read or touch non-production environments. The last ones change production, in a narrow way.

How to use an example

1

Copy the policy and replace the IDs

Every value that starts with REPLACE_WITH_ is an ID from your organization: organization, project, environment, application or cluster. Copy them from the Console URL or list them with the Qovery CLI.
2

Create the token

In the Console, open your organization settings, then Token API, then Add new in Policy API Token, and paste the policy. Or ask a coding agent with the qovery-policy-token skill, using the prompt on the page. Only an organization Owner or Admin can create a policy token.
3

Give the token to the agent

Set it in the agent’s environment, never in the prompt:
The agent uses the Qovery Agent Skills and the Qovery CLI.
4

Give the agent its task

Use the prompt on the page, adapted to your project and environment names.

What every policy has in common

  • Deny by default. Each policy starts with default allow := false. A request is allowed only if one rule says so.
  • A rule for CLI lookups. The Qovery CLI turns names into IDs by listing the organization, its projects and the project’s environments (and its clusters, for the examples that clone). The cli_lookup rule allows those reads and nothing more.
  • No environment variable values. The read rules leave out environmentVariable endpoints, because values can be sensitive. Remove that line if your agent needs them.
  • One scope per job. Each rule is tied to an environment, a project, or a list of services, so the agent cannot reach anything else.

Test a policy before you create the token

A denied request returns 401 with no detail, and a policy cannot be edited after creation. Test it first with OPA. Add a temporary package line, then evaluate it against a request:
The result must be false for every action the agent must not do. Do not submit the package line: Qovery adds its own. The Rego Playground works too. The qovery-policy-token skill runs these tests for you, then checks the token against the real API.

API Policy Token (Preview)

How policies are evaluated, the input document, recipes and limits.

Let a coding agent deploy

Set up a coding agent with a scoped Qovery token.

Securing AI agent access

Read-only MCP, CLI allowlists and policy tokens compared.

Agent Skills

The skills the agent uses, including qovery-policy-token.