Pi Agent Configuration Reference Manual

The following is a quick reference table for Pi Agent settings.json configuration items.

This table includes common configuration items; a few JSON-specific advanced keys (such as tuiMode, fullscreen series, terminal.hyperlinks, markdown.mermaid, etc.) are not listed individually.


Configuration File Location

Configuration is divided into two levels: global and project. Project configuration is only loaded after the project has been trusted.

File PathScopeDescription
~/.pi/agent/settings.jsonGlobal (all projects)Common configuration effective for all projects
.pi/settings.jsonProject-levelOnly loaded after the project is trusted; overrides keys with the same name in the global configuration.

Model and Reasoning

The configuration in this section determines the default provider, model, and reasoning effort.

Configuration ItemTypeRequiredDefault ValueDescription
defaultProviderstringOptionalNone (set on first use via /login or /model)Default provider, e.g., "anthropic", "openai"
defaultModelstringOptionalNone (set on first use via /login or /model)Default model ID, e.g., "claude-sonnet-4-20250514"
defaultThinkingLevelstringOptionalNone (not provided by documentation)Default reasoning effort: off/minimal/low/medium/high/xhigh/max
modelThinkingLevelsobjectOptionalNoneSet the startup reasoning effort for each model by "provider/modelId"
hideThinkingBlockbooleanOptionalfalseHide reasoning process
showCacheMissNoticesbooleanOptionalfalseDisplay cache miss notifications
thinkingBudgetsobjectOptionalNone (custom budget not enabled)Customize token budget for each level
warnings.anthropicExtraUsagebooleanOptionaltrueRemind when Anthropic subscription may incur paid extra usage

UI and Display

The configuration in this section controls interface appearance, external editor, and display density.

Configuration ItemTypeRequiredDefault ValueDescription
themestringOptional"dark"Theme name
externalEditorstringOptionalUses $VISUAL, then $EDITOR; otherwise uses Notepad on Windows and nano on other systemsExternal editor command (explicit configuration takes precedence over environment variables)
quietStartupbooleanOptionalfalseHide startup header
defaultProjectTruststringOptional"ask"Project trust default behavior: "ask" (prompt), "always" (auto-trust), "never" (auto-reject); only effective in global configuration
collapseChangelogbooleanOptionalfalseCollapse changelog
enableInstallTelemetrybooleanOptionaltrueAnonymous installation statistics
enableAnalyticsbooleanOptionalfalseUser behavior analytics (requires opt-in)
doubleEscapeActionstringOptional"tree"Action triggered by double-pressing Escape; defaults to opening the session tree browser
treeFilterModestringOptional"default"/tree default filter mode: default/no-tools/user-only/labeled-only/all
editorPaddingXnumberOptional0Editor horizontal padding (0-3)
outputPadnumberOptional1Message padding (0 or 1)
autocompleteMaxVisiblenumberOptional5Maximum autocomplete entries (3-20)

Network

The configuration in this section is used for proxy access in restricted network environments.

Configuration ItemTypeRequiredDefault ValueDescription
httpProxystringOptionalNone (no proxy used)HTTP proxy (global only)

httpProxyOnly effective in global configuration; it is ignored if written in project-level configuration.

When a proxy is needed, write it into the global configuration.~/.pi/agent/settings.json。


Compression

The configuration in this section controls the triggering and retention policy of automatic context compression.

Configuration ItemTypeRequiredDefault ValueDescription
compaction.enabledbooleanOptionaltrueAutomatic compression
compaction.reserveTokensnumberOptional16384Reserved tokens for LLM response
compaction.keepRecentTokensnumberOptional20000Recent tokens to retain

Branch Summary

The configuration in this section controls whether to generate a summary of abandoned branches when jumping between session trees.

Configuration ItemTypeRequiredDefault ValueDescription
branchSummary.reserveTokensnumberOptional16384Reserved tokens for summary
branchSummary.skipPromptbooleanOptionalfalseSkip summary prompt

Retry

The configuration in this section controls automatic retry behavior after request failures.

Configuration ItemTypeRequiredDefault ValueDescription
retry.enabledbooleanOptionaltrueAutomatic retry
retry.maxRetriesnumberOptional3Maximum number of retries
retry.baseDelayMsnumberOptional2000Base delay (ms)
retry.provider.timeoutMsnumberOptionalSDK defaultRequest timeout
retry.provider.maxRetriesnumberOptional0Provider-level retry count
retry.provider.maxRetryDelayMsnumberOptional60000Maximum retry delay

Message Passing

The configuration in this section determines how directive and follow-up messages are inserted, as well as the transport protocol used.

Configuration ItemTypeRequiredDefault ValueDescription
steeringModestringOptional"one-at-a-time"Directive message policy: "all" (insert all directive messages immediately) or "one-at-a-time" (insert one by one)
followUpModestringOptional"one-at-a-time"Follow-up message policy
transportstringOptional"auto"Transport protocol: sse / websocket / websocket-cached / auto
httpIdleTimeoutMsnumberOptional300000HTTP idle timeout
websocketConnectTimeoutMsnumberOptional15000WebSocket connection timeout

Terminal and Images

The configuration in this section controls the display size and sending behavior of images in the terminal.

Configuration ItemTypeRequiredDefault ValueDescription
terminal.showImagesbooleanOptionaltrueDisplay images in terminal
terminal.imageWidthCellsnumberOptional60Image width (cells)
terminal.clearOnShrinkbooleanOptionalfalseClear empty lines when content shrinks
images.autoResizebooleanOptionaltrueAutomatic image scaling
images.blockImagesbooleanOptionalfalsePrevent sending images to LLM

Shell

The configuration in this section is used to customize the shell and npm wrapper when executing commands.

Configuration ItemTypeRequiredDefault ValueDescription
shellPathstringOptionalNone (use system default shell)Custom shell path
shellCommandPrefixstringOptionalNone (no prefix added)Command prefix
npmCommandstring[]OptionalNone (invoke npm directly)npm command wrapper

Built-in Tools

The configuration in this section controls the set of built-in tools enabled by default at startup.

Configuration ItemTypeRequiredDefault ValueDescription
defaultToolsstring[]OptionalNone (use the built-in default toolset)Initially enabled built-in tools, optional values: read/bash/powershell/edit/write/grep/find/ls, where powershell is only available on Windows

This configuration only affects built-in tools; custom tools registered by extensions and the SDK are not affected.

The project-level defaultTools array completely replaces the global array.


Model Loop and Resources

This section configures the Ctrl+P model loop scope, as well as the load paths for resources such as extensions and Skills.

Configuration itemTypeRequiredDefault valueDescription
enabledModelsstring[]OptionalNone (all available models)Ctrl+P available models
packagesarray (mixed strings or objects)Optional[]Package source; string form loads all resources, object form filters using fields such as {source, skills, extensions}
extensionsstring[]Optional[]Extension path
skillsstring[]Optional[]Skill path
promptsstring[]Optional[]Template path
themesstring[]Optional[]Theme path
enableSkillCommandsbooleanOptionaltrueRegister /skill:name command
sessionDirstringOptionalNone (uses ~/.pi/agent/sessions/)Session storage directory
Other extensions