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

# API Keys Catalog

> Complete reference for all API keys and environment variables used by PraisonAI

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="Integrator",
    instructions="Use tools that rely on configured API keys.",
    tools=["web_search"],
)
agent.start("What needs to be set in the environment before this run?")
```

The user wires up provider and tool keys once, then the agent calls integrations without hard-coding secrets.

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

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

    class A agent
    class U,O tool
    class T tool
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Feature as API Keys Catalog

    User->>Agent: Request
    Agent->>Feature: Process request
    Feature-->>Agent: Result
    Agent-->>User: Response
```

# API Keys Catalog

Complete reference for all environment variables required by PraisonAI tools and integrations.

## Quick Start

<Steps>
  <Step title="Set environment variables">
    Add your API keys to your shell profile:

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    export OPENAI_API_KEY=sk-...
    export TAVILY_API_KEY=tvly-...
    ```
  </Step>

  <Step title="Test connectivity">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai persistence doctor --conversation-url "sqlite:///test.db"
    ```
  </Step>
</Steps>

## LLM Providers

| Provider  | Environment Variable | Test Command                                                                       |
| --------- | -------------------- | ---------------------------------------------------------------------------------- |
| OpenAI    | `OPENAI_API_KEY`     | `python3 -c "from openai import OpenAI; print(OpenAI().models.list().data[0].id)"` |
| Anthropic | `ANTHROPIC_API_KEY`  | `python3 -c "import anthropic; print('OK')"`                                       |
| Google    | `GOOGLE_API_KEY`     | `python3 -c "import google.generativeai as genai; print('OK')"`                    |
| Groq      | `GROQ_API_KEY`       | `python3 -c "from groq import Groq; print('OK')"`                                  |
| Mistral   | `MISTRAL_API_KEY`    | `python3 -c "from mistralai import Mistral; print('OK')"`                          |
| Cohere    | `COHERE_API_KEY`     | `python3 -c "import cohere; print('OK')"`                                          |
| DeepSeek  | `DEEPSEEK_API_KEY`   | `python3 -c "from openai import OpenAI; print('OK')"`                              |

## Vector Databases

| Provider | Environment Variables              | Test Command                                                                                                                                                                                     |
| -------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Pinecone | `PINECONE_API_KEY`                 | `python3 -c "from pinecone import Pinecone; pc=Pinecone(); print([i.name for i in pc.list_indexes()])"`                                                                                          |
| Weaviate | `WEAVIATE_URL`, `WEAVIATE_API_KEY` | `python3 -c "import weaviate; from weaviate.classes.init import Auth; c=weaviate.connect_to_weaviate_cloud('$WEAVIATE_URL', Auth.api_key('$WEAVIATE_API_KEY')); print(c.is_ready()); c.close()"` |
| Qdrant   | `QDRANT_URL`, `QDRANT_API_KEY`     | `python3 -c "from qdrant_client import QdrantClient; print(QdrantClient('http://localhost:6333').get_collections())"`                                                                            |
| ChromaDB | (none - local)                     | `python3 -c "import chromadb; print('OK')"`                                                                                                                                                      |
| LanceDB  | (none - local)                     | `python3 -c "import lancedb; print(lancedb.__version__)"`                                                                                                                                        |
| PGVector | `PGVECTOR_URL`                     | `python3 -c "import psycopg2; c=psycopg2.connect('$PGVECTOR_URL'); print('OK')"`                                                                                                                 |

## Conversation Databases

| Provider   | Environment Variables          | Test Command                                                                          |
| ---------- | ------------------------------ | ------------------------------------------------------------------------------------- |
| PostgreSQL | `POSTGRES_URL`                 | `python3 -c "import psycopg2; c=psycopg2.connect('$POSTGRES_URL'); print('OK')"`      |
| MySQL      | `MYSQL_URL`                    | `python3 -c "import mysql.connector; print('OK')"`                                    |
| SQLite     | (none - local)                 | `python3 -c "import sqlite3; print('OK')"`                                            |
| Supabase   | `SUPABASE_URL`, `SUPABASE_KEY` | `python3 -c "from supabase import create_client; print('OK')"`                        |
| Neon       | `NEON_DATABASE_URL`            | `python3 -c "import psycopg2; c=psycopg2.connect('$NEON_DATABASE_URL'); print('OK')"` |

