Skip to main content

Configuration Overview

This page separates restart-required host configuration from runtime settings managed in the application.

Polygent is configured through two layers:

  1. appsettings.json (and environment variable overrides) — boot-time configuration: database, storage, OAuth credentials, base URLs, log levels, ticket sync interval, local-host capacity.
  2. The Settings UI — runtime configuration: model credentials, model visibility, global ticket concurrency, insights and merge-conflict settings, system logs viewer. Stored in the database; takes effect without restarting.

Most day-to-day configuration lives in the Settings UI. appsettings.json is touched only when you install, swap database providers, change OAuth credentials, or tune host-level limits.

appsettings.json

The primary configuration file is appsettings.json, located alongside the API executable. The following is the shipped control-plane configuration; keep release-supplied sections that are not shown in this operational excerpt unchanged unless Support directs a change.

{
"Logging": {
"LogLevel": {
"Default": "Information"
}
},
"AllowedHosts": "*",
"Login": {
"AccessTokenMinutesLifetime": 15,
"RefreshTokenDaysLifetime": 7,
"ClientUrl": "https://localhost:5173",
"ClientId": "",
"ClientSecret": "",
"LoginType": "Google",
"TenantId": "",
"Authority": "",
"OidcDisplayName": "",
"OidcScopes": "",
"EnableSeamlessSso": false,
"AllowNewUsers": true
},
"Database": {
"Provider": "Sqlite",
"ConnectionString": null
},
"ClientUrl": null,
"McpUrl": null,
"StoragePath": null,
"ShowChatInNewMenu": false,
"ShowDevelopInNewMenu": false,
"Tickets": {
"SyncIntervalMinutes": 15,
"EnableReadyForQaSummary": false
},
"MergeWorktreePrefix": "merge",
"MergeAiTimeoutSeconds": 1800,
"LocalHost": {
"Enabled": true
},
"HostProtocolVersion": {
"MinSupported": 5,
"Current": 5
}
}

Top-Level Keys

These keys control process startup, public URLs, and feature exposure. Configure host concurrency limits on the Hosts page; changes apply without an API restart. Regular pending messages run before internal follow-up reports, and both run before new ticket starts. Internal follow-up work uses its active ticket's existing capacity when available; otherwise it uses Sessions capacity.

KeyPurpose
Logging:LogLevelMinimum log levels per category (see System Logs)
AllowedHostsASP.NET Core host filter; * accepts any incoming Host header
LoginOAuth provider, JWT lifetimes (see Authentication)
DatabaseEF Core provider + connection string (see Database)
ClientUrlOptional override for the React client URL used in shared links and notifications
McpUrlOptional MCP endpoint override advertised to session hosts. Keep it behind HTTPS and reachable only from trusted worker networks.
StoragePathRoot directory for keys, logs, SQLite database, worktrees, and attachments (see Storage)
ShowChatInNewMenuShow the built-in Chat item in the New menu; default false
ShowDevelopInNewMenuShow the built-in Develop item in the New menu; default false
TicketsExternal ticket sync interval and ready-for-QA summary toggle. The shipped configuration disables ready-for-QA summaries; if the key is omitted, they are enabled.
MergeWorktreePrefixPrefix for temporary worktrees used by Merge Conflicts (default merge)
MergeAiTimeoutSecondsPer-attempt timeout for AI-assisted conflict resolution, excluding time waiting for process capacity and time spent on merge hooks (queued, running, or retrying) (default: up to 30 minutes)
LocalHostLocal session host enable flag
HostProtocolVersionRemote Session Worker compatibility gate; change only during coordinated upgrades

Configuration Sections

SectionWhat it covers
DatabaseProvider (SQLite / SQL Server / PostgreSQL), connection strings, migrations
StorageStoragePath layout: keys, logs, worktrees, SQLite database
Models & BackendsModel visibility, custom models, and backend credentials
Environment VariablesApp-level (appsettings.json) and workspace-level secrets
Global SettingsRuntime UI settings: Client URL, insights/merge-conflicts model, low-priority hour
AuthenticationGoogle / Microsoft OAuth2 + generic OpenID Connect + JWT (Login section)
System LogsLog levels, time filters, file layout

Environment Variable Overrides

Every value in appsettings.json can be overridden via environment variables using __ (double underscore) as the section separator:

# Override the database connection string
Database__ConnectionString="Host=localhost;Database=polygent;Username=polygent;Password=secret"

# Override the database provider
Database__Provider="PostgreSql"

# Override the storage path
StoragePath="/var/lib/polygent"

# Override the bind URL (multi-host comma-separated)
Urls="http://0.0.0.0:5000;https://0.0.0.0:5001"

# OAuth credentials via env (recommended over committing to appsettings.json)
Login__LoginType="Google"
Login__ClientId="..."
Login__ClientSecret="..."

Host authentication keys are not configured in appsettings.json. Issue and manage them at runtime through the Hosts → API Keys tab in the application.

Environment variables take precedence over appsettings.json. This is the recommended pattern for credentials, container deployments, and any secret you do not want in source control.

Configuration Reload Semantics

ChangeTakes effect
appsettings.json (Database, Login, StoragePath, Tickets, LocalHost, Logging, …)Restart the API
Settings UI values (client URL, model credentials, visibility, and custom models)Immediately, no restart
Hosts page per-host settings (Max Concurrent Tickets, allowed workspaces, enable/disable)Immediately, no restart
Workspace settings (model defaults, environment variables, hooks, tasks, and members)Immediately, no restart

Permissions

Settings access requires settings.view (read) and settings.manage (write). Admins bypass these checks. See Permissions.