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

# Quick Start

> Get your first agent connected in under 5 minutes.

# Quick Start

Connect your AI agent to a secure, end-to-end encrypted channel with three steps. No code to write, no files to edit.

## Prerequisites

* An AgentVault account at [agentvault.chat](https://agentvault.chat)
* Node.js 18+ on the machine where your agent runs

<Steps>
  <Step title="Create an invite">
    1. Log in at [agentvault.chat](https://app.agentvault.chat)
    2. Go to the **Invites** tab
    3. Enter your agent's name and tap **Generate Invite**
    4. **Copy the token** — it is shown only once and expires in 10 minutes

    <Warning>
      Do not share the invite token publicly. Anyone with the token can enroll a device to your account.
    </Warning>
  </Step>

  <Step title="Connect your agent">
    Open a terminal on the machine where your agent runs and paste this command, replacing `YOUR_TOKEN` with the token you copied:

    ```bash theme={null}
    npx @agentvault/agentvault --token=YOUR_TOKEN --name="My Agent"
    ```

    You will see output like this:

    ```
    ╔══════════════════════════════════════════════╗
    ║         AgentVault Secure Channel            ║
    ╚══════════════════════════════════════════════╝

      Enrolling with server...
      Waiting for owner approval (check your dashboard)...
      Fingerprint: AB12CD34
    ```
  </Step>

  <Step title="Approve the agent">
    1. Go back to [agentvault.chat](https://app.agentvault.chat)
    2. Open the **Agents** tab — you will see a new device marked **Pending**
    3. Verify the fingerprint matches what your terminal shows
    4. Tap **Approve**

    Your terminal will update:

    ```
      Approved! Setting up encryption...
      Secure channel is live! Type a message and press Enter to send.
      Messages are end-to-end encrypted. The server cannot read them.

    >
    ```
  </Step>
</Steps>

## Start Chatting

Once the channel is live, you can exchange messages from either side:

<CardGroup cols={2}>
  <Card title="From the dashboard" icon="browser">
    Tap the agent in the **Agents** tab to open the chat. Type a message and send.
  </Card>

  <Card title="From the terminal" icon="terminal">
    Type a message at the `>` prompt and press Enter. It arrives in the dashboard instantly.
  </Card>
</CardGroup>

All messages are encrypted end-to-end — nobody, including AgentVault, can read them.

## Terminal Commands

| Command       | What it does                        |
| ------------- | ----------------------------------- |
| `/status`     | Show connection and encryption info |
| `/help`       | List available commands             |
| `/quit`       | Disconnect and exit                 |
| Anything else | Sends as a message                  |

## Restarting

Run the same command again. Your agent reconnects automatically — no new invite needed:

```bash theme={null}
npx @agentvault/agentvault --token=YOUR_TOKEN --name="My Agent"
```

<Tip>
  The invite token is only used on first run. After enrollment, your agent's identity is saved in the `agentvault-data` directory. As long as that directory persists, your agent reconnects without re-enrolling.
</Tip>

## Troubleshooting

<Accordion title="Common issues and fixes">
  | Problem                | Fix                                                                   |
  | ---------------------- | --------------------------------------------------------------------- |
  | "Channel is not ready" | Wait for the owner to approve the device in the dashboard             |
  | Error on start         | The token may be expired (10-minute lifetime). Generate a new invite. |
  | Disconnected message   | Network issue — the agent reconnects automatically                    |
  | Need a fresh start     | Delete the `agentvault-data` folder and generate a new invite         |
</Accordion>

## Next Steps

<Card title="Plugin Integration Guide" icon="code" href="/getting-started/onboarding">
  Want to integrate AgentVault directly into your agent's code instead of using the CLI? See the programmatic API guide.
</Card>
