Skip to main content
A reliability agent that adds instances before a known traffic peak, such as a launch, a sale or a marketing email, and removes them after. It can change the number of instances of listed production applications between a floor and a ceiling. CPU, memory and branch stay as they are. Level: Reliability. See all the agent policy examples.

What the agent does

  1. Reads the current instances and the status of each listed application.
  2. Before the peak, raises the minimum and maximum number of instances.
  3. Redeploys the applications and checks they are healthy.
  4. After the peak, sets the instances back.

What the policy allows

The agent can

  • Find the organization, project and environment by name
  • Read the production environment, except environment variables
  • Set the minimum and maximum instances of the listed applications, between the floor and the ceiling
  • Redeploy the listed applications

The agent cannot

  • Go above the ceiling, set an unlimited maximum, or go below the floor
  • Change CPU, memory or the Git branch
  • Deploy a new version
  • Change environment variables, delete anything, or touch other applications
Anything the policy does not allow is refused with 401 Unauthorized.

The policy

Copy it, then replace each REPLACE_WITH_... value with a real ID from your organization.
scale-before-traffic-peak.rego
You can copy the IDs from the Console URL, or list them with qovery project list, qovery environment list and qovery application list.

Create the token

In a session signed in as an organization Owner or Admin, ask:
The qovery-policy-token skill finds the IDs, writes a policy like the one above, tests it locally and against the API, then creates the token.

Prompt for the agent

The agent runs with the Qovery Agent Skills and the Qovery CLI, in Claude Code, Codex, Cursor or any agent that supports skills. Give it the token through the environment, never in the prompt:
Then give the agent its task:
Every call the agent makes appears in the audit logs as policy:<token-id>:<token-name>.

Good to know

  • Autoscaling already adds instances when CPU or memory goes up. This agent is for peaks you know in advance, so the instances are ready before the traffic arrives.
  • The policy pins CPU, memory and branch to the values you write in it. If you change them later, create a new token with the new values.

All agent policy examples

Every use case, from read only to production changes.

API Policy Token (Preview)

How policies are evaluated, the input they see, and the limits.