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

# Quickstart

> Install Fleet Prime Agent, sign in a model provider, and run your first agent turn.

Run your first Fleet Prime Agent turn in under five minutes. This page uses the CLI. For the web UI or TUI, see [Interfaces](/fleet-prime-agent/interfaces/cli) after you finish here.

## Prerequisites

* Node.js 22.8.0 or newer
* npm 11.10 or newer
* pnpm 11 or newer (only needed for the web app)
* Python 3.10 or newer (for the IPython kernel used by every session)
* An API key or OAuth account for at least one provider (see [Providers and models](/fleet-prime-agent/guides/providers-and-models))

## 1. Install

Clone the repo and install the agent workspace.

```bash theme={null}
git clone https://github.com/Qredence/fleet-prime-agent.git
cd fleet-prime-agent
npm ci
```

The `.npmrc` in the repo pins a 7-day `min-release-age` on dependencies. The first `npm ci` may take a minute longer than usual because of that.

For the full install matrix — web app, kernel Python, IDE integration — see [Install](/fleet-prime-agent/install).

## 2. Sign in a provider

Start the agent CLI once and use the `/login` slash command to add credentials for a provider.

```bash theme={null}
./prime-agent.sh
```

At the prompt:

```
/login
```

Pick a provider from the list and paste an API key, or complete the OAuth flow if the provider supports it. Credentials are stored in `~/.prime/agent/auth.json` with mode `0600`.

You can also pass a key inline for a single run without persisting it:

```bash theme={null}
./prime-agent.sh --provider openai --model gpt-4o --api-key "$OPENAI_API_KEY"
```

For the full flag list see the [CLI reference](/fleet-prime-agent/interfaces/cli).

## 3. Run your first turn

Ask the agent to do something that exercises the IPython kernel:

```
Summarize the top-level directories in this repo, then count the *.ts files under packages/ai.
```

You will see:

1. A **thinking** card while the model plans.
2. An **IPython** tool card that lists directories and runs a `Path` glob to count files.
3. A **shell** tool card if the model reaches for `find` instead.
4. A final assistant message with the result.

Every card is a `ChatStreamEvent` — see [Streaming protocol](/fleet-prime-agent/concepts/streaming-protocol) for the wire format.

## 4. Try a subagent

Inside an IPython cell the model can call `rlm(...)` to spawn a child agent. Ask:

```
Use rlm to spawn three subagents in parallel that each read one of the top three READMEs and return a one-line summary. Aggregate their answers into a single bullet list.
```

The parent turn keeps streaming while the children run. Each subagent shows up as its own tool card with its own transcript. See [Subagents (RLM)](/fleet-prime-agent/concepts/rlm-subagents) for how the runtime schedules them.

## 5. Save what worked with `/refine`

If the run went well, refine the agent's supplemental state so it does better next time:

```
/refine
```

`/refine` reads the trajectory, extracts evidence, and updates supplemental harness state. It never rewrites the immutable base prompt, and it takes a snapshot so you can roll back. See [Refinement](/fleet-prime-agent/concepts/refinement).

## Next steps

<CardGroup cols={2}>
  <Card title="Learn the concepts" icon="book" href="/fleet-prime-agent/concepts/architecture">
    Architecture, sessions, subagents, streaming events, refinement.
  </Card>

  <Card title="Try more features" icon="sparkles" href="/fleet-prime-agent/guides/streaming-chat">
    Guides for tool cards, providers, session branching, slash commands, MCP, OAuth.
  </Card>

  <Card title="Pick your interface" icon="window" href="/fleet-prime-agent/interfaces/cli">
    CLI, TUI, daemon, or the Qredence web app.
  </Card>

  <Card title="Configure and secure" icon="shield" href="/fleet-prime-agent/reference/configuration">
    Config paths, environment variables, security model.
  </Card>
</CardGroup>
