Config Defaults
This page is the source-of-truth for current default config values and normalization behavior.
The JSON below describes the default agent created under OPENPOCKET_HOME during onboarding. Managed agents created later with openpocket create agent <id> start from the manager model template and then rewrite the path-bearing fields to their own agents/<id>/... directories.
Default Config JSON
{
"projectName": "OpenPocket",
"workspaceDir": "<absolute OPENPOCKET_HOME>/workspace",
"stateDir": "<absolute OPENPOCKET_HOME>/state",
"sessionStorage": {
"mode": "unified",
"storePath": "<absolute OPENPOCKET_HOME>/workspace/sessions/sessions.json",
"markdownLog": true
},
"defaultModel": "gpt-5.2-codex",
"target": {
"type": "emulator",
"adbEndpoint": "",
"pin": "1234",
"wakeupIntervalSec": 3,
"cloudProvider": ""
},
"emulator": {
"avdName": "OpenPocket_AVD",
"androidSdkRoot": "<ANDROID_SDK_ROOT env or empty string>",
"headless": false,
"bootTimeoutSec": 180,
"dataPartitionSizeGb": 24,
"extraArgs": []
},
"telegram": {
"botToken": "",
"botTokenEnv": "TELEGRAM_BOT_TOKEN",
"allowedChatIds": [],
"pollTimeoutSec": 25
},
"agent": {
"maxSteps": 100,
"loopDelayMs": 1200,
"progressReportInterval": 1,
"returnHomeOnTaskEnd": true,
"autoArtifactsEnabled": true,
"skillsSpecMode": "mixed",
"systemPromptMode": "full",
"contextBudgetChars": 150000,
"lang": "en",
"verbose": true,
"deviceId": null,
"runtimeBackend": "legacy_agent_core",
"legacyCodingExecutor": false
},
"screenshots": {
"saveStepScreenshots": true,
"directory": "<absolute OPENPOCKET_HOME>/state/screenshots",
"maxCount": 400
},
"scriptExecutor": {
"enabled": true,
"timeoutSec": 60,
"maxOutputChars": 6000,
"allowedCommands": [
"adb",
"am",
"pm",
"input",
"echo",
"pwd",
"ls",
"cat",
"grep",
"rg",
"sed",
"awk",
"bash",
"sh",
"node",
"npm"
]
},
"codingTools": {
"enabled": true,
"workspaceOnly": true,
"timeoutSec": 1800,
"maxOutputChars": 12000,
"allowBackground": true,
"applyPatchEnabled": true,
"allowedCommands": [
"git",
"ls",
"cat",
"grep",
"rg",
"sed",
"awk",
"head",
"tail",
"pwd",
"bash",
"sh",
"node",
"npm",
"pnpm",
"yarn",
"python",
"python3",
"pytest",
"jest",
"vitest",
"tsc",
"eslint",
"prettier"
]
},
"memoryTools": {
"enabled": true,
"maxResults": 6,
"minScore": 0.2,
"maxSnippetChars": 1200
},
"heartbeat": {
"enabled": true,
"everySec": 30,
"stuckTaskWarnSec": 600,
"writeLogFile": true
},
"cron": {
"enabled": true,
"tickSec": 10,
"jobsFile": "<absolute OPENPOCKET_HOME>/workspace/cron/jobs.json"
},
"dashboard": {
"enabled": true,
"host": "127.0.0.1",
"port": 51888,
"autoOpenBrowser": false
},
"gatewayLogging": {
"level": "info",
"includePayloads": false,
"maxPayloadChars": 160,
"modules": {
"core": true,
"access": true,
"task": true,
"channel": true,
"cron": true,
"heartbeat": false,
"humanAuth": true,
"chat": false
}
},
"humanAuth": {
"enabled": false,
"useLocalRelay": true,
"localRelayHost": "127.0.0.1",
"localRelayPort": 8787,
"localRelayStateFile": "<absolute OPENPOCKET_HOME>/state/human-auth-relay/requests.json",
"relayBaseUrl": "",
"publicBaseUrl": "",
"apiKey": "",
"apiKeyEnv": "OPENPOCKET_HUMAN_AUTH_KEY",
"requestTimeoutSec": 300,
"pollIntervalMs": 2000,
"tunnel": {
"provider": "none",
"ngrok": {
"enabled": false,
"executable": "ngrok",
"authtoken": "",
"authtokenEnv": "NGROK_AUTHTOKEN",
"apiBaseUrl": "http://127.0.0.1:4040",
"startupTimeoutSec": 20
}
}
},
"models": {
"gpt-5.2-codex": {
"baseUrl": "https://api.openai.com/v1",
"model": "gpt-5.2-codex",
"apiKey": "",
"apiKeyEnv": "OPENAI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"gpt-5.3-codex": {
"baseUrl": "https://api.openai.com/v1",
"model": "gpt-5.3-codex",
"apiKey": "",
"apiKeyEnv": "OPENAI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"gpt-5.4": {
"baseUrl": "https://api.openai.com/v1",
"model": "gpt-5.4",
"apiKey": "",
"apiKeyEnv": "OPENAI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"claude-sonnet-4.6": {
"baseUrl": "https://openrouter.ai/api/v1",
"model": "claude-sonnet-4.6",
"apiKey": "",
"apiKeyEnv": "OPENROUTER_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"claude-opus-4.6": {
"baseUrl": "https://openrouter.ai/api/v1",
"model": "claude-opus-4.6",
"apiKey": "",
"apiKeyEnv": "OPENROUTER_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"blockrun/gpt-4o": {
"baseUrl": "https://api.blockrun.ai/v1",
"model": "openai/gpt-4o",
"apiKey": "",
"apiKeyEnv": "BLOCKRUN_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"blockrun/claude-sonnet-4": {
"baseUrl": "https://api.blockrun.ai/v1",
"model": "anthropic/claude-sonnet-4",
"apiKey": "",
"apiKeyEnv": "BLOCKRUN_API_KEY",
"maxTokens": 4096,
"reasoningEffort": "medium",
"temperature": null
},
"blockrun/gemini-2.0-flash": {
"baseUrl": "https://api.blockrun.ai/v1",
"model": "google/gemini-2.0-flash-exp",
"apiKey": "",
"apiKeyEnv": "BLOCKRUN_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"google/gemini-2.0-flash": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"model": "gemini-2.0-flash",
"apiKey": "",
"apiKeyEnv": "GEMINI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"google/gemini-3-pro-preview": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"model": "gemini-3-pro-preview",
"apiKey": "",
"apiKeyEnv": "GEMINI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"google/gemini-3.1-pro-preview": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"model": "gemini-3.1-pro-preview",
"apiKey": "",
"apiKeyEnv": "GEMINI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"blockrun/deepseek-chat": {
"baseUrl": "https://api.blockrun.ai/v1",
"model": "deepseek/deepseek-chat",
"apiKey": "",
"apiKeyEnv": "BLOCKRUN_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"zai/glm-5": {
"baseUrl": "https://api.z.ai/api/paas/v4",
"model": "glm-5",
"apiKey": "",
"apiKeyEnv": "ZAI_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null
},
"aliyun-ui-agent/mobile": {
"baseUrl": "https://dashscope.aliyuncs.com/api/v2/apps/gui-owl/gui_agent_server",
"model": "pre-gui_owl_7b",
"apiKey": "",
"apiKeyEnv": "DASHSCOPE_API_KEY",
"maxTokens": 4096,
"reasoningEffort": null,
"temperature": null,
"backend": "aliyun_ui_agent_mobile"
}
}
}Aliyun UI Agent mobile note
- built-in profile key:
aliyun-ui-agent/mobile - backend discriminator:
models.<name>.backend = "aliyun_ui_agent_mobile" - screenshot delivery depends on the local relay stack, so public Aliyun fetches require either:
- the shared relay hub (
openpocket human-auth-relay start) - or per-agent ngrok (
humanAuth.tunnel.provider=ngrok)
- the shared relay hub (
Managed Agent Overrides
When you run openpocket create agent <id>, OpenPocket clones a new agent config and rewrites these defaults:
workspaceDir-><absolute OPENPOCKET_HOME>/agents/<id>/workspacestateDir-><absolute OPENPOCKET_HOME>/agents/<id>/statesessionStorage.storePath-><absolute OPENPOCKET_HOME>/agents/<id>/workspace/sessions/sessions.jsonscreenshots.directory-><absolute OPENPOCKET_HOME>/agents/<id>/state/screenshotscron.jobsFile-><absolute OPENPOCKET_HOME>/agents/<id>/workspace/cron/jobs.jsonhumanAuth.localRelayStateFile-><absolute OPENPOCKET_HOME>/agents/<id>/state/human-auth-relay/requests.jsondashboard.port-> next available manager-assigned port (>= 51889by default)agent.deviceId->nulltarget.adbEndpoint->\"\"humanAuth.relayBaseUrl/humanAuth.publicBaseUrl->\"\"channels-> reset tochannels.defaultsonly
Model behavior for managed agents:
defaultModelandmodelsare copied frommanager/model-template.json- after creation, each agent can change its own model config independently
Notes:
- Runtime-generated
config.jsonuses absolute paths. openpocket.config.example.jsonkeeps~for readability, but loader resolves to absolute paths.
Normalization
defaultModelmust exist inmodels.target.typeaccepts onlyemulator|physical-phone|android-tv|cloud; invalid values fall back toemulator.agent.langis normalized toen(runtime internal prompt language).agent.systemPromptModeaccepts onlyfull|minimal|none; invalid values fall back tofull.agent.contextBudgetCharsis clamped to at least10000.agent.progressReportIntervalis clamped to at least1.agent.runtimeBackendaccepts onlylegacy_agent_core|pi_session_bridge; other values fall back tolegacy_agent_core.agent.legacyCodingExecutordefaults tofalse; enabling it is a deprecated migration toggle.emulator.dataPartitionSizeGbis clamped to8..512(GB).screenshots.maxCountis clamped to at least20.scriptExecutor.timeoutSecis clamped to at least1.scriptExecutor.maxOutputCharsis clamped to at least1000.codingTools.timeoutSecis clamped to at least1.codingTools.maxOutputCharsis clamped to at least1000.memoryTools.maxResultsis clamped to1..30.memoryTools.minScoreis clamped to0..1.memoryTools.maxSnippetCharsis clamped to200..8000.heartbeat.everySecis clamped to at least5.heartbeat.stuckTaskWarnSecis clamped to at least30.cron.tickSecis clamped to at least2.dashboard.portis clamped to1..65535.gatewayLogging.levelaccepts onlyerror|warn|info|debug.gatewayLogging.maxPayloadCharsis clamped to40..1000.humanAuth.localRelayPortis clamped to1..65535.humanAuth.requestTimeoutSecis clamped to at least30.humanAuth.pollIntervalMsis clamped to at least500.humanAuth.tunnel.provideraccepts onlynone|ngrok.humanAuth.tunnel.ngrok.startupTimeoutSecis clamped to at least3.models.<name>.backendaccepts onlydefault|aliyun_ui_agent_mobile; other values fall back todefault.allowedChatIdsis coerced to numeric array with non-finite values removed.- model
baseUrlis normalized for known providers:- Google Generative Language bare host ->
/v1beta - Anthropic
/v1endpoint -> root endpoint
- Google Generative Language bare host ->
- model
reasoningEffortaccepts onlylow|medium|high|xhigh, elsenull. - model
temperatureisnullif absent/invalid.
Paths
- Values starting with
~are expanded to user home. - Other paths are resolved to absolute paths.
API Keys
Per model profile:
- use
apiKeywhen non-empty - else use env var from
apiKeyEnv - else for OpenAI codex models, try Codex CLI credentials (
$CODEX_HOME/auth.jsonor~/.codex/auth.json; macOS keychainCodex Authfirst) - else key is missing
Missing key causes task start failure with a persisted failed session/memory entry.
Human-auth relay API key precedence:
humanAuth.apiKey- env from
humanAuth.apiKeyEnv - empty (relay endpoints run without bearer auth)
ngrok authtoken precedence:
humanAuth.tunnel.ngrok.authtoken- env from
humanAuth.tunnel.ngrok.authtokenEnv
Backward Compatibility Keys
The loader maps snake_case compatibility keys to camelCase keys before merge.
Examples:
default_model->defaultModelmax_steps->maxStepssystem_prompt_mode->systemPromptModecontext_budget_chars->contextBudgetCharsscript_executor->scriptExecutorcoding_tools->codingToolsmemory_tools->memoryToolsheartbeat_config->heartbeatcron_config->crongateway_logging->gatewayLogginghuman_auth->humanAuthinclude_payloads->includePayloadsmax_payload_chars->maxPayloadCharsallowed_commands->allowedCommandsbase_url->baseUrlreasoning_effort->reasoningEffort
