Skip to content

Install the SRE agent

You need only a terminal and an internet connection. The installer gets everything else:

  • uv, which also gets Python 3.11 or later when necessary.
  • The repository (with git if you have it, or as a download).
  • All the dependencies.

You do not need administrator rights, Docker, Node.js, a GCP account or an API key.

🤖 Let your agent set it up

Open an empty folder in Antigravity, or run agy in an empty folder (any coding agent works). Paste this prompt. The agent installs everything, checks the setup and runs a first incident. It asks before it installs anything.

No agent yet? See Install the Antigravity CLI.

Short version, for an agent that can read web pages: "Set up the workshop with the instructions in https://xsavikx.github.io/sre-agent/llms.txt".

Set up the SRE agent workshop on this computer: https://github.com/xSAVIKx/sre-agent

1. Find my operating system and shell. Ask me before you install anything.
2. Run the workshop installer. It installs uv (and Python, if necessary), clones the repository into ./sre-agent, creates my branch "my-work" at the tag step-00, installs the dependencies and checks the setup.
   - macOS or Linux: curl -LsSf https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.sh | sh -s -- --workshop
   - Windows (PowerShell): $env:SRE_AGENT_WORKSHOP = "1"; powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.ps1 | iex"
   - If you cannot run the installer, do the same by hand: install uv (https://docs.astral.sh/uv/), then run git clone https://github.com/xSAVIKx/sre-agent.git, cd sre-agent, git switch -c my-work step-00, uv sync --all-packages.
   - The workshop needs git. If git is missing, tell me how to install it on my system.
3. In ./sre-agent, run: uv run workshop/check.py 0. All lines must say "ok". Fix red lines with "Problems and fixes" on https://xsavikx.github.io/sre-agent/install/
4. Run: uv run simulate_incident.py --engine-only. Explain the result in 3 sentences.
5. Read the skills in .agents/skills/ of the repository, and use them for my next questions (sre-workshop-coach for the workshop steps).

Do not ask for my GEMINI_API_KEY, and do not write it into a file.

One command

macOS and Linux:

curl -LsSf https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.ps1 | iex"

The installer puts the repository in the directory sre-agent. Then it runs the setup check uv run workshop/check.py 0. When all lines say ok, the installation is complete.

If uv was not on your computer before, open a new terminal before you use uv.

For the workshop

The workshop needs git. Add the workshop option:

# macOS and Linux
curl -LsSf https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.sh | sh -s -- --workshop
# Windows (PowerShell)
$env:SRE_AGENT_WORKSHOP = "1"
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/xSAVIKx/sre-agent/master/install.ps1 | iex"

With this option, the installer also creates your own branch my-work at the start of the workshop (the tag step-00).

Options

install.sh install.ps1 Environment variable Effect
--dir DIR -Dir DIR SRE_AGENT_DIR The directory for the repository. Default: sre-agent.
--ref REF -Ref REF SRE_AGENT_REF The branch or tag to get. Default: master.
--workshop -Workshop SRE_AGENT_WORKSHOP=1 Prepare for the workshop (see above).
--agent -Agent Start the Antigravity CLI with the setup skill after the installation. The installer does not install the CLI: see Install the Antigravity CLI.

With a pipe (| sh, | iex), use the environment variables, or sh -s -- <options>.

You can also run the installer in a checkout that you already have: sh install.sh or powershell -ExecutionPolicy ByPass -File install.ps1. It then uses that checkout.

Use it

These commands are the same on all systems:

cd sre-agent
uv run simulate_incident.py   # makes an incident and diagnoses it in your terminal
uv run workshop/chat.py       # the web chat: open http://localhost:8080/chat

To use Gemini instead of the scripted simulation, set GEMINI_API_KEY (get a key):

  • macOS and Linux: export GEMINI_API_KEY=...
  • Windows (PowerShell): $env:GEMINI_API_KEY = "..."

Agent help in the repository

Install the Antigravity CLI (optional)

You do not need an agent for the workshop: uv run workshop/step.py gives the hints and the solutions, and skips steps. The Antigravity CLI (agy) is an agent in your terminal. It can do the setup for you, and coach you through the steps.

Install it at home: the download is approximately 55 MB (macOS) to 190 MB (Windows).

# macOS and Linux
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Windows (PowerShell)
irm https://antigravity.google/cli/install.ps1 | iex

Then run agy one time. It opens your browser: sign in with your Google account. For more information, see Get started with the Antigravity CLI. If you prefer an app, use the Antigravity app.

The skills

After the installation, the repository has Antigravity skills in .agents/skills/. The Antigravity app and the Antigravity CLI (agy) find them automatically when you open the repository:

Skill What the agent does
sre-agent-setup Installs uv and the dependencies, checks the setup, prepares the workshop branch, runs the simulation, explains the result and fixes common problems.
sre-workshop-coach Shows your workshop progress, explains the next step, gives hints one level at a time, checks your code, and skips or jumps steps when you ask.
sre-workshop-facilitator For the person who runs the workshop: checks that everything is ready, publishes the steps and the website, and cleans up.
sre_incident_solver The SRE agent itself as a skill: diagnoses the latest incident.
sre-agent-deploy Guides you through bootstrap.sh, deploy.sh, the verification and cleanup.sh. It asks for your approval before each step that costs money.

The agent never asks for your API key: you set it yourself.

Prompts that you can use

Open the repository (the sre-agent folder) in the Antigravity app, or run agy in it. Then use one of these prompts:

Set up this project on my computer, run the incident simulation and explain the result.
Prepare my computer for the SRE agent workshop.
`uv run workshop/check.py 0` shows red lines. Find the cause and fix it.
Deploy the SRE agent to my Google Cloud project, and tell me how to check that it works.

To start the CLI with a prompt in one command:

agy -i "Prepare my computer for the SRE agent workshop."

Or let the installer start it at the end: sh install.sh --agent (macOS, Linux) or install.ps1 -Agent (Windows).

Deploy to Google Cloud

The deployment scripts (bootstrap.sh, deploy.sh, cleanup.sh) need bash and the gcloud CLI. They do not need uv or Python.

  • macOS and Linux: run them in your terminal. See Deployment.
  • Windows: use Google Cloud Shell. It has bash, git and gcloud, and you are already logged in. WSL and Git Bash also work.

Problems and fixes

Symptom Fix
uv: command not found just after the installation Open a new terminal.
uv sync fails with an SSL or certificate error (company proxy) Set UV_NATIVE_TLS=1 and run the installer again.
The download is slow or stops Run the installer again. uv keeps what it downloaded.
import ...: failed in the setup check Run uv sync --all-packages in the repository directory.
port 8080: in use Stop the other program, or use uv run workshop/chat.py --port 8090.
git: no workshop steps Run git fetch origin --tags.
would clobber existing tag (the installer stops at "Preparing the workshop") The workshop steps changed after you installed. Run git fetch origin --tags --force, then run the installer again.
The workshop needs git Install git: xcode-select --install (macOS), winget install --id Git.Git -e (Windows) or your package manager (Linux). Then open a new terminal.
Windows on arm64 (for example Snapdragon laptops): Failed to build grpcio Use x64 Python. Windows runs it with emulation: uv sync --all-packages --python cpython-3.13-windows-x86_64-none. The installer does this for you.
Windows: running scripts is disabled on this system Use the powershell -ExecutionPolicy ByPass ... command above.