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

# Quickstart

> Start using Agen in minutes to securely connect your development workflow with AI agents.

## Get started in three steps

Follow these simple steps to set up your first Agen workspace, launch an AI session, and start syncing code manually or via our CLI.

### Step 1: Set up your workspace

<AccordionGroup>
  <Accordion icon="desktop" title="Create an account and workspace">
    1. Navigate to the [Agen Web Portal](https://app.agenhq.com/) (or your hosted instance).
    2. Sign up or log in to your account.
    3. Create a new **Workspace**. This is where you will manage your repositories, sessions, and team members.
  </Accordion>

  <Accordion icon="github" title="Connect your repository">
    1. Inside your new workspace, click on **Repositories**.
    2. Add the Git repository you want the AI to work on.
    3. Ensure you have provided the necessary branching permissions so the AI can safely create branches or open pull requests.
  </Accordion>
</AccordionGroup>

### Step 2: Launch an AI Session

<AccordionGroup>
  <Accordion icon="robot" title="Start a new AI session">
    1. Go to the **Sessions** tab in your workspace.
    2. Click **New Session** and select the repository you just connected.
    3. Choose the task you want the AI to perform (e.g., "Refactor the authentication module" or "Create a new React component").
    4. Select your preferred AI model from the options available in your workspace.
    5. Start the session. Agen will automatically spin up a **secure, isolated sandbox** for the AI to work without affecting your local machine.
  </Accordion>
</AccordionGroup>

### Step 3: Stream and Sync Code

<AccordionGroup>
  <Accordion icon="terminal" title="Install the Agen CLI">
    To watch the AI work in real-time and effortlessly sync file modifications to your local environment, install our CLI:

    ```bash theme={null}
    npm install -g @agenhq/cli
    ```

    *(Note: Ensure you have Node.js installed).*
  </Accordion>

  <Accordion icon="rotate" title="Authenticate and Sync">
    1. Authenticate the CLI with your Agen account:
       ```bash theme={null}
       agen login
       ```
    2. Watch the session and sync the patches in real-time:
       ```bash theme={null}
       agen watch <SESSION_ID>
       ```
    3. As the AI Agent writes and tests code inside the sandbox, you will see the files changing locally in real-time! Review the code, run your own tests, and commit the changes when you are satisfied.
  </Accordion>
</AccordionGroup>

## Next steps

Now that you have your first AI session running, explore more advanced integrations and tools:

<CardGroup cols={2}>
  <Card title="Concept: Secure Sandboxes" icon="shield-check" href="/essentials/sandboxes">
    Learn how Agen securely isolates AI generated code.
  </Card>

  <Card title="Manage Team & Billing" icon="users" href="/essentials/team-billing">
    Learn how to add team members to your workspace and manage usage.
  </Card>

  <Card title="CLI Reference" icon="code" href="/api-reference/cli">
    Deep dive into the Agen CLI commands.
  </Card>
</CardGroup>