## State Stores

| Provider  | Environment Variables                                | Test Command                                                                                             |
| --------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Redis     | `REDIS_URL`                                          | `python3 -c "import redis; r=redis.from_url('$REDIS_URL'); print(r.ping())"`                             |
| MongoDB   | `MONGODB_URI`                                        | `python3 -c "from pymongo import MongoClient; print(MongoClient('$MONGODB_URI').list_database_names())"` |
| DynamoDB  | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`         | `python3 -c "import boto3; print(boto3.client('dynamodb').list_tables())"`                               |
| Firestore | `GOOGLE_APPLICATION_CREDENTIALS`                     | `python3 -c "from google.cloud import firestore; print('OK')"`                                           |
| Upstash   | `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN` | `python3 -c "from upstash_redis import Redis; print('OK')"`                                              |

## Search & Tools

| Provider  | Environment Variables | Test Command                                                   |
| --------- | --------------------- | -------------------------------------------------------------- |
| Tavily    | `TAVILY_API_KEY`      | `python3 -c "from tavily import TavilyClient; print('OK')"`    |
| Serper    | `SERPER_API_KEY`      | `python3 -c "import requests; print('OK')"`                    |
| Firecrawl | `FIRECRAWL_API_KEY`   | `python3 -c "from firecrawl import FirecrawlApp; print('OK')"` |

## Observability

| Provider      | Environment Variables                                         | Test Command                                              |
| ------------- | ------------------------------------------------------------- | --------------------------------------------------------- |
| Langfuse      | `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_HOST` | `python3 -c "from langfuse import Langfuse; print('OK')"` |
| LangSmith     | `LANGCHAIN_API_KEY`, `LANGCHAIN_TRACING_V2`                   | `python3 -c "from langsmith import Client; print('OK')"`  |
| AgentOps      | `AGENTOPS_API_KEY`                                            | `python3 -c "import agentops; print('OK')"`               |
| Arize Phoenix | `PHOENIX_API_KEY`                                             | `python3 -c "import phoenix; print('OK')"`                |
| MLflow        | `MLFLOW_TRACKING_URI`                                         | `python3 -c "import mlflow; print(mlflow.__version__)"`   |

## CLI Doctor Commands

Test connectivity for any provider:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Conversation stores
praisonai persistence doctor --conversation-url "postgresql://user:pass@host:5432/db"
praisonai persistence doctor --conversation-url "/path/to/sqlite.db"

# Knowledge/Vector stores
praisonai persistence doctor --knowledge-url "http://localhost:6333"  # Qdrant
praisonai persistence doctor --knowledge-url "pinecone://your-index"

# State stores
praisonai persistence doctor --state-url "redis://localhost:6379"
praisonai persistence doctor --state-url "mongodb://localhost:27017"
```

## Setting Environment Variables

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Add to ~/.bashrc or ~/.zshrc
export OPENAI_API_KEY=sk-...
export PINECONE_API_KEY=pcsk_...
export WEAVIATE_URL=https://your-cluster.weaviate.cloud
export WEAVIATE_API_KEY=...
export TAVILY_API_KEY=tvly-...
```

## Best Practices

<AccordionGroup>
  <Accordion title="Store keys in environment variables">
    Never hardcode API keys. Use environment variables or a `.env` file loaded at startup.
  </Accordion>

  <Accordion title="Test connectivity before deploying">
    Use `praisonai persistence doctor` commands to verify each provider connection before production.
  </Accordion>

  <Accordion title="Use the minimum required keys">
    Only set API keys for providers you use - this reduces your attack surface.
  </Accordion>

  <Accordion title="Rotate keys regularly">
    Treat API keys like passwords - rotate them periodically and revoke unused keys immediately.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Custom Tools" icon="wrench" href="/docs/tools/custom">
    Build your own agent tools
  </Card>

  <Card title="Tools Overview" icon="toolbox" href="/docs/tools/tools">
    Browse PraisonAI tool documentation
  </Card>
</CardGroup>
