> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Config

> Exact type definition referenced by the public SDK.

This definition is generated from the same source as the SDK. Protocol types describe the runtime HTTP API; prefer the high-level SDK for session ownership and callbacks.

```ts theme={null}
export type Config = {
  /**
   * JSON schema reference for configuration validation
   */
  $schema?: string
  logLevel?: LogLevel
  server?: ServerConfig
  /**
   * Command configuration
   */
  command?: {
    [key: string]: {
      template: string
      description?: string
      agent?: string
      model?: string
      subtask?: boolean
    }
  }
  /**
   * Additional skill folder paths
   */
  skills?: {
    /**
     * Additional paths to skill folders
     */
    paths?: Array<string>
    /**
     * URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)
     */
    urls?: Array<string>
  }
  watcher?: {
    ignore?: Array<string>
  }
  /**
   * Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.
   */
  snapshot?: boolean
  plugin?: Array<
    | string
    | [
        string,
        {
          [key: string]: unknown
        },
      ]
  >
  /**
   * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
   */
  share?: "manual" | "auto" | "disabled"
  /**
   * @deprecated Use 'share' field instead. Share newly created sessions automatically
   */
  autoshare?: boolean
  /**
   * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
   */
  autoupdate?: boolean | "notify"
  /**
   * Disable providers that are loaded automatically
   */
  disabled_providers?: Array<string>
  /**
   * When set, ONLY these providers will be enabled. All other providers will be ignored
   */
  enabled_providers?: Array<string>
  /**
   * Model to use in the format of provider/model, eg anthropic/claude-2
   */
  model?: string
  /**
   * Small model to use for tasks like title generation in the format of provider/model
   */
  small_model?: string
  /**
   * Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.
   */
  default_agent?: string
  /**
   * Custom username to display in conversations instead of system username
   */
  username?: string
  /**
   * @deprecated Use `agent` field instead.
   */
  mode?: {
    build?: AgentConfig
    plan?: AgentConfig
    [key: string]: AgentConfig | undefined
  }
  /**
   * Agent configuration
   */
  agent?: {
    plan?: AgentConfig
    build?: AgentConfig
    general?: AgentConfig
    explore?: AgentConfig
    title?: AgentConfig
    summary?: AgentConfig
    compaction?: AgentConfig
    [key: string]: AgentConfig | undefined
  }
  /**
   * Custom provider configurations and model overrides
   */
  provider?: {
    [key: string]: ProviderConfig
  }
  /**
   * MCP (Model Context Protocol) server configurations
   */
  mcp?: {
    [key: string]:
      | McpLocalConfig
      | McpRemoteConfig
      | {
          enabled: boolean
        }
  }
  formatter?:
    | boolean
    | {
        [key: string]: {
          disabled?: boolean
          command?: Array<string>
          environment?: {
            [key: string]: string
          }
          extensions?: Array<string>
        }
      }
  lsp?:
    | boolean
    | {
        [key: string]:
          | {
              disabled: true
            }
          | {
              command: Array<string>
              extensions?: Array<string>
              disabled?: boolean
              env?: {
                [key: string]: string
              }
              initialization?: {
                [key: string]: unknown
              }
            }
      }
  /**
   * Additional instruction files or patterns to include
   */
  instructions?: Array<string>
  layout?: LayoutConfig
  permission?: PermissionConfig
  tools?: {
    [key: string]: boolean
  }
  enterprise?: {
    /**
     * Enterprise URL
     */
    url?: string
  }
  compaction?: {
    /**
     * Enable automatic compaction when context is full (default: true)
     */
    auto?: boolean
    /**
     * Enable pruning of old tool outputs (default: true)
     */
    prune?: boolean
    /**
     * Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)
     */
    tail_turns?: number
    /**
     * Maximum number of tokens from recent turns to preserve verbatim after compaction
     */
    preserve_recent_tokens?: number
    /**
     * Token buffer for compaction. Leaves enough window to avoid overflow during compaction.
     */
    reserved?: number
  }
  experimental?: {
    disable_paste_summary?: boolean
    /**
     * Enable the batch tool
     */
    batch_tool?: boolean
    /**
     * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)
     */
    openTelemetry?: boolean
    /**
     * Record prompt/input content on AI SDK OpenTelemetry spans (default: redacted)
     */
    openTelemetryRecordInputs?: boolean
    /**
     * Record completion/output content on AI SDK OpenTelemetry spans (default: redacted)
     */
    openTelemetryRecordOutputs?: boolean
    /**
     * Tools that should only be available to primary agents.
     */
    primary_tools?: Array<string>
    /**
     * Continue the agent loop when a tool call is denied
     */
    continue_loop_on_deny?: boolean
    /**
     * Timeout in milliseconds for model context protocol (MCP) requests
     */
    mcp_timeout?: number
  }
}
```

Related types: [AgentConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/AgentConfig.md), [LayoutConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/LayoutConfig.md), [LogLevel](https://cognitio-agent.mintlify.site/api-reference/protocol/LogLevel.md), [McpLocalConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/McpLocalConfig.md), [McpRemoteConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/McpRemoteConfig.md), [PermissionConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/PermissionConfig.md), [ProviderConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/ProviderConfig.md), [ServerConfig](https://cognitio-agent.mintlify.site/api-reference/protocol/ServerConfig.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.