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

# Init

> Initialize agents.yaml with intelligent tool discovery

The `--init` flag initializes a new agents.yaml configuration file with **intelligent tool discovery** - automatically assigning the most appropriate tools based on your task description.

## Quick Start

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai --init "Research stock prices and create a financial report"
```

## Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai --init [topic] [options]
```

## Options

| Option        | Description                                   |
| ------------- | --------------------------------------------- |
| `--init`      | Initialize agents with optional topic         |
| `--framework` | Framework to use (crewai, autogen, praisonai) |
| `--merge`     | Merge with existing agents.yaml               |

## Intelligent Tool Discovery

The init command analyzes your task and automatically assigns tools from 9 categories:

| Category            | Example Tools                      | Keywords                  |
| ------------------- | ---------------------------------- | ------------------------- |
| **Web Search**      | `internet_search`, `tavily_search` | search, find, look up     |
| **Web Scraping**    | `scrape_page`, `crawl`             | scrape, crawl, extract    |
| **File Operations** | `read_file`, `write_file`          | read, save, load          |
| **Code Execution**  | `execute_command`                  | execute, run, script      |
| **Data Processing** | `read_csv`, `write_csv`            | csv, excel, json          |
| **Research**        | `search_arxiv`, `wiki_search`      | research, paper, academic |
| **Finance**         | `get_stock_price`                  | stock, price, financial   |
| **Math**            | `evaluate`, `solve_equation`       | calculate, math           |
| **Database**        | `query`, `find_documents`          | database, sql, mongodb    |

## Examples

### Financial Research

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai --init "Research stock prices and create a financial report"
```

**Generated agents.yaml:**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
framework: praisonai
topic: Research stock prices and create a financial report
roles:
  financial_researcher:
    role: Financial Analyst
    goal: Research stock prices and compile a detailed financial report
    tools:
    - internet_search
    - get_stock_price
    - get_stock_info
    - get_historical_data
    - write_file
```

### Web Scraping Pipeline

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai --init "Scrape websites for product data and save to CSV"
```

**Generated agents.yaml:**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
roles:
  data_scraper:
    role: Web Scraping Specialist
    tools: [scrape_page, extract_links, crawl, extract_text]
  data_processor:
    role: Data Processing Specialist
    tools: [write_csv, read_csv, analyze_csv]
```

### With Framework

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai --init "Data Pipeline" --framework praisonai
```

## How It Works

1. **Task Analysis**: Analyzes complexity (simple → 1 agent, complex → 3-4 agents)
2. **Keyword Matching**: Identifies relevant tool categories
3. **Tool Assignment**: Assigns appropriate tools from 50+ available
4. **YAML Generation**: Creates ready-to-use agents.yaml

## Next Steps

After initialization:

1. Review the generated `agents.yaml`
2. Customize agents if needed
3. Run with `praisonai agents.yaml`
