> ## 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 runtime config

> Retrieve the current session-scoped runtime config blob and effective view.



## OpenAPI

````yaml /openapi.json get /session/{sessionID}/runtime-config
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /session/{sessionID}/runtime-config:
    get:
      tags:
        - Session
      summary: Get runtime config
      description: >-
        Retrieve the current session-scoped runtime config blob and effective
        view.
      operationId: session.runtimeConfig.get
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
        - in: path
          name: sessionID
          schema:
            type: string
            pattern: ^ses.*
          required: true
      responses:
        '200':
          description: Runtime config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionRuntimeConfigView'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.session.runtimeConfig.get({
              ...
            })
components:
  schemas:
    SessionRuntimeConfigView:
      type: object
      properties:
        sessionID:
          type: string
          pattern: ^ses.*
        runtimeConfig:
          $ref: '#/components/schemas/RuntimeConfig'
        effective:
          $ref: '#/components/schemas/SessionRuntimeConfigEffective'
      required:
        - sessionID
        - runtimeConfig
        - effective
    BadRequestError:
      type: object
      properties:
        data: {}
        errors:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        success:
          type: boolean
          const: false
      required:
        - data
        - errors
        - success
    NotFoundError:
      type: object
      properties:
        name:
          type: string
          const: NotFoundError
        data:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - name
        - data
    RuntimeConfig:
      type: object
      properties:
        systemPrompt:
          anyOf:
            - type: string
            - type: object
              properties:
                type:
                  type: string
                  const: preset
                preset:
                  type: string
                  enum:
                    - default
                    - none
                append:
                  type: string
              required:
                - type
                - preset
        appendSystemPrompt:
          type: string
        model:
          type: object
          properties:
            providerID:
              type: string
            modelID:
              type: string
          required:
            - providerID
            - modelID
        effort:
          type: string
          enum:
            - low
            - medium
            - high
            - max
        thinkingConfig:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  const: adaptive
              required:
                - type
            - type: object
              properties:
                type:
                  type: string
                  const: disabled
              required:
                - type
            - type: object
              properties:
                type:
                  type: string
                  const: enabled
                budgetTokens:
                  type: integer
                  minimum: 1024
                  maximum: 9007199254740991
              required:
                - type
                - budgetTokens
        compaction:
          type: object
          properties:
            auto:
              type: boolean
            includeFiles:
              type: boolean
        includeEnvironment:
          type: boolean
        maxTurns:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        maxBudgetUsd:
          type: number
          exclusiveMinimum: 0
        permissionMode:
          $ref: '#/components/schemas/RuntimeConfigPermissionMode'
        canUseTool:
          type: boolean
        autoPermissionClassifierModel:
          type: object
          properties:
            providerID:
              type: string
            modelID:
              type: string
          required:
            - providerID
            - modelID
        allowedTools:
          type: array
          items:
            type: string
        disallowedTools:
          type: array
          items:
            type: string
        settingSources:
          type: array
          items:
            type: string
            enum:
              - user
              - project
              - local
        agents:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/RuntimeAgentDefinition'
        skills:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeSkillDefinition'
        commands:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeCommandDefinition'
        plugins:
          type: array
          items:
            $ref: '#/components/schemas/RuntimePluginSpec'
        hooks:
          type: object
          propertyNames:
            $ref: '#/components/schemas/RuntimeConfigHookEventName'
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/RuntimeConfigHookDescriptor'
        sdkMcpServers:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeMcpServer'
        enableToolSearch:
          anyOf:
            - type: boolean
            - type: string
              const: auto
            - type: string
              const: always
            - type: string
              const: never
        enableFileCheckpointing:
          type: boolean
        outputFormat:
          $ref: '#/components/schemas/OutputFormatJsonSchema'
        backgroundTaskPolicy:
          type: object
          properties:
            mode:
              type: string
              const: foreground
          required:
            - mode
          additionalProperties: false
        checkpointing:
          type: object
          properties:
            enabled:
              type: boolean
            beforeTools:
              type: boolean
            beforeCompaction:
              type: boolean
          additionalProperties: false
    SessionRuntimeConfigEffective:
      type: object
      properties:
        model:
          type: object
          properties:
            providerID:
              type: string
            modelID:
              type: string
          required:
            - providerID
            - modelID
        maxTurns:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        maxBudgetUsd:
          type: number
          exclusiveMinimum: 0
        permissionMode:
          $ref: '#/components/schemas/RuntimeConfigPermissionMode'
        autoPermissionClassifierModel:
          type: object
          properties:
            providerID:
              type: string
            modelID:
              type: string
          required:
            - providerID
            - modelID
        canUseTool:
          type: object
          properties:
            registered:
              type: boolean
          required:
            - registered
        hooks:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              count:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - count
        systemPrompt:
          type: object
          properties:
            mode:
              type: string
              enum:
                - default
                - custom
                - preset
            preset:
              type: string
            hasAppend:
              type: boolean
          required:
            - mode
            - hasAppend
        appendSystemPrompt:
          type: object
          properties:
            length:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - length
        settingSources:
          type: array
          items:
            type: string
            enum:
              - user
              - project
              - local
        tools:
          type: object
          properties:
            allowed:
              type: array
              items:
                type: string
            disallowed:
              type: array
              items:
                type: string
          required:
            - allowed
            - disallowed
        agents:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              description:
                type: string
              spawnMode:
                type: string
                enum:
                  - fresh
                  - inherit
              hasModel:
                type: boolean
              toolCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              disallowedToolCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              mcpServerCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              steps:
                type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
            required:
              - spawnMode
              - hasModel
              - toolCount
              - disallowedToolCount
              - mcpServerCount
        skills:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              source:
                type: string
                enum:
                  - runtime
                  - plugin
              pluginName:
                type: string
            required:
              - name
              - source
        commands:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              source:
                type: string
                enum:
                  - runtime
                  - plugin
                  - skill
              pluginName:
                type: string
            required:
              - name
              - source
        plugins:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              source:
                type: string
                enum:
                  - inline
                  - claude
              skillCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              commandCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              agentCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              hookEventCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              mcpServerCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              diagnostics:
                type: array
                items:
                  type: string
            required:
              - name
              - source
              - skillCount
              - commandCount
              - agentCount
              - hookEventCount
              - mcpServerCount
      required:
        - systemPrompt
        - settingSources
        - tools
        - agents
        - skills
        - commands
        - plugins
    RuntimeConfigPermissionMode:
      type: string
      enum:
        - default
        - acceptEdits
        - dontAsk
        - plan
        - bypassPermissions
        - auto
    RuntimeAgentDefinition:
      type: object
      properties:
        prompt:
          type: string
          minLength: 1
        description:
          type: string
        model:
          type: object
          properties:
            providerID:
              type: string
              minLength: 1
            modelID:
              type: string
              minLength: 1
          required:
            - providerID
            - modelID
        tools:
          type: array
          items:
            type: string
        disallowedTools:
          type: array
          items:
            type: string
        permissionMode:
          $ref: '#/components/schemas/RuntimeConfigPermissionMode'
        mcpServers:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/RuntimeRemoteMcpServer'
              - $ref: '#/components/schemas/RuntimeLocalMcpServer'
        steps:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        temperature:
          type: number
        spawnMode:
          type: string
          enum:
            - fresh
            - inherit
      required:
        - prompt
    RuntimeSkillDefinition:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        content:
          type: string
        baseDir:
          type: string
        allowedTools:
          type: array
          items:
            type: string
        model:
          anyOf:
            - type: string
            - type: object
              properties:
                providerID:
                  type: string
                modelID:
                  type: string
              required:
                - providerID
                - modelID
        disableModelInvocation:
          type: boolean
      required:
        - name
        - description
        - content
    RuntimeCommandDefinition:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        template:
          type: string
        agent:
          type: string
        model:
          type: string
        subtask:
          type: boolean
        allowedTools:
          type: array
          items:
            type: string
        disallowedTools:
          type: array
          items:
            type: string
      required:
        - name
        - template
    RuntimePluginSpec:
      anyOf:
        - $ref: '#/components/schemas/RuntimeInlinePlugin'
        - $ref: '#/components/schemas/RuntimeClaudePlugin'
    RuntimeConfigHookDescriptor:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        matcher:
          type: string
        matcherFlags:
          type: string
        timeoutMs:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        async:
          type: boolean
      required:
        - id
    RuntimeMcpServer:
      anyOf:
        - $ref: '#/components/schemas/RuntimeRemoteMcpServer'
        - $ref: '#/components/schemas/RuntimeLocalMcpServer'
        - $ref: '#/components/schemas/RuntimeDirectSdkMcpServer'
    OutputFormatJsonSchema:
      type: object
      properties:
        type:
          type: string
          const: json_schema
        schema:
          $ref: '#/components/schemas/JSONSchema'
        retryCount:
          default: 2
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - type
        - schema
    RuntimeRemoteMcpServer:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        type:
          type: string
          const: remote
        url:
          type: string
          format: uri
        enabled:
          type: boolean
        headers:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        oauth:
          type: boolean
          const: false
        timeout:
          type: number
          exclusiveMinimum: 0
        transport:
          type: string
          enum:
            - http
            - sse
        ownership:
          description: SDK-owned HTTP host; reattach when forking a session.
          type: string
          const: sdk
      required:
        - name
        - type
        - url
    RuntimeLocalMcpServer:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        type:
          type: string
          const: local
        command:
          minItems: 1
          type: array
          items:
            type: string
            minLength: 1
        environment:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        cwd:
          type: string
          minLength: 1
        enabled:
          type: boolean
        timeout:
          type: number
          exclusiveMinimum: 0
      required:
        - name
        - type
        - command
    RuntimeInlinePlugin:
      type: object
      properties:
        type:
          type: string
          const: inline
        name:
          type: string
        description:
          type: string
        version:
          type: string
        skills:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeSkillDefinition'
        commands:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeCommandDefinition'
        agents:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/RuntimeAgentDefinition'
        hooks:
          type: object
          propertyNames:
            $ref: '#/components/schemas/RuntimeConfigHookEventName'
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/RuntimeConfigHookDescriptor'
        mcpServers:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeMcpServer'
      required:
        - type
        - name
    RuntimeClaudePlugin:
      type: object
      properties:
        type:
          type: string
          const: claude
        path:
          type: string
      required:
        - type
        - path
    RuntimeDirectSdkMcpServer:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        type:
          type: string
          const: sdk
        transport:
          type: string
          const: direct
        enabled:
          type: boolean
        timeout:
          type: number
          exclusiveMinimum: 0
        tools:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeDirectSdkMcpTool'
      required:
        - name
        - type
        - transport
        - tools
    JSONSchema:
      type: object
      propertyNames:
        type: string
      additionalProperties: {}
    RuntimeDirectSdkMcpTool:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        inputSchema:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        metadata:
          type: object
          properties:
            searchHint:
              type: string
            alwaysLoad:
              type: boolean
        annotations:
          type: object
          properties:
            readOnly:
              type: boolean
            destructive:
              type: boolean
            idempotent:
              type: boolean
            openWorld:
              type: boolean
      required:
        - name
        - inputSchema

````

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