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

# Generate AI Site

> Internal service that generates all static files

# Internal Service: generate\_ai\_site

Generates all static files for the AI-optimized website.

## Function Signature

```python theme={null}
async def generate_ai_site(
    url: str,
    organize_result: dict,
    scraped_pages: List[dict] = None
) -> dict
```

## Parameters

| Parameter         | Type | Description                         |
| ----------------- | ---- | ----------------------------------- |
| `url`             | str  | Source website URL                  |
| `organize_result` | dict | Result from organize\_with\_llm     |
| `scraped_pages`   | list | Original scraped pages for replicas |

## Generated Files

| File          | Description               |
| ------------- | ------------------------- |
| `index.html`  | Main landing page         |
| `llms.txt`    | LLM-readable content file |
| `sitemap.xml` | XML sitemap               |
| `robots.txt`  | Robots directives         |
| `data.json`   | Structured data           |
| `/what-is-*`  | Q\&A pages                |
| `/pages/*`    | Markdown replica pages    |

## Returns

```python theme={null}
{
    "status": "success",
    "files": [...],
    "qa_slugs": ["what-is-example", ...],
    "replica_paths": ["/pages/about", ...]
}
```

## Code Location

```
src/app/shared/ai_website/service.py
```
