polyclaw v5.0.0

Configuration

Polyclaw is configured through environment variables loaded from a .env file or the system environment. The configuration singleton is defined in app/runtime/config/settings.py.

Core Settings

VariableDefaultDescription
GITHUB_TOKENGitHub PAT with Copilot access. Supports @kv: prefix.
COPILOT_MODELclaude-sonnet-4-20250514Default LLM model for conversations
COPILOT_AGENTOptional Copilot agent name
ADMIN_PORT8000Admin server listen port
ADMIN_SECRETBearer token for API authentication. Supports @kv: prefix.
POLYCLAW_DATA_DIR~/.polyclawRoot directory for all persistent data
DOTENV_PATHCustom path to .env file

Bot Framework

VariableDefaultDescription
BOT_APP_IDAzure Bot registration app ID
BOT_APP_PASSWORDAzure Bot app secret. Supports @kv: prefix.
BOT_APP_TENANT_IDAzure AD tenant ID
BOT_PORT3978Bot Framework endpoint port

Voice / Azure Communication Services

VariableDefaultDescription
ACS_CONNECTION_STRINGAzure Communication Services connection string. Supports @kv: prefix.
ACS_SOURCE_NUMBERACS phone number for outbound calls
ACS_CALLBACK_TOKENAuto-generatedToken securing the ACS callback webhook. Auto-generated if not set.
VOICE_TARGET_NUMBERDefault target phone number
AZURE_OPENAI_ENDPOINTAzure OpenAI endpoint for realtime model
AZURE_OPENAI_API_KEYAzure OpenAI API key. Supports @kv: prefix.
AZURE_OPENAI_REALTIME_DEPLOYMENTgpt-realtime-miniRealtime model deployment name

Memory

VariableDefaultDescription
MEMORY_MODELclaude-sonnet-4-20250514Model used for memory consolidation
MEMORY_IDLE_MINUTES5Minutes of inactivity before memory formation triggers

Proactive Messaging

VariableDefaultDescription
PROACTIVE_ENABLEDfalseEnable autonomous proactive messaging

Security

VariableDefaultDescription
LOCKDOWN_MODE(Experimental) Reject all admin API requests. Any non-empty value enables this mode. Web UI toggle and terminal recovery are not yet fully implemented.
TUNNEL_RESTRICTEDRestrict tunnel to bot/voice endpoints only. Any non-empty value enables this mode.
TELEGRAM_WHITELISTComma-separated allowed Telegram user IDs

Azure Key Vault

VariableDefaultDescription
KEY_VAULT_URLFull Key Vault URL (https://<name>.vault.azure.net)
KEY_VAULT_NAMEKey Vault name, used for firewall allowlisting CLI commands
KEY_VAULT_RGKey Vault resource group

Derived Paths

All paths are computed relative to POLYCLAW_DATA_DIR:

PathDescription
media_dir<data>/media/incoming/, outgoing/pending/, outgoing/sent/, outgoing/error/
memory_dir<data>/memory/ – daily logs, topic notes
skills_dir<data>/skills/ – user and plugin skill directories
sessions_dir<data>/sessions/ – archived chat sessions
soul_path<data>/SOUL.md – agent personality
scheduler_db_path<data>/scheduler.json – scheduled tasks
conversation_refs_path<data>/conversation_refs.json – stored conversation references

Secret Resolution

The following environment variables support @kv: prefix resolution from Azure Key Vault: GITHUB_TOKEN, ADMIN_SECRET, BOT_APP_PASSWORD, ACS_CONNECTION_STRING, AZURE_OPENAI_API_KEY. The Docker entrypoint additionally resolves all @kv: prefixed variables via a shell-level pass.

For example:

GITHUB_TOKEN=@kv:polyclaw-github-token
ADMIN_SECRET=@kv:polyclaw-admin-secret

This requires KEY_VAULT_URL to be set and valid Azure credentials (via az login or managed identity).

See Key Vault Integration for details.