Skip to content

Configuration Reference

Configuration comes in three layers:

  • Environment variables (.env) — server-wide settings for LLM, sandbox, auth, and logging.
  • Agent settings (database) — per-agent config like vision, buffering, and safety checks.
  • Channel config (JSON in database) — per-channel settings for mode, allowlists, and WhatsApp.

VariableDefaultDescription
LLM_BASE_URLhttps://openrouter.ai/api/v1OpenAI-compatible API base URL
LLM_API_KEY(empty)API key. Leave empty for local servers that don’t require auth
LLM_MODELmoonshotai/kimi-k2-thinkingModel identifier sent in API requests
LLM_MAX_TOKENS32768Maximum tokens in the LLM response
LLM_CONTEXT_LENGTH0Context window size. 0 = use model default
LLM_PROMPT_BUFFER2048Tokens reserved for the response when calculating context
LLM_TIMEOUT120Request timeout in seconds
LLM_TIMEOUT_RETRIES1Number of times to retry the LLM call if it times out
ProviderBase URL
llama.cpphttp://localhost:8080/v1
Ollamahttp://localhost:11434/v1
vLLMhttp://localhost:8000/v1
OpenRouterhttps://openrouter.ai/api/v1
OpenAIhttps://api.openai.com/v1

Settings for the isolated Docker container used by the runpy and bash tools. The sandbox image is built from docker/tools/Dockerfile. See Docker Setup for build instructions.

VariableDefaultDescription
SANDBOX_IMAGEevonic-sandbox:latestDocker image used for the sandbox container
SANDBOX_MEMORY_LIMIT512mMemory limit per container
SANDBOX_CPU_LIMIT1CPU limit per container
SANDBOX_NETWORKbridgeNetwork mode: none or bridge
SANDBOX_MAX_CONTAINERS10Maximum number of containers in the pool (LRU eviction)
SANDBOX_IDLE_TIMEOUT1800Idle timeout in seconds before container is destroyed (30 min)
SANDBOX_WORKSPACE(project root)Host path mounted at /workspace inside the container
VariableDefaultDescription
TWO_PASS_ENABLED1Enable two-pass answer extraction (1 or 0)
TWO_PASS_TEMPERATURE0.0Temperature for the extraction pass. Low values improve consistency
VariableDefaultDescription
HOST0.0.0.0Server bind address
PORT8080Server port
DEBUG0Enable Flask debug mode (1 or 0). Disabled by default — only enable in development.
SECRET_KEYdev-secret-key-...Flask session secret. Auto-generated and persisted to .env on first boot. Change in production.
VariableDefaultDescription
ADMIN_PASSWORD_HASH(empty)Password hash for web dashboard login. Use ./evonic pass to set.
TURNSTILE_SITE_KEY(empty)Cloudflare Turnstile site key — shows CAPTCHA on login when set
TURNSTILE_SECRET_KEY(empty)Cloudflare Turnstile secret key for server-side verification

These variables control the live evaluation log display. For the full logging system — file output, rotation, per-module routing, and the web UI log viewer — see the Logging guide.

VariableDefaultDescription
LOG_FULL_THINKING0Include full LLM thinking content in live log output
LOG_FULL_RESPONSE0Include full LLM response in live log output
LLM_API_LOG_ENABLED0Log every LLM request/response to a markdown file
LLM_API_LOG_FILElogs/llm_api_calls.mdPath for LLM API call logs
EVENT_LOG_FILElogs/events.logPath for agent runtime event logs (processing, tool execution, etc.)
EVONIC_LOG_CONSOLE_QUIETapscheduler.*Comma-separated fnmatch patterns to suppress from console output

Settings for the Evonet WebSocket relay server that enables Tunnel Workplaces.

VariableDefaultDescription
CONNECTOR_WS_HOST0.0.0.0Bind address for the Evonet relay server
CONNECTOR_WS_PORT8081Port for the Evonet relay server
CONNECTOR_PING_INTERVAL30WebSocket keepalive ping interval in seconds
CONNECTOR_PING_TIMEOUT10Ping timeout in seconds before marking connector offline
CONNECTOR_PAIRING_CODE_TTL300Pairing code validity window in seconds (default: 5 minutes)

The relay server starts automatically on application boot. Ensure port 8081 (or your configured port) is reachable by devices running Evonet.

Introduced in v0.2.0. These settings are stored per-agent in the database and can be edited via the Web UI or API.

SettingDefaultDescription
vision_enabled0Allow agent to receive and analyze images from channel (Telegram / WhatsApp)
send_intermediate_responses0Forward intermediate tool-call text to channels during processing
outbound_buffer_seconds1.5Coalescing delay in seconds before flushing intermediate output to channel
enable_agent_state0Enable structured agent state tracking (busy, waiting_for_tool, etc.)
inject_agent_id1Include the agent’s identifier in system instructions
inject_datetime1Include the current date/time in system instructions
safety_checker_enabled1Enable HMADS heuristic safety checks for tool execution (1 or 0)
disable_parallel_tool_execution0Execute tools sequentially instead of in parallel (1 or 0)
summarize_threshold3Number of conversation turns before summarization triggers
summarize_tail5Number of most recent messages to keep after summarization
message_buffer_seconds2Inbound message buffering window in seconds
primary_channel_id(none)Channel ID used for agent-to-agent communication routing

