> ## Documentation Index
> Fetch the complete documentation index at: https://developers.reflection.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Run a local lab engagement and inspect the evidence ledger

Run Laser against a deliberately vulnerable local target. Use a disposable Linux development environment: **the target runs in Docker; the agent runs on your host**. For a containerized agent, use [Docker setup](https://developers.reflection.ai/laser-developer-guide.md#docker-setup).

## Prerequisites

* Git and access to the [Laser repository](https://github.com/reflectionai/laser).
* [Mirror](https://developers.reflection.ai/mirror-overview.md) installed and on `PATH`.
* A Reflection API key with Beam access.
* Bash, Python 3, cURL, `readlink -f`, tmux, and a running Docker daemon. GNU coreutils (`timeout` or `gtimeout`) enables host command timeouts.

> [!WARNING]
>
> Keep the vulnerable target bound to loopback. Laser’s HTTP scope checks do not restrict arbitrary shell commands; use an isolated lab with independent network restrictions.

**1. Install the launcher**

Clone Laser and configure your current shell. Create an API key in the [Reflection platform](https://platform.reflection.ai/api-keys).

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
git clone https://github.com/reflectionai/laser.git
cd laser
export PATH="$PWD/bin:$PATH"
export REFLECTION_API_KEY="<your API key>"
laser --help
```

Add the clone’s absolute `bin` path to your shell configuration to keep it available. The launcher installs the extension into each workspace automatically.

**2. For the demo, start a local vulnhub target**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
docker run -d --name laser-demo \
  -p 127.0.0.1:8101:80 \
  vulhub/thinkphp:5.0.23 \
  sh -c "echo 'flag{demo}' > /flag.txt && exec apache2-foreground"

curl --max-time 10 -I http://127.0.0.1:8101/
```

Wait for a response before continuing. If startup fails, check `docker logs laser-demo`.

**3. Launch Laser**

Choose one launch method:

> [tab] Web UI
>
> From the checkout, in the shell configured above, start the server:
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> python3 webui/laser_webui.py --root "$HOME/engagements" \
>   --launch-root "$HOME/engagements" --port 8875
> ```
>
> Open `http://127.0.0.1:8875` and click **New engagement**. Keep **Run on** set to **Host** and enter:
>
> | Field | Value |
> | - | - |
> | Name | `laser-demo` (must be unused) |
> | Mode | CTF |
> | Targets | `http://127.0.0.1:8101/` |
> | Objective | `flag` |
> | Task | Capture the flag from the authorized local target. |
>
> Click **Launch engagement**. Web launches allow unattended tool execution.

> [tab] CLI
>
> Use a fresh workspace and a dedicated tmux session:
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> laser "$HOME/engagements/laser-demo" \
>   --target http://127.0.0.1:8101/ \
>   --mode ctf --objective flag \
>   --approval auto --session laser-demo \
>   --task "Capture the flag from the authorized local target."
> ```
>
> `--approval auto` allows unattended tool execution. Run `laser` without arguments for guided setup; omit `--task` for an interactive session.
>
> To watch the terminal:
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> tmux attach -t laser-demo
> ```
>
> Press **Ctrl+B**, then **D**, to detach without stopping the run.
>
> For status without attaching:
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> laser-status "$HOME/engagements/laser-demo" --watch 10
> ```
>
> Press **Ctrl+C** to exit the status watcher; the engagement keeps running.

Both methods lock scope and start Mirror in tmux.

**4. Inspect progress and results**

Select `laser-demo` in the web UI. For a CLI-launched run, start the server using the **Web UI** tab above, then select the existing engagement.

Overview summarizes progress; Live shows the terminal and accepts follow-up input. Inspect saved support in Evidence, Findings, and Attack graph. Keep the listener bound to loopback.

Evidence and reports remain in the workspace’s `.laser/` directory. Review them before accepting the outcome: a stop or report file does not prove success, and an agent’s `verified` finding is not independent reproduction.

**5. Finish the lab**

In Live, choose **Stop engagement** to terminate verified main and worker sessions. Check for a partial stop, then remove the target:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
docker rm -f laser-demo
```

Detached host processes remain outside these controls. The lab means the disposable host or VM running Laser and Docker, not just the target container. Copy out the engagement workspace before shutting down or deleting that environment. See [Stop a run](https://developers.reflection.ai/laser-developer-guide.md#stop-a-run) for manual shutdown.

## Next steps

See the [developer guide](https://developers.reflection.ai/laser-developer-guide.md) for model selection, worker limits, Docker, and troubleshooting.
