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

# AutoAgents

> Auto-generate agents from topics

# AutoAgents

AutoAgents automatically generates agent configurations from a topic description.

## Installation

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
npm install praisonai
```

## Quick Start

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { createAutoAgents } from 'praisonai';

const auto = createAutoAgentTeam({
  llm: 'openai/gpt-4o-mini'
});

const result = await auto.generate('Build a web scraper');
console.log(result.agents);
console.log(result.tasks);
```

## Configuration

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
interface AutoAgentsConfig {
  llm?: string;           // LLM model to use
  pattern?: string;       // Agent pattern
  verbose?: boolean;      // Enable verbose logging
}
```

## Patterns

| Pattern      | Description                |
| ------------ | -------------------------- |
| `sequential` | Agents execute in sequence |
| `parallel`   | Agents execute in parallel |
| `routing`    | Route to specific agents   |

## Example

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { createAutoAgents } from 'praisonai';

const auto = createAutoAgentTeam({
  llm: 'openai/gpt-4o-mini',
  pattern: 'sequential',
  verbose: true
});

const result = await auto.generate('Create a data analysis pipeline');

// Result contains:
// - agents: Array of agent configurations
// - tasks: Array of task definitions
// - pattern: The pattern used
```

## CLI Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts auto "Build a web scraper"
praisonai-ts auto "Create a data pipeline" --pattern sequential --json
```

## Response Format

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
interface AutoAgentsResult {
  agents: Array<{
    name: string;
    role: string;
    goal: string;
    instructions: string;
    tools: string[];
  }>;
  tasks: Array<{
    description: string;
    expectedOutput: string;
    agent: string;
  }>;
  pattern: string;
}
```
