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

# Using Starter Kit Agents

> Don't reinvent the wheel. Conductor includes production-ready, tested agents for common tasks.

## Available Agents

### Starter Kit Utility Agents

These agents ship with your project—you own the source and can customize them.

<CardGroup cols={2}>
  <Card title="scrape" icon="spider-web" href="/conductor/starter-kit/scrape">
    Web scraping with fallbacks
  </Card>

  <Card title="validate" icon="check-circle" href="/conductor/starter-kit/validate">
    Data validation against schemas
  </Card>

  <Card title="fetch" icon="download" href="/conductor/starter-kit/fetch">
    Smart HTTP fetching with caching
  </Card>

  <Card title="slug" icon="link" href="/conductor/starter-kit/slug">
    URL-safe slug generation
  </Card>

  <Card title="tools" icon="wrench" href="/conductor/starter-kit/tools">
    MCP tools integration
  </Card>

  <Card title="queries" icon="database" href="/conductor/starter-kit/queries">
    SQL query execution
  </Card>

  <Card title="autorag" icon="robot" href="/conductor/starter-kit/autorag">
    Cloudflare AutoRAG (managed)
  </Card>
</CardGroup>

### Built-in Framework Agents

Framework-level agents you configure but don't modify.

<CardGroup cols={2}>
  <Card title="rag" icon="magnifying-glass" href="/conductor/starter-kit/built-in/rag">
    Manual RAG with Vectorize
  </Card>

  <Card title="hitl" icon="user" href="/conductor/starter-kit/built-in/hitl">
    Human-in-the-loop approvals
  </Card>
</CardGroup>

## Quick Usage

### Scrape Agent

```yaml theme={null}
ensemble: scrape-and-analyze

agents:
  - name: scrape
    agent: scrape
    inputs:
      url: ${input.url}
      extract:
        title: h1
        price: .price
        description: .description

  - name: analyze
    operation: think
    config:
      provider: openai
      model: gpt-4o-mini
      prompt: Analyze this product: ${scrape.output}

output:
  product: ${scrape.output}
  analysis: ${analyze.output}
```

### Validate Agent

```yaml theme={null}
ensemble: validate-and-store

agents:
  - name: validate
    agent: validate
    inputs:
      data: ${input.user_data}
      schema:
        type: object
        required: [email, name]
        properties:
          email:
            type: string
            format: email
          name:
            type: string
            minLength: 1

  - name: store
    condition: ${validate.output.valid}
    operation: data
    config:
      backend: d1
      binding: DB
      operation: execute
      sql: INSERT INTO users (email, name) VALUES (?, ?)
      params:
        - ${input.user_data.email}
        - ${input.user_data.name}

output:
  valid: ${validate.output.valid}
  errors: ${validate.output.errors}
  stored: ${store.executed}
```

### RAG Agent

```yaml theme={null}
ensemble: rag-qa

agents:
  - name: rag
    agent: rag
    inputs:
      question: ${input.question}
      index_name: docs-index
      top_k: 5

output:
  answer: ${rag.output.answer}
  sources: ${rag.output.sources}
  confidence: ${rag.output.confidence}
```

### HITL Agent

```yaml theme={null}
ensemble: content-approval

agents:
  - name: generate
    operation: think
    config:
      provider: openai
      model: gpt-4o
      prompt: Write content about: ${input.topic}

  - name: approval
    agent: hitl
    inputs:
      prompt: Review this content for publication
      context:
        content: ${generate.output}
        topic: ${input.topic}
      timeout: 3600  # 1 hour timeout

  - name: publish
    condition: ${approval.output.approved}
    operation: data
    config:
      backend: d1
      binding: DB
      operation: execute
      sql: INSERT INTO published (content) VALUES (?)
      params: [${generate.output}]

output:
  content: ${generate.output}
  approved: ${approval.output.approved}
  feedback: ${approval.output.feedback}
```

## Combining Starter Kit Agents

### Scrape + Validate + Transform

```yaml theme={null}
ensemble: scrape-validate-transform

agents:
  - name: scrape
    agent: scrape
    inputs:
      url: ${input.url}

  - name: validate
    agent: validate
    inputs:
      data: ${scrape.output}
      schema: product-schema

  - name: transform
    condition: ${validate.output.valid}
    operation: code
    config:
      script: scripts/transform-product
    input:
      data: ${scrape.output}

output:
  product: ${transform.output}
  valid: ${validate.output.valid}
```