Introduced in v0.2.6.

Controls how many agent conversations can be processed concurrently. This is a server-wide setting in .env:

VariableDefaultDescription
AGENT_QUEUE_MAX_WORKERS5Maximum number of agent conversations processed in parallel. Higher values increase throughput but also increase CPU/memory usage.

When the number of active conversations exceeds AGENT_QUEUE_MAX_WORKERS, additional messages are queued and processed as workers become available.

Introduced in v0.2.6.

Controls how many tool calls an agent can make in a single conversation turn before the runtime forces a response. This prevents infinite tool-calling loops.

VariableDefaultDescription
AGENT_MAX_TOOL_ITERATIONS15Maximum tool calls per turn. If the agent exceeds this limit, the runtime interrupts and generates a response with whatever results are available.

This is a per-agent setting configurable in the General tab:

Terminal window
evonic agent update my_agent --max-tool-iterations 25

When to adjust:

ScenarioRecommended ValueReason
Simple Q&A10Most queries need 1-3 tool calls
Complex multi-step tasks20Research, data analysis pipelines
Agent-to-agent delegation25Messaging adds extra rounds
Debugging tool-calling agents30Allow exploration without interruption

Introduced in v0.2.0. Each channel stores its configuration as a JSON object in the database. You can edit these via the Channel Detail Modal in the Web UI or through the API.

New channels default to restricted mode. You can toggle between open and restricted at any time.

{
"mode": "restricted"
}
ModeDescription
openEveryone is allowed to chat. No allowlist check.
restrictedOnly users in the allowlist can chat. New users receive a pairing code that an admin must approve.

In restricted mode, only users whose external_user_id is in the allowlist can interact with the agent:

{
"mode": "restricted",
"allowed_users": ["123456789", "987654321"],
"user_names": {
"123456789": "Alice",
"987654321": "Bob"
},
"names_needed": []
}
Config KeyTypeDescription
allowed_usersstring[]List of approved external_user_id values
user_namesobjectMap of external_user_id to display name
names_neededstring[]Users who have been approved but still need to provide their name

When an unregistered user sends a message to a restricted channel, the system generates a pairing code and creates a pending approval record. An admin must approve the code before the user can interact.

Pairing codes are 6-character alphanumeric codes using an unambiguous character set (excludes 0, O, 1, I, L to prevent visual confusion).

  • Format: XXXXXX — 6 uppercase alphanumeric, no hyphen.
  • Expiry: Codes expire after 5 minutes.
  • Legacy support: XXX-XXX format (e.g., XK4-M9Q) is accepted for backward compatibility.
// Example: valid pairing codes
"XK4M9Q" // ✅ Standard format
"ABC123" // ✅
"XK4-M9Q" // ✅ Legacy format (hyphen stripped)
// Example: invalid codes
"abc123" // ❌ Lowercase
"0O1L" // ❌ Contains ambiguous characters
  1. User sends a message to a restricted channel
  2. System generates a pair code and replies with it
  3. User shares the code with an admin
  4. Admin approves via CLI (evonic channel approve XK4M9Q) or Web UI
  5. User is added to the allowlist and can now interact

Introduced in v0.2.0. The WhatsApp channel uses a Node.js sidecar (Baileys bridge) that runs alongside the Evonic server. Configuration is stored per-channel in the database.

{
"mode": "restricted",
"bridge_port": 3001
}
Config KeyDefaultDescription
bridge_port3001Port for the WhatsApp Baileys sidecar process
moderestrictedChannel access mode (open or restricted)

The bridge is a Node.js process launched automatically when the WhatsApp channel starts. It:

  • Listens for incoming WhatsApp messages and forwards them to Evonic via HTTP callback
  • Handles QR code pairing with WhatsApp Web
  • Manages authentication sessions in data/whatsapp-sessions/{channel_id}/

Requirements:

  • Node.js must be installed on the server
  • npm dependencies are auto-installed on first start
  • The bridge uses the Baileys library (unofficial WhatsApp Web API)

The bridge posts incoming messages to:

POST /api/channels/whatsapp-bridge/{channel_id}/callback

This URL is auto-configured — no manual setup needed.

Override the default evaluator strategy for specific domains:

EVALUATOR_MATH=keyword
EVALUATOR_CONVERSATION=two_pass
EVALUATOR_SQL=sql_executor

The environment variable format is EVALUATOR_<DOMAIN_UPPERCASE>. Available types: two_pass, keyword, sql_executor, tool_call.

These are configured in config.py (not via .env):

SettingDefaultDescription
DB_PATHevonic.dbMain SQLite database
TEST_DB_PATHseed/test_db.sqliteSQLite database used for SQL evaluation tests