# Getting Started

Go from zero to your first AI-generated PR in under 5 minutes.

## Prerequisites

## 1. Install

$ curl -fsSL https://agentsitter.dev/install.sh | sh

Downloads the latest binary for your platform and adds it to your PATH.

## 2. Start the server

$ sitter serve
Server listening on :51773
Dashboard: http://localhost:51773

The server manages work items, spawns agents, and serves the dashboard. Run it in the background or install as a systemd service:

$ sudo sitter install --port 51773
✓ Installed sitter.service
✓ Started sitter

## 3. Create a work item

$ sitter create --title "Add health check endpoint" \
--context @spec.md
Created work item: add-health-check-endpoint
Status: defined

The --context flag accepts inline text, @filename to read from a file, or - for stdin. The more detail you give, the better the result.

## 4. Start an agent

$ sitter start add-health-check-endpoint
Started agent for: Add health check endpoint
PID: 48291
Log: ~/.agentsitter/logs/add-health-check-endpoint.log

A Claude Code agent is spawned in an isolated git worktree. It reads the spec, writes code, and commits changes. Follow progress with:

$ sitter logs -f add-health-check-endpoint

## 5. What happens next

  1. The coding agent finishes and commits its changes.
  2. A review agent automatically inspects the diff against the spec.
  3. If the review finds issues, the coding agent is restarted with feedback (configurable, default 5 attempts).
  4. Once approved, the branch is pushed and a PR is created (if GitHub App is configured).
  5. If CI fails, the agent is restarted to fix it. You review the final PR when it's ready.

## GitHub App setup (optional)

Without a GitHub App, agentsitter works in local-only mode — agents code in worktrees and you manually push branches and create PRs. To enable automated PRs:

$ sitter setup github-app
? App ID: <your-app-id>
? Private key path: ~/.agentsitter/github-app.pem
? Installation ID: <your-installation-id>
✓ GitHub App configured

See the GitHub App setup guide for step-by-step instructions on creating your own app, or use the shared app at agentsitter.dev/install.

## Next steps