Skip to content
3 min read · 617 words

Configuration

The platform is configured entirely through environment variables. This page lists every variable actually read by the code, where it is read, and its default.

Backend variables

Read via python-dotenv (load_dotenv()) from backend/app/.env or the process environment.

VariableDefaultRead inPurpose
OPENAI_API_KEY(none — required)services/openai_service.py, services/multi_agent_email_service.py, services/document_service.pyAuth for all chat, analysis, and embedding calls
OPENAI_MODELgpt-4o-minisame service modules + routers/agents.py (cost logging)Chat/completion model for every LLM call
OPENAI_EMBEDDING_MODELtext-embedding-3-smallservices/document_service.pyEmbedding model for RAG ingestion and retrieval
ini
OPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL=gpt-4o-mini
OPENAI_EMBEDDING_MODEL=text-embedding-3-small

The .env file holds a live API key. It is ignored by .gitignore; keep it that way. If a key leaks, revoke it at platform.openai.com immediately. See Security.

Behavior when OPENAI_API_KEY is missing

Each service guards explicitly:

python
if not os.getenv("OPENAI_API_KEY"):
    raise ValueError("OPENAI_API_KEY is missing. Please add it to your .env file.")
  • Chat (POST /agents/{id}/chat) — the router catches the exception, stores the fallback response "Sorry, I could not generate a response right now.", and records the run with status="failed" and the error in error_message. The HTTP response is still 200.
  • Email analysis / workflows / RAG — the exception propagates to the router's except block, a failed ToolCall is logged, and the client receives 500 with the error detail.

Non-configurable backend values

These are currently hardcoded — changing them means editing source (tracked on the Roadmap):

ValueLocationHardcoded value
Database URLdatabase.pysqlite:///./agentops.db
Chroma pathservices/document_service.py./chroma_db
Chroma collectionservices/document_service.pyagent_documents
Chunk size / overlapservices/document_service.py800 / 100 characters
Chat temperatureservices/openai_service.py0.3 (chat), 0.2 (analysis/RAG), 0 (evaluator/reviewer)
Cost tableservices/monitoring_service.pygpt-4o-mini: $0.15 / $0.60 per 1M input/output tokens

Both relative paths (./agentops.db, ./chroma_db) resolve against the working directory, which is why the backend must be started from backend/app/ — see Installation.

Frontend variables

Read from process.env in server-side code only (route handlers and server components). Set them in frontend/.env.local or the shell.

VariableDefaultRead inPurpose
AGENTOPS_API_BASE_URLhttp://localhost:8001app/api/agents/route.tsBase URL the API proxy forwards to
AGENTOPS_DASHBOARD_API_URLhttp://localhost:8001/agents/1/dashboardapp/dashboard/page.tsxFull URL the dashboard fetches
AGENTOPS_AGENTS_API_URLhttp://localhost:8001/agents/app/agents/page.tsxFull URL the agents list fetches
ini
AGENTOPS_API_BASE_URL=http://localhost:9000
AGENTOPS_DASHBOARD_API_URL=http://localhost:9000/agents/1/dashboard
AGENTOPS_AGENTS_API_URL=http://localhost:9000/agents/

AGENTOPS_DASHBOARD_API_URL embeds the agent ID in the URL. Point it at a different agent by changing the URL, or extend the dashboard page to take a dynamic ID — see Frontend Data Fetching and Known Issues.

Documentation site variables

None. mkdocs build needs no environment variables; Vercel deployment settings live in vercel.json — see Docs Deployment.

What does not exist (yet)

To keep expectations accurate: there is no configuration for authentication secrets, database pooling, Redis, task queues, CORS origins, or logging levels — because those subsystems do not exist yet. See the Roadmap.