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

# AI Brief Generator

> Generate daily/weekly AI news briefs and newsletters

# AI Brief Generator

Generate professional news briefs in daily, weekly, or executive formats.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart LR
    A[Ranked Articles] --> B[AI Brief Generator]
    B --> C[Format & Summarize]
    C --> D[News Brief]
    
    style A fill:#e1f5fe
    style D fill:#c8e6c9
```

## CLI Quickstart

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run ai-brief-generator \
  --input '{"articles": [...], "format": "daily"}' \
  --json
```

## Use in Your App (SDK)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import sys
sys.path.insert(0, 'agent_recipes/templates/ai-brief-generator')
from tools import generate_brief, extract_highlights, format_newsletter

# Generate daily brief
brief = generate_brief(articles, format="daily", max_articles=5)

# Extract highlights
highlights = extract_highlights(articles, num_highlights=3)

# Format as newsletter
newsletter = format_newsletter(brief, highlights, title="AI Daily")
```

## Input Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "type": "object",
  "properties": {
    "articles": {"type": "array"},
    "format": {
      "type": "string",
      "enum": ["daily", "weekly", "executive"]
    },
    "max_articles": {"type": "integer", "default": 5}
  }
}
```

## Output Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "brief": "# Daily AI News Brief...",
  "highlights": ["Highlight 1", "Highlight 2"],
  "format": "daily",
  "article_count": 5
}
```

## Brief Formats

| Format    | Description                  |
| --------- | ---------------------------- |
| daily     | Concise daily summary        |
| weekly    | Comprehensive weekly roundup |
| executive | High-level executive summary |

## Environment Variables

| Variable         | Required | Description            |
| ---------------- | -------- | ---------------------- |
| OPENAI\_API\_KEY | Yes      | For content generation |

## Related Tools

* [AI News Crawler](/docs/examples/agent-recipes/creator-suite/ai-news-crawler)
* [AI Script Writer](/docs/examples/agent-recipes/creator-suite/ai-script-writer)
