> ## 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 CLI

> CLI commands for automatic agent generation in PraisonAI TypeScript

The `praisonai-ts` CLI provides the `auto` command for automatic agent generation.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Auto[AutoAgents]
    Auto --> Out([Team Plan])

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Auto agent
    class CLI,User,Out tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff
```

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts auto "Build a web scraper"
    ```
  </Step>

  <Step title="With Configuration">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts auto "Create a data pipeline" --pattern sequential --agents 3 --json
    ```
  </Step>
</Steps>

***

## Generate Agents

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Generate agents from a topic
praisonai-ts auto "Build a web scraper"

# Generate with specific pattern
praisonai-ts auto "Create a data pipeline" --pattern sequential

# Specify number of agents
praisonai-ts auto "Process documents" --agents 3

# Get JSON output
praisonai-ts auto "Build an API" --json
```

**Example Output:**

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "success": true,
  "data": {
    "agents": [
      { "name": "Researcher", "role": "Research specialist" },
      { "name": "Developer", "role": "Code developer" }
    ],
    "tasks": [...],
    "pattern": "sequential"
  }
}
```

## Available Patterns

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

## SDK Usage

For programmatic agent generation:

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

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

const result = await auto.generate('Build a web scraper');
console.log('Agents:', result.agents.length);
console.log('Pattern:', result.pattern);
```

For more details, see the [AutoAgents SDK documentation](/docs/js/auto-agents).

***

## Related

<CardGroup cols={2}>
  <Card title="AutoAgents" icon="sparkles" href="/docs/js/auto-agents">
    SDK documentation
  </Card>

  <Card title="AgentTeam" icon="users" href="/docs/js/agent-team">
    Orchestrate generated agents
  </Card>
</CardGroup>