```typescript theme={null}
// scripts/transform-product.ts
import type { AgentExecutionContext } from '@ensemble-edge/conductor'

export default function transformProduct(ctx: AgentExecutionContext) {
  const { data } = ctx.input
  return {
    ...data,
    price: parseFloat(data.price_text?.replace(/[^0-9.]/g, '') || '0'),
    transformed_at: Date.now()
  }
}
```

### RAG + HITL

```yaml theme={null}
ensemble: rag-with-review

agents:
  - name: rag
    agent: rag
    inputs:
      question: ${input.question}
      index_name: docs-index

  - name: review
    agent: hitl
    inputs:
      prompt: Review this AI-generated answer
      context:
        question: ${input.question}
        answer: ${rag.output.answer}
        sources: ${rag.output.sources}
      timeout: 1800

output:
  answer: ${rag.output.answer}
  approved: ${review.output.approved}
  sources: ${rag.output.sources}
```

## Customizing Starter Kit Agents

Starter Kit agents accept configuration:

### Scrape with Retry

```yaml theme={null}
agents:
  - name: scrape
    agent: scrape
    inputs:
      url: ${input.url}
      timeout: 10000
      retry:
        maxAttempts: 3
        backoff: exponential
      headers:
        User-Agent: MyApp/1.0
```

### Validate with Custom Rules

```yaml theme={null}
agents:
  - name: validate
    agent: validate
    inputs:
      data: ${input.data}
      schema:
        type: object
        required: [email]
        properties:
          email:
            type: string
            pattern: ^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$
      strict: true  # Fail on extra properties
```

### RAG with Custom Embeddings

```yaml theme={null}
agents:
  - name: rag
    agent: rag
    inputs:
      question: ${input.question}
      index_name: docs-index
      embedding_model: text-embedding-3-large
      top_k: 10
      score_threshold: 0.7
```

## When to Use Starter Kit vs Custom

### Use Starter Kit When:

* Common use case (scraping, validation, RAG)
* Need production-tested solution
* Want to ship quickly
* Standard functionality is sufficient

### Build Custom When:

* Unique business logic
* Need specific integrations
* Performance critical paths
* Domain-specific requirements

## Extending Starter Kit Agents

Wrap Starter Kit agents for custom behavior:

```yaml theme={null}
# agents/custom-scraper/agent.yaml
agent: custom-scraper
description: Scraper with custom post-processing

inputs:
  url: string

operations:
  # Use Starter Kit scraper
  - name: scrape
    agent: scraper
    inputs:
      url: ${input.url}

  # Custom post-processing
  - name: enhance
    operation: code
    config:
      script: scripts/enhance-scraped-data
    input:
      scrapeData: ${scrape.output}
      url: ${input.url}
```

```typescript theme={null}
// scripts/enhance-scraped-data.ts
import type { AgentExecutionContext } from '@ensemble-edge/conductor'

export default function enhanceScrapedData(context: AgentExecutionContext) {
  const { scrapeData, url } = context.input
  return {
    ...scrapeData,
    scraped_at: Date.now(),
    url,
    processed: true
  }
}
```

```yaml theme={null}
  # Custom validation
  - name: validate
    operation: code
    config:
      script: scripts/validate-scraped-data
    input:
      data: ${enhance.output}
```

```typescript theme={null}
// scripts/validate-scraped-data.ts
import type { AgentExecutionContext } from '@ensemble-edge/conductor'

export default function validateScrapedData(context: AgentExecutionContext) {
  const { data } = context.input
  return {
    valid: data.title && data.title.length > 0,
    data
  }
}
```

```yaml theme={null}
outputs:
  data: ${validate.output.data}
  valid: ${validate.output.valid}
```

## Best Practices

1. **Start with Starter Kit** - Try Starter Kit agents first
2. **Configure Don't Customize** - Use inputs before building custom
3. **Wrap for Extensions** - Create custom agents that wrap Starter Kit agents
4. **Version Independently** - Version custom wrappers separately
5. **Test Thoroughly** - Test custom integrations
6. **Document Usage** - Document how you use Starter Kit agents
7. **Monitor Performance** - Track Starter Kit agent performance
8. **Report Issues** - Report bugs to Conductor team

## Next Steps

<CardGroup cols={2}>
  <Card title="Starter Kit Reference" icon="box" href="/conductor/starter-kit/overview">
    Detailed docs for each agent
  </Card>

  <Card title="Creating Agents" icon="hammer" href="/conductor/building/creating-agents">
    Build custom agents
  </Card>

  <Card title="Writing Ensembles" icon="diagram-project" href="/conductor/building/writing-ensembles">
    Orchestrate agents
  </Card>

  <Card title="Playbooks" icon="books" href="/conductor/playbooks/rag-pipeline">
    Real-world examples
  </Card>
</CardGroup>
