> ## 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.

# Get configuration

> Retrieve the current Cognitio configuration settings and preferences.



## OpenAPI

````yaml /openapi.json get /config
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /config:
    get:
      summary: Get configuration
      description: Retrieve the current Cognitio configuration settings and preferences.
      operationId: config.get
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      responses:
        '200':
          description: Get config info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Config'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.config.get({
              ...
            })
components:
  schemas:
    Config:
      type: object
      properties:
        $schema:
          description: JSON schema reference for configuration validation
          type: string
        logLevel:
          $ref: '#/components/schemas/LogLevel'
        server:
          $ref: '#/components/schemas/ServerConfig'
        command:
          description: Command configuration
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              template:
                type: string
              description:
                type: string
              agent:
                type: string
              model:
                type: string
              subtask:
                type: boolean
            required:
              - template
        skills:
          description: Additional skill folder paths
          type: object
          properties:
            paths:
              description: Additional paths to skill folders
              type: array
              items:
                type: string
            urls:
              description: >-
                URLs to fetch skills from (e.g.,
                https://example.com/.well-known/skills/)
              type: array
              items:
                type: string
        watcher:
          type: object
          properties:
            ignore:
              type: array
              items:
                type: string
        snapshot:
          description: >-
            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.
          type: boolean
        plugin:
          type: array
          items:
            anyOf:
              - type: string
              - type: array
                prefixItems:
                  - type: string
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
        share:
          description: >-
            Control sharing behavior:'manual' allows manual sharing via
            commands, 'auto' enables automatic sharing, 'disabled' disables all
            sharing
          type: string
          enum:
            - manual
            - auto
            - disabled
        autoshare:
          description: >-
            @deprecated Use 'share' field instead. Share newly created sessions
            automatically
          type: boolean
        autoupdate:
          description: >-
            Automatically update to the latest version. Set to true to
            auto-update, false to disable, or 'notify' to show update
            notifications
          anyOf:
            - type: boolean
            - type: string
              const: notify
        disabled_providers:
          description: Disable providers that are loaded automatically
          type: array
          items:
            type: string
        enabled_providers:
          description: >-
            When set, ONLY these providers will be enabled. All other providers
            will be ignored
          type: array
          items:
            type: string
        model:
          description: Model to use in the format of provider/model, eg anthropic/claude-2
          type: string
        small_model:
          description: >-
            Small model to use for tasks like title generation in the format of
            provider/model
          type: string
        default_agent:
          description: >-
            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.
          type: string
        username:
          description: >-
            Custom username to display in conversations instead of system
            username
          type: string
        mode:
          description: '@deprecated Use `agent` field instead.'
          type: object
          properties:
            build:
              $ref: '#/components/schemas/AgentConfig'
            plan:
              $ref: '#/components/schemas/AgentConfig'
          additionalProperties:
            $ref: '#/components/schemas/AgentConfig'
        agent:
          description: Agent configuration
          type: object
          properties:
            plan:
              $ref: '#/components/schemas/AgentConfig'
            build:
              $ref: '#/components/schemas/AgentConfig'
            general:
              $ref: '#/components/schemas/AgentConfig'
            explore:
              $ref: '#/components/schemas/AgentConfig'
            title:
              $ref: '#/components/schemas/AgentConfig'
            summary:
              $ref: '#/components/schemas/AgentConfig'
            compaction:
              $ref: '#/components/schemas/AgentConfig'
          additionalProperties:
            $ref: '#/components/schemas/AgentConfig'
        provider:
          description: Custom provider configurations and model overrides
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/ProviderConfig'
        mcp:
          description: MCP (Model Context Protocol) server configurations
          type: object
          propertyNames:
            type: string
          additionalProperties:
            anyOf:
              - anyOf:
                  - $ref: '#/components/schemas/McpLocalConfig'
                  - $ref: '#/components/schemas/McpRemoteConfig'
              - type: object
                properties:
                  enabled:
                    type: boolean
                required:
                  - enabled
                additionalProperties: false
        formatter:
          anyOf:
            - type: boolean
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                type: object
                properties:
                  disabled:
                    type: boolean
                  command:
                    type: array
                    items:
                      type: string
                  environment:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                  extensions:
                    type: array
                    items:
                      type: string
        lsp:
          anyOf:
            - type: boolean
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                anyOf:
                  - type: object
                    properties:
                      disabled:
                        type: boolean
                        const: true
                    required:
                      - disabled
                  - type: object
                    properties:
                      command:
                        type: array
                        items:
                          type: string
                      extensions:
                        type: array
                        items:
                          type: string
                      disabled:
                        type: boolean
                      env:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                      initialization:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - command
        instructions:
          description: Additional instruction files or patterns to include
          type: array
          items:
            type: string
        layout:
          $ref: '#/components/schemas/LayoutConfig'
        permission:
          $ref: '#/components/schemas/PermissionConfig'
        tools:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: boolean
        enterprise:
          type: object
          properties:
            url:
              description: Enterprise URL
              type: string
        compaction:
          type: object
          properties:
            auto:
              description: 'Enable automatic compaction when context is full (default: true)'
              type: boolean
            prune:
              description: 'Enable pruning of old tool outputs (default: true)'
              type: boolean
            tail_turns:
              description: >-
                Number of recent user turns, including their following
                assistant/tool responses, to keep verbatim during compaction
                (default: 2)
              type: integer
              minimum: 0
              maximum: 9007199254740991
            preserve_recent_tokens:
              description: >-
                Maximum number of tokens from recent turns to preserve verbatim
                after compaction
              type: integer
              minimum: 0
              maximum: 9007199254740991
            reserved:
              description: >-
                Token buffer for compaction. Leaves enough window to avoid
                overflow during compaction.
              type: integer
              minimum: 0
              maximum: 9007199254740991
        experimental:
          type: object
          properties:
            disable_paste_summary:
              type: boolean
            batch_tool:
              description: Enable the batch tool
              type: boolean
            openTelemetry:
              description: >-
                Enable OpenTelemetry spans for AI SDK calls (using the
                'experimental_telemetry' flag)
              type: boolean
            openTelemetryRecordInputs:
              description: >-
                Record prompt/input content on AI SDK OpenTelemetry spans
                (default: redacted)
              type: boolean
            openTelemetryRecordOutputs:
              description: >-
                Record completion/output content on AI SDK OpenTelemetry spans
                (default: redacted)
              type: boolean
            primary_tools:
              description: Tools that should only be available to primary agents.
              type: array
              items:
                type: string
            continue_loop_on_deny:
              description: Continue the agent loop when a tool call is denied
              type: boolean
            mcp_timeout:
              description: >-
                Timeout in milliseconds for model context protocol (MCP)
                requests
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
      additionalProperties: false
    LogLevel:
      description: Log level
      type: string
      enum:
        - DEBUG
        - INFO
        - WARN
        - ERROR
    ServerConfig:
      description: Server configuration for cognitio serve and web commands
      type: object
      properties:
        port:
          description: Port to listen on
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        hostname:
          description: Hostname to listen on
          type: string
        mdns:
          description: Enable mDNS service discovery
          type: boolean
        mdnsDomain:
          description: 'Custom domain name for mDNS service (default: cognitio.local)'
          type: string
        cors:
          description: Additional domains to allow for CORS
          type: array
          items:
            type: string
    AgentConfig:
      type: object
      properties:
        model:
          type: string
        variant:
          description: >-
            Default model variant for this agent (applies only when using the
            agent's configured model).
          type: string
        temperature:
          type: number
        top_p:
          type: number
        prompt:
          type: string
        tools:
          description: '@deprecated Use ''permission'' field instead'
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: boolean
        disable:
          type: boolean
        description:
          description: Description of when to use the agent
          type: string
        mode:
          type: string
          enum:
            - subagent
            - primary
            - all
        hidden:
          description: >-
            Hide this subagent from the @ autocomplete menu (default: false,
            only applies to mode: subagent)
          type: boolean
        options:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        color:
          description: 'Hex color code (e.g., #FF5733) or theme color (e.g., primary)'
          anyOf:
            - type: string
              pattern: ^#[0-9a-fA-F]{6}$
            - type: string
              enum:
                - primary
                - secondary
                - accent
                - success
                - warning
                - error
                - info
        steps:
          description: >-
            Maximum number of agentic iterations before forcing text-only
            response
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        maxSteps:
          description: '@deprecated Use ''steps'' field instead.'
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        permission:
          $ref: '#/components/schemas/PermissionConfig'
      additionalProperties: {}
    ProviderConfig:
      type: object
      properties:
        api:
          type: string
        name:
          type: string
        env:
          type: array
          items:
            type: string
        id:
          type: string
        npm:
          type: string
        whitelist:
          type: array
          items:
            type: string
        blacklist:
          type: array
          items:
            type: string
        options:
          type: object
          properties:
            apiKey:
              type: string
            baseURL:
              type: string
            enterpriseUrl:
              description: GitHub Enterprise URL for copilot authentication
              type: string
            setCacheKey:
              description: Enable promptCacheKey for this provider (default false)
              type: boolean
            timeout:
              description: >-
                Timeout in milliseconds for requests to this provider. Default
                is 300000 (5 minutes). Set to false to disable timeout.
              anyOf:
                - type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                - type: boolean
                  const: false
            chunkTimeout:
              description: >-
                Timeout in milliseconds between streamed SSE chunks for this
                provider. If no chunk arrives within this window, the request is
                aborted.
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
          additionalProperties: {}
        models:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              family:
                type: string
              release_date:
                type: string
              attachment:
                type: boolean
              reasoning:
                type: boolean
              temperature:
                type: boolean
              tool_call:
                type: boolean
              interleaved:
                anyOf:
                  - type: boolean
                    const: true
                  - type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - reasoning_content
                          - reasoning_details
                    required:
                      - field
              cost:
                type: object
                properties:
                  input:
                    type: number
                  output:
                    type: number
                  cache_read:
                    type: number
                  cache_write:
                    type: number
                  context_over_200k:
                    type: object
                    properties:
                      input:
                        type: number
                      output:
                        type: number
                      cache_read:
                        type: number
                      cache_write:
                        type: number
                    required:
                      - input
                      - output
                required:
                  - input
                  - output
              limit:
                type: object
                properties:
                  context:
                    type: number
                  input:
                    type: number
                  output:
                    type: number
                required:
                  - context
                  - output
              modalities:
                type: object
                properties:
                  input:
                    type: array
                    items:
                      type: string
                      enum:
                        - text
                        - audio
                        - image
                        - video
                        - pdf
                  output:
                    type: array
                    items:
                      type: string
                      enum:
                        - text
                        - audio
                        - image
                        - video
                        - pdf
                required:
                  - input
                  - output
              experimental:
                type: boolean
              status:
                type: string
                enum:
                  - alpha
                  - beta
                  - deprecated
              provider:
                type: object
                properties:
                  npm:
                    type: string
                  api:
                    type: string
              options:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              headers:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: string
              variants:
                description: Variant-specific configuration
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: object
                  properties:
                    disabled:
                      description: Disable this variant for the model
                      type: boolean
                  additionalProperties: {}
    McpLocalConfig:
      type: object
      properties:
        type:
          description: Type of MCP server connection
          type: string
          const: local
        command:
          description: Command and arguments to run the MCP server
          type: array
          items:
            type: string
        environment:
          description: Environment variables to set when running the MCP server
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        cwd:
          description: Working directory for the MCP process
          type: string
        enabled:
          description: Enable or disable the MCP server on startup
          type: boolean
        timeout:
          description: >-
            Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds)
            if not specified.
          type: number
      required:
        - type
        - command
    McpRemoteConfig:
      type: object
      properties:
        type:
          description: Type of MCP server connection
          type: string
          const: remote
        url:
          description: URL of the remote MCP server
          type: string
        transport:
          description: Explicit transport; omitted tries HTTP then SSE
          type: string
          enum:
            - http
            - sse
        enabled:
          description: Enable or disable the MCP server on startup
          type: boolean
        headers:
          description: Headers to send with the request
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        oauth:
          description: >-
            OAuth authentication configuration for the MCP server. Set to false
            to disable OAuth auto-detection.
          anyOf:
            - $ref: '#/components/schemas/McpOAuthConfig'
            - type: boolean
              const: false
        timeout:
          description: >-
            Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds)
            if not specified.
          type: number
      required:
        - type
        - url
    LayoutConfig:
      description: '@deprecated Always uses stretch layout.'
      type: string
      enum:
        - auto
        - stretch
    PermissionConfig:
      anyOf:
        - type: object
          properties:
            __originalKeys:
              type: array
              items:
                type: string
            read:
              $ref: '#/components/schemas/PermissionRuleConfig'
            edit:
              $ref: '#/components/schemas/PermissionRuleConfig'
            glob:
              $ref: '#/components/schemas/PermissionRuleConfig'
            grep:
              $ref: '#/components/schemas/PermissionRuleConfig'
            list:
              $ref: '#/components/schemas/PermissionRuleConfig'
            bash:
              $ref: '#/components/schemas/PermissionRuleConfig'
            task:
              $ref: '#/components/schemas/PermissionRuleConfig'
            external_directory:
              $ref: '#/components/schemas/PermissionRuleConfig'
            todowrite:
              $ref: '#/components/schemas/PermissionActionConfig'
            question:
              $ref: '#/components/schemas/PermissionActionConfig'
            webfetch:
              $ref: '#/components/schemas/PermissionActionConfig'
            websearch:
              $ref: '#/components/schemas/PermissionActionConfig'
            codesearch:
              $ref: '#/components/schemas/PermissionActionConfig'
            lsp:
              $ref: '#/components/schemas/PermissionRuleConfig'
            doom_loop:
              $ref: '#/components/schemas/PermissionActionConfig'
            skill:
              $ref: '#/components/schemas/PermissionRuleConfig'
          additionalProperties:
            $ref: '#/components/schemas/PermissionRuleConfig'
        - $ref: '#/components/schemas/PermissionActionConfig'
    McpOAuthConfig:
      type: object
      properties:
        clientId:
          description: >-
            OAuth client ID. If not provided, dynamic client registration (RFC
            7591) will be attempted.
          type: string
        clientSecret:
          description: OAuth client secret (if required by the authorization server)
          type: string
        scope:
          description: OAuth scopes to request during authorization
          type: string
        redirectUri:
          description: >-
            OAuth redirect URI (default:
            http://127.0.0.1:19876/mcp/oauth/callback).
          type: string
    PermissionRuleConfig:
      anyOf:
        - $ref: '#/components/schemas/PermissionActionConfig'
        - $ref: '#/components/schemas/PermissionObjectConfig'
    PermissionActionConfig:
      type: string
      enum:
        - ask
        - allow
        - deny
    PermissionObjectConfig:
      type: object
      propertyNames:
        type: string
      additionalProperties:
        $ref: '#/components/schemas/PermissionActionConfig'

````

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