v0.1.0 · Apache 2.0

Search docs...

Environment Variables

Complete reference of all environment variables used by the Corail agent runtime.

5 min read

Overview

The Corail runtime is configured entirely via environment variables. All variables use the CORAIL_ prefix and are defined in the Settings class using Pydantic. Additional variables for LLM providers and evaluation follow their respective conventions.

Core Runtime

VariableDefaultDescription
CORAIL_CHANNELrestCommunication channel. Currently supports rest (HTTP API).
CORAIL_STRATEGYagent-reactAgent strategy. Options: simple, agent-react.
CORAIL_MODEL_TYPEstubLLM provider key. Options: stub, ollama, openai, anthropic, vertex-ai, bedrock, google-ai.
CORAIL_MODEL_IDstub-echoModel identifier for the chosen provider. See model defaults table below.
CORAIL_SYSTEM_PROMPTYou are a helpful assistant.The system instruction set for the agent.
CORAIL_ENVdevEnvironment name: dev, staging, production.
CORAIL_LOG_LEVELINFOLogging level: DEBUG, INFO, WARNING, ERROR.
CORAIL_LOG_FORMATjsonLog output format: json or text.

Model Type Defaults

When CORAIL_MODEL_ID is empty, the factory uses these defaults:

Model TypeDefault Model ID
stubstub-echo
ollamaqwen3.5:35b
openaigpt-4
anthropicclaude-sonnet-4-20250514
vertex-aigemini-2.5-flash
bedrockanthropic.claude-sonnet-4-20250514-v1:0
google-aigemini-2.5-flash

Server

VariableDefaultDescription
CORAIL_PORT8000HTTP data plane port (chat, conversations, suggestions).
CORAIL_HOST0.0.0.0Host address to bind.
CORAIL_CONTROL_PORT8001HTTP control plane port (evaluate, config reload).
CORAIL_GRPC_CONTROL_PORT9001gRPC ControlService port (control_port + 1000).

Storage

VariableDefaultDescription
CORAIL_STORAGEmemoryConversation storage backend. Options: memory, postgresql, redis, s3.
CORAIL_DATABASE_URL(empty)PostgreSQL connection string. Required when CORAIL_STORAGE=postgresql. Example: postgres://recif:recif_dev@recif-postgresql:5432/recif.

Memory

VariableDefaultDescription
CORAIL_MEMORY_BACKENDin_memoryAgent working memory backend. Options: in_memory, pgvector.
VariableDefaultDescription
CORAIL_SEARCH_BACKENDddgsWeb search provider. Options: ddgs (DuckDuckGo), searxng.
CORAIL_SEARXNG_URLhttp://localhost:8080SearXNG instance URL (when CORAIL_SEARCH_BACKEND=searxng).

Tools, Skills, and Knowledge Bases

VariableDefaultDescription
CORAIL_TOOLS(empty)JSON array of tool definitions. Example: [{"name":"web-search","type":"http","endpoint":"..."}]
CORAIL_SKILLS(empty)JSON array of skill names. Example: ["agui-render","code-review"]
CORAIL_KNOWLEDGE_BASES(empty)JSON array of KB configurations. Example: [{"type":"pgvector","connection_url":"...","kb_id":"..."}]

Suggestions

VariableDefaultDescription
CORAIL_SUGGESTIONS(empty)JSON array of static suggestion strings. Example: ["What can you do?","Show me examples"]
CORAIL_SUGGESTIONS_PROVIDERllmSuggestion generation mode. static uses the list above; llm generates dynamic follow-ups.

Control Plane

VariableDefaultDescription
CORAIL_RECIF_GRPC_ADDRlocalhost:50051Recif control plane gRPC address for bidirectional agent-to-platform communication.

Auth

VariableDefaultDescription
CORAIL_JWT_PUBLIC_KEY(empty)PEM-encoded public key for JWT verification. When set, all requests must include a valid Bearer token. When empty, auth is disabled (trusted headers from Istio).

Evaluation

These variables configure the evaluation pipeline. They are not part of the CORAIL_ prefix convention.

VariableDefaultDescription
MLFLOW_TRACKING_URI(empty)MLflow server URL for evaluation logging. Example: http://mlflow.recif-system.svc:5000.
RECIF_EVAL_SAMPLE_RATE0Percentage of production traces to auto-evaluate (0-100). Set via CRD evalSampleRate.
RECIF_JUDGE_MODELopenai:/gpt-4o-miniLLM model used as the evaluation judge. Set via CRD judgeModel.

LLM Provider API Keys

These are typically injected via the agent-env Kubernetes Secret created by the Helm chart.

VariableProviderDescription
OPENAI_API_KEYOpenAIAPI key from platform.openai.com
ANTHROPIC_API_KEYAnthropicAPI key from console.anthropic.com
GOOGLE_API_KEYGoogle AIAPI key from aistudio.google.com
GOOGLE_CLOUD_PROJECTVertex AIGCP project ID
GOOGLE_APPLICATION_CREDENTIALSVertex AI / GCPPath to service account JSON file
AWS_REGIONBedrockAWS region (e.g. us-east-1)
AWS_ACCESS_KEY_IDBedrockAWS access key
AWS_SECRET_ACCESS_KEYBedrockAWS secret key

Recif API Server

These variables configure the Recif control plane API (Go server), not the Corail runtime.

VariableDefaultDescription
AUTH_ENABLEDfalseEnable JWT authentication for API requests.
LOG_LEVELinfoAPI server log level.
LOG_FORMATjsonAPI server log format.
ENV_PROFILEdevEnvironment profile.
DATABASE_URL(set by Helm)PostgreSQL connection string for the Recif database.
MLFLOW_TRACKING_URI(set by Helm)MLflow server URL for evaluation and governance.

Tip

In development, setCORAIL_MODEL_TYPE=stubto use the built-in echo model that requires no API keys. Switch to a real provider when you are ready to test with an LLM.

Warning

Never commit API keys to version control. Use Kubernetes Secrets (configured via the Helm chartllmsection) to inject credentials at runtime.