API Keys Catalog

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

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

Diagram

Input

Agent

Tool

Output

Diagram
API Keys CatalogAgentUserAPI Keys CatalogAgentUserRequestProcess requestResultResponse

API Keys Catalog

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

Quick Start

  1. Set environment variables

    Add your API keys to your shell profile:

    bash
    export OPENAI_API_KEY=sk-...
    export TAVILY_API_KEY=tvly-...
  2. Test connectivity
    bash
    praisonai persistence doctor --conversation-url "sqlite:///test.db"

LLM Providers

ProviderEnvironment VariableTest Command
OpenAIOPENAI_API_KEYpython3 -c "from openai import OpenAI; print(OpenAI().models.list().data[0].id)"
AnthropicANTHROPIC_API_KEYpython3 -c "import anthropic; print('OK')"
GoogleGOOGLE_API_KEYpython3 -c "import google.generativeai as genai; print('OK')"
GroqGROQ_API_KEYpython3 -c "from groq import Groq; print('OK')"
MistralMISTRAL_API_KEYpython3 -c "from mistralai import Mistral; print('OK')"
CohereCOHERE_API_KEYpython3 -c "import cohere; print('OK')"
DeepSeekDEEPSEEK_API_KEYpython3 -c "from openai import OpenAI; print('OK')"

Vector Databases

ProviderEnvironment VariablesTest Command
PineconePINECONE_API_KEYpython3 -c "from pinecone import Pinecone; pc=Pinecone(); print([i.name for i in pc.list_indexes()])"
WeaviateWEAVIATE_URL, WEAVIATE_API_KEYpython3 -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()"
QdrantQDRANT_URL, QDRANT_API_KEYpython3 -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__)"
PGVectorPGVECTOR_URLpython3 -c "import psycopg2; c=psycopg2.connect('$PGVECTOR_URL'); print('OK')"

Conversation Databases

ProviderEnvironment VariablesTest Command
PostgreSQLPOSTGRES_URLpython3 -c "import psycopg2; c=psycopg2.connect('$POSTGRES_URL'); print('OK')"
MySQLMYSQL_URLpython3 -c "import mysql.connector; print('OK')"
SQLite(none – local)python3 -c "import sqlite3; print('OK')"
SupabaseSUPABASE_URL, SUPABASE_KEYpython3 -c "from supabase import create_client; print('OK')"
NeonNEON_DATABASE_URLpython3 -c "import psycopg2; c=psycopg2.connect('$NEON_DATABASE_URL'); print('OK')"

State Stores

ProviderEnvironment VariablesTest Command
RedisREDIS_URLpython3 -c "import redis; r=redis.from_url('$REDIS_URL'); print(r.ping())"
MongoDBMONGODB_URIpython3 -c "from pymongo import MongoClient; print(MongoClient('$MONGODB_URI').list_database_names())"
DynamoDBAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEYpython3 -c "import boto3; print(boto3.client('dynamodb').list_tables())"
FirestoreGOOGLE_APPLICATION_CREDENTIALSpython3 -c "from google.cloud import firestore; print('OK')"
UpstashUPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKENpython3 -c "from upstash_redis import Redis; print('OK')"

Search & Tools

ProviderEnvironment VariablesTest Command
TavilyTAVILY_API_KEYpython3 -c "from tavily import TavilyClient; print('OK')"
SerperSERPER_API_KEYpython3 -c "import requests; print('OK')"
FirecrawlFIRECRAWL_API_KEYpython3 -c "from firecrawl import FirecrawlApp; print('OK')"

Observability

ProviderEnvironment VariablesTest Command
LangfuseLANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_HOSTpython3 -c "from langfuse import Langfuse; print('OK')"
LangSmithLANGCHAIN_API_KEY, LANGCHAIN_TRACING_V2python3 -c "from langsmith import Client; print('OK')"
AgentOpsAGENTOPS_API_KEYpython3 -c "import agentops; print('OK')"
Arize PhoenixPHOENIX_API_KEYpython3 -c "import phoenix; print('OK')"
MLflowMLFLOW_TRACKING_URIpython3 -c "import mlflow; print(mlflow.__version__)"

CLI Doctor Commands

Test connectivity for any provider:

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

Store keys in environment variables

Never hardcode API keys. Use environment variables or a .env file loaded at startup.

Test connectivity before deploying

Use praisonai persistence doctor commands to verify each provider connection before production.

Use the minimum required keys

Only set API keys for providers you use – this reduces your attack surface.

Rotate keys regularly

Treat API keys like passwords – rotate them periodically and revoke unused keys immediately.

Related