Skip to content

Configuration

Configure Device Agent from the console, .device_agent/config.json, or startup environment variables. Use the console for daily changes and configuration files or environment variables for deployment and bulk setup.

Configuration Sources

SourceBest for
Console settings pageDaily MQTT, model, voice, channel, permission, and Webhook changes.
.device_agent/config.jsonBackup, migration, bulk rollout, or environments without UI access.
Environment variables / .envFirst startup, containers, system services, and secret injection.

In development, .env is usually in the repository root. The installed binary reads .env from the install directory, not from an arbitrary shell working directory. Use the Runtime Home line in the startup logs as the source of truth for the configuration directory; in production it is usually ~/.device_agent.

Apply Behavior

ConfigurationApply behavior
Agent model, vision model, tool permissions, logging, and WebhooksApply immediately after saving.
Voice provider, models, and credentialsApply immediately after saving; enable state, bind address, port, or TLS changes require a restart.
MQTTReconnects immediately after saving in the console. Changes made in .env or the config file require a restart.
IM channelsRequire a restart.
HTTP, HTTPS, database, and A2A identityRequire a restart.
Web frontend variablesRequire a frontend restart or rebuild.

If the same setting appears in both .env and the console, .env takes precedence at restart. Remove the matching environment variable to keep the console value.

Minimal Startup Example

bash
MQTT_BROKER_URL=mqtt://broker.example.com:1883
MQTT_USERNAME=your-username
MQTT_PASSWORD=your-password
VITE_MQTT_WS_URL=wss://broker.example.com:8084/mqtt

LLM_PROVIDER=openai
LLM_MODEL=gpt-5.5
OPENAI_API_KEY=sk-...

AGENT_GATEWAY_HTTP_HOST=127.0.0.1
AGENT_GATEWAY_HTTP_PORT=3000

To access the console from a server IP or LAN address, set AGENT_GATEWAY_HTTP_HOST to 0.0.0.0 and adjust AGENT_GATEWAY_HTTP_PORT if needed.

For direct access on a trusted network, enable HTTPS. On a shared or untrusted network, also use an authenticated reverse proxy, VPN, or equivalent access control. See Installation.

Next