Skip to content

Configuration

All configuration is done via environment variables in a .env file at the project root.

Terminal window
cp .env.example .env
# For local LLM (llama.cpp, Ollama)
LLM_BASE_URL=http://localhost:11434/v1
LLM_API_KEY=
LLM_MODEL=llama3.2
# For vLLM
LLM_BASE_URL=http://localhost:8000/v1
LLM_API_KEY=
LLM_MODEL=meta-llama/Llama-3-8b-Instruct
# For OpenRouter / cloud providers
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_API_KEY=your-api-key-here
LLM_MODEL=moonshotai/kimi-k2-thinking
VariableDefaultDescription
LLM_BASE_URLhttps://openrouter.ai/api/v1OpenAI-compatible API base URL
LLM_API_KEY(empty)API key (leave empty for local servers)
LLM_MODELmoonshotai/kimi-k2-thinkingModel identifier
LLM_TIMEOUT120Request timeout in seconds
VariableDefaultDescription
AGENT_DEFAULT_MODEL(same as LLM_MODEL)Default model for new agents
AGENT_MAX_CONTEXT4096Maximum context length for agents
AGENT_WORKSPACE_DIR./agent_workspacesDirectory for isolated agent workspaces
VariableDefaultDescription
LOCAL_MODEL_RUNNERollamaDefault local model runner (ollama, llama-cpp, vllm)
LOCAL_MODEL_ENDPOINThttp://localhost:11434Local model API endpoint
LOCAL_MODEL_QUANTIZATIONautoPreferred quantization level

The two-pass system first asks the LLM to reason about a problem, then makes a second call to extract just the final answer in a strict format.

VariableDefaultDescription
TWO_PASS_ENABLED1Enable two-pass answer extraction
TWO_PASS_TEMPERATURE0.0Temperature for the extraction pass
VariableDefaultDescription
HOST0.0.0.0Server bind address
PORT8080Server port
DEBUG1Enable Flask debug mode
SECRET_KEYdev-secret-key-...Flask secret key (change in production)
VariableDefaultDescription
LOG_FULL_THINKING0Include full thinking content in live logs
LOG_FULL_RESPONSE0Include full LLM response in live logs
VariableDefaultDescription
ANTHROPIC_API_KEY(empty)For the improver module (analysis & training data generation)

Override the default evaluator for specific domains via environment variables:

EVALUATOR_MATH=keyword # Use keyword evaluator for math domain
EVALUATOR_CONVERSATION=two_pass # Use two-pass for conversation

Available evaluator types: two_pass, keyword, sql_executor, tool_call.