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

# Exa CLI

> Command-line interface for Exa web search

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[Input] --> A[Agent]
    A --> O[Output]

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

    class A agent
    class U,O tool
```

# Exa Web Search CLI

Use Exa semantic web search from the command line.

## Prerequisites

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install the package
npm install @exalabs/ai-sdk

# Set your API key
export EXA_API_KEY=your-exa-api-key
```

## Commands

### List Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all available tools including Exa
praisonai-ts tools list

# Filter by search tag
praisonai-ts tools list --tag search
```

### Tool Information

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Get detailed info about Exa tool
praisonai-ts tools info exa

# JSON output
praisonai-ts tools info exa --json
```

### Health Check

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Check if Exa is properly configured
praisonai-ts tools doctor

# Output shows:
# ✓ exa (Exa) - Package installed, env vars set
# ✗ exa (Exa) - Missing env vars: EXA_API_KEY
```

### Test Tool

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Dry run (no API call)
praisonai-ts tools test exa

# Live test with actual API call
praisonai-ts tools test exa --live
```

### Run Search Agent

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Basic search
praisonai-ts agent run \
  --instructions "Search the web for information" \
  --tools exa \
  --prompt "Find the latest AI developments"

# With configuration
praisonai-ts agent run \
  --instructions "Research companies" \
  --tools "exa:numResults=5,type=auto,category=company" \
  --prompt "Find AI startups in Europe"
```

## Tool Options

| Option           | Type      | Default | Description                           |
| ---------------- | --------- | ------- | ------------------------------------- |
| `type`           | string    | `auto`  | Search type: auto, neural, fast, deep |
| `numResults`     | number    | `10`    | Number of results to return           |
| `category`       | string    | -       | Filter by category                    |
| `includeDomains` | string\[] | -       | Domains to include                    |
| `excludeDomains` | string\[] | -       | Domains to exclude                    |

## Examples

### Basic Search

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools exa \
  --prompt "What are the latest breakthroughs in quantum computing?"
```

### Company Research

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --instructions "You are a business analyst" \
  --tools "exa:category=company,numResults=10" \
  --prompt "Find fintech companies with recent Series A funding"
```

### News Search

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools "exa:category=news,type=fast" \
  --prompt "Latest news about OpenAI"
```

### Academic Research

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --instructions "You are a research assistant" \
  --tools "exa:category=research paper,numResults=5" \
  --prompt "Find recent papers on transformer architectures"
```

## JSON Output

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Get results as JSON
praisonai-ts agent run \
  --tools exa \
  --prompt "AI news" \
  --json

# Output:
{
  "success": true,
  "data": {
    "text": "Based on my search...",
    "toolCalls": [...],
    "usage": {...}
  }
}
```

## Combining with Other Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Use multiple search tools
praisonai-ts agent run \
  --tools "exa,tavily" \
  --prompt "Compare information about GPT-5 from multiple sources"

# Search and extract
praisonai-ts agent run \
  --tools "exa,firecrawl:scrape" \
  --prompt "Find and extract content from AI research blogs"
```

## Environment Variables

| Variable         | Required | Description                  |
| ---------------- | -------- | ---------------------------- |
| `EXA_API_KEY`    | Yes      | Your Exa API key             |
| `OPENAI_API_KEY` | Yes      | OpenAI API key for the agent |

## Troubleshooting

### Missing API Key

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Check if API key is set
praisonai-ts tools doctor

# Set the API key
export EXA_API_KEY=your-key-here
```

### Package Not Installed

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install the Exa package
npm install @exalabs/ai-sdk

# Verify installation
praisonai-ts tools doctor
```

### Rate Limiting

If you encounter rate limits:

* Reduce `numResults`
* Add delays between requests
* Check your Exa plan limits

## Related Commands

* `praisonai-ts tools list` - List all tools
* `praisonai-ts tools doctor` - Check tool health
* `praisonai-ts agent run` - Run agent with tools
