Exa CLI
Command-line interface for Exa web search
Exa Web Search CLI
Use Exa semantic web search from the command line.
Prerequisites
# Install the package
npm install @exalabs/ai-sdk
# Set your API key
export EXA_API_KEY=your-exa-api-keyCommands
List Tools
# List all available tools including Exa
praisonai-ts tools list
# Filter by search tag
praisonai-ts tools list --tag searchTool Information
# Get detailed info about Exa tool
praisonai-ts tools info exa
# JSON output
praisonai-ts tools info exa --jsonHealth Check
# 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_KEYTest Tool
# Dry run (no API call)
praisonai-ts tools test exa
# Live test with actual API call
praisonai-ts tools test exa --liveRun Search Agent
# 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
praisonai-ts agent run \
--tools exa \
--prompt "What are the latest breakthroughs in quantum computing?"Company Research
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
praisonai-ts agent run \
--tools "exa:category=news,type=fast" \
--prompt "Latest news about OpenAI"Academic Research
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
# 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
# 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
# Check if API key is set
praisonai-ts tools doctor
# Set the API key
export EXA_API_KEY=your-key-herePackage Not Installed
# Install the Exa package
npm install @exalabs/ai-sdk
# Verify installation
praisonai-ts tools doctorRate 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 toolspraisonai-ts tools doctor– Check tool healthpraisonai-ts agent run– Run agent with tools