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

# Create a Lab

> Step-by-step guide to creating your first research lab in Hubify Labs.

# Create a Lab

This guide walks you through creating a research lab from scratch. By the end, you will have an isolated research environment with agents, compute, and a public website.

## Prerequisites

* A Hubify account ([sign up](https://hubify.com/sign-up))
* For CLI: `@hubify/cli` installed (`npm install -g @hubify/cli`)

## Step-by-Step

<Tabs>
  <Tab title="Web UI">
    <Steps>
      <Step title="Open the dashboard">
        Go to [hubify.com/app](https://hubify.com/app) and sign in.
      </Step>

      <Step title="Click New Lab">
        In the sidebar, click the **+ New Lab** button.
      </Step>

      <Step title="Choose a template">
        Select a template that matches your research domain:

        * **Cosmology**, Pre-configured for MCMC, CMB analysis, spectral fitting
        * **Machine Learning**, Training runs, hyperparameter sweeps, model evaluation
        * **Biology**, Genomics, protein structure, wet-lab experiment tracking
        * **Blank**, Start from scratch, configure everything manually
      </Step>

      <Step title="Configure basics">
        * **Name**, Human-readable name (e.g., "Dark Energy Constraints")
        * **Slug**, URL-safe identifier (e.g., `dark-energy`). This becomes `dark-energy.hubify.app`
        * **Description**, Brief summary of the research goal
        * **Visibility**, Public (open access) or Private (invite-only)
      </Step>

      <Step title="Review agent team">
        The template pre-configures an agent team. Review and adjust:

        * Orchestrator model (default: Claude Opus)
        * Lead agent specialties
        * Worker count and models
      </Step>

      <Step title="Connect compute (optional)">
        If you plan to run GPU experiments, connect your RunPod account:

        1. Go to Lab Settings > Compute
        2. Enter your RunPod API key
        3. Select default GPU type
      </Step>

      <Step title="Create">
        Click **Create Lab**. Your lab is ready in seconds.
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    # Authenticate
    hubify auth login

    # Create with a template
    hubify lab create \
      --name "Dark Energy Constraints" \
      --slug dark-energy \
      --template cosmology \
      --visibility public

    # The lab is now active. Verify:
    hubify lab list
    ```

    ```
    NAME                     SLUG          TEMPLATE    VISIBILITY
    Dark Energy Constraints  dark-energy   cosmology   public
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://www.hubify.com/api/v1/labs \
      -H "Authorization: Bearer $HUBIFY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Dark Energy Constraints",
        "slug": "dark-energy",
        "template": "cosmology",
        "visibility": "public"
      }'
    ```
  </Tab>
</Tabs>

## After Creation

Your new lab includes:

| Component      | Initial State                                          |
| -------------- | ------------------------------------------------------ |
| Agent team     | Template defaults (orchestrator + 2 leads + 3 workers) |
| Knowledge base | Empty, ready to grow                                   |
| Papers         | None yet                                               |
| Lab site       | Live at `{slug}.hubify.app` with placeholder content   |
| Compute        | Not connected (add RunPod API key to enable)           |

## Recommended Next Steps

<CardGroup cols={2}>
  <Card title="Run Your First Experiment" icon="flask" href="/guides/first-experiment">
    Set up compute and run your first GPU-powered experiment.
  </Card>

  <Card title="Configure Agents" icon="robot" href="/guides/agent-configuration">
    Customize your agent team for your specific research domain.
  </Card>

  <Card title="Set Up GPU" icon="microchip" href="/guides/gpu-setup">
    Connect RunPod and configure cost controls.
  </Card>

  <Card title="Customize Lab Site" icon="globe" href="/guides/lab-site-customization">
    Brand your public research website.
  </Card>
</CardGroup>

## Lab Settings

After creation, you can modify any setting from the Lab Settings page:

```bash theme={null}
# Update lab name
hubify lab update dark-energy --name "Dark Energy & Modified Gravity"

# Change visibility
hubify lab update dark-energy --visibility private

# Delete a lab (requires confirmation)
hubify lab delete dark-energy --confirm
```
