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

# Quick Start

> Get up and running with klaw in under 5 minutes

## Install klaw

<Tabs>
  <Tab title="curl (Recommended)">
    ```bash theme={null}
    curl -fsSL https://klaw.sh/install.sh | sh
    ```

    Installs to `/usr/local/bin/klaw`.
  </Tab>

  <Tab title="Build from Source">
    ```bash theme={null}
    git clone https://github.com/klawsh/klaw.sh.git
    cd klaw && make build
    sudo mv bin/klaw /usr/local/bin/
    ```

    Requires Go 1.24+.
  </Tab>
</Tabs>

Verify:

```bash theme={null}
klaw version
# klaw v1.0.0 (darwin/arm64)
```

## Configure Your Provider

<Tabs>
  <Tab title="each::labs (Recommended)">
    Access 300+ models through a single API key:

    ```bash theme={null}
    export EACHLABS_API_KEY=your-api-key
    ```

    Get your key at [eachlabs.ai](https://eachlabs.ai)
  </Tab>

  <Tab title="Anthropic">
    Direct Claude access:

    ```bash theme={null}
    export ANTHROPIC_API_KEY=sk-ant-...
    ```
  </Tab>

  <Tab title="OpenRouter">
    Multi-provider gateway:

    ```bash theme={null}
    export OPENROUTER_API_KEY=sk-or-...
    ```
  </Tab>
</Tabs>

## Start Chatting

```bash theme={null}
klaw chat
```

You'll see:

```
klaw v1.0.0 — kubectl for AI Agents
Model: claude-sonnet-4-20250514

> Hello! Help me understand this codebase.

I'll explore the codebase for you...

[tool: glob] Finding files...
├── cmd/
├── internal/
├── go.mod
└── README.md

This is a Go project. Let me read the main files...
```

## Create Your First Agent

### 1. Create a namespace

```bash theme={null}
klaw create namespace sales
```

### 2. Create an agent

```bash theme={null}
klaw create agent lead-scorer \
  --namespace sales \
  --model claude-sonnet-4-20250514 \
  --skills crm,web-search
```

### 3. Check your agents

```bash theme={null}
$ klaw get agents

NAME          NAMESPACE   STATUS   MODEL              LAST RUN
lead-scorer   sales       idle     claude-sonnet-4    never
```

### 4. Run the agent

```bash theme={null}
klaw dispatch "Analyze the lead john@acme.com and score their fit" \
  --agent lead-scorer
```

### 5. View logs

```bash theme={null}
klaw logs lead-scorer --follow
```

## Schedule Recurring Tasks

```bash theme={null}
# Run every hour
klaw cron create score-leads \
  --schedule "0 * * * *" \
  --agent lead-scorer \
  --task "Check HubSpot for new leads, score them 1-100, update Lead Score field"

# View scheduled jobs
klaw cron list

# Disable when needed
klaw cron disable score-leads
```

## Add Slack Control

### 1. Set up Slack tokens

```bash theme={null}
export SLACK_BOT_TOKEN=xoxb-...
export SLACK_APP_TOKEN=xapp-...
```

### 2. Start the platform

```bash theme={null}
klaw start
```

### 3. Control from Slack

```
@klaw status                    # List all agents
@klaw run lead-scorer           # Trigger agent
@klaw logs lead-scorer          # View logs
@klaw "score john@bigco.com"    # Quick task
```

## What's Next?

<CardGroup cols={2}>
  <Card title="Agents" icon="robot" href="/docs/concepts/agents">
    Learn how agents work
  </Card>

  <Card title="Namespaces" icon="shield" href="/docs/concepts/namespaces">
    Isolate agents by team
  </Card>

  <Card title="Slack Integration" icon="slack" href="/docs/guides/slack-integration">
    Full Slack setup guide
  </Card>

  <Card title="Distributed Mode" icon="server" href="/docs/guides/distributed-deployment">
    Scale across multiple nodes
  </Card>
</CardGroup>

## Example Use Cases

<AccordionGroup>
  <Accordion icon="chart-line" title="Lead Scoring">
    ```bash theme={null}
    klaw create agent lead-scorer --namespace sales --skills crm,web-search
    klaw cron create hourly-scoring --schedule "0 * * * *" --agent lead-scorer \
      --task "Score new HubSpot leads 1-100 based on company size and fit"
    ```
  </Accordion>

  <Accordion icon="eye" title="Competitor Monitoring">
    ```bash theme={null}
    klaw create agent competitor-watch --namespace research --skills web-fetch,slack
    klaw cron create daily-check --schedule "0 9 * * *" --agent competitor-watch \
      --task "Check competitor.com/pricing for changes, post diff to #competitive-intel"
    ```
  </Accordion>

  <Accordion icon="headset" title="Support Automation">
    ```bash theme={null}
    klaw create agent ticket-handler --namespace support --skills zendesk,slack
    # Agent responds to @klaw mentions in Slack support channels
    ```
  </Accordion>

  <Accordion icon="file-chart-line" title="Automated Reports">
    ```bash theme={null}
    klaw create agent reporter --namespace analytics --skills sql,charts,slack
    klaw cron create weekly-report --schedule "0 8 * * MON" --agent reporter \
      --task "Query last week's metrics, generate charts, post to #team-updates"
    ```
  </Accordion>
</AccordionGroup>
