Configuration#

MoreComing soon

Enkaidu will look for and load a configuration file for setting its behavior and interaction with Large Language Models (LLMs) and MCP servers. The config file is written in YAML and can be either enkaidu.yml or enkaidu.yaml (but not both.) Enkaidu looks for the config file as followS:

  1. If Enkaidu is launched with --config=FILENAME option, then it will attempt to load that file and fail if unable to do so.
  2. Then it will look for the config file in the current directory.
  3. Lastly it will look for the config in your home directory.

This means you can keep a general purpose config in your home directory and project-specific ones in your project folders.

Configuration Sections#

  • Autoload Settings#

    Specifies when and which tools, toolsets, system prompts to enable / load when starting Enkaidu.

    • auto_load: Contains settings for automatically loading specific resources.
      • system_prompt (optional): Custom system prompt for the session - deprecated.
      • system_prompt_name: (optional) Specify the session’s system prompt by using the name of the system prompt template.
      • mcp_servers: (optional) List of MCP servers to automatically connect to on startup.
      • toolsets: (optional) List of toolsets to automatically load, where each toolset can be specified by name to load all tools, or as a map of name: and select: to specify the tools to load from the named toolset.
  • Session Settings#

    Manages user session-specific configurations, including model selection and auto-loading preferences. Some properties within this section are optional.

    • session: Configurations specific to a user session.
      • provider_type: (optional) Specifies the type of LLM provider to be used, such as openai or ollama. You never need this if you define llms, in which case you only need model property.
      • model: (optional) Defines the model used for the session, e.g., gpt4. When defining llms in the configuration, this can be the name of a model and there is no need for the above provide_type property.
      • streaming: Indicates whether streaming responses are supported. When disabled (default) the responses are formatted but take time to appear all at once.
      • input_history_file: (optional) Path to a file for saving input history.
  • LLM Providers#

    Specifies configurations related to Large Language Model providers, detailing which models to use and their respective settings.

    • llms: Defines the configuration for different LLM providers as a named map of LLM definitions where each can have the following properties.
      • provider: Type of provider, e.g., openai.
      • models: List of models supported by the provider, where each has the following properties:
        • name: Unique name for the model, which can be used with the session.model property.
        • model: The name of the model as defined by the provider
      • env: Environmental variables specific to the provider, essential for authentication and connection.
  • MCP Servers#

    Defines the configuration for MCP (Multiple Control Protocol) servers, enabling extended functionalities through server connections.

    • mcp_servers: Defines one or more MCP servers as a named map of server definitions where each can have the following properties. These can be auto-loaded (see session above) or you can load them using the /use_mcp command with the name in the config.
      • url: URL endpoint for the MCP server.
      • transport: (optional) The MCP protocol supports either http (modern) or legacy; default is auto which tries to pick the right one. For quick connectivity specify the transport.
      • bearer_auth_token: (optional) Token or API key required for authenticated access to the server that supports authentication.
  • Custom Prompts#

    • prompts: Define named custom parametrized prompt templates. These are auto-loaded when Enkaidu starts.
      • <prompt_name>:
        • description: A description of the prompt
        • arguments: This is a named map of aguments:
        • <arg_name>:
          • description: A description of the argument
        • template: The template is a string based on the Liquid templating language as implemented by the liquid.cr Crystal shard. The template is invoked with arguments as well as system and profile properties as follows:
        • Arguments are available with the arg. prefix
        • Profile variables are available with the var. prefix
        • System properties are available via the sys. prefix
  • System Prompts#

    • system_prompts: Define named system prompts as templates. These are auto-loaded when Enkaidu starts.
      • <prompt_name>:
        • description: An optional description of the prompt
        • template: The template is a string based on the Liquid templating language as implemented by the liquid.cr Crystal shard. The template is invoked with system and profile properties as follows:
        • Profile variables are available with the var. prefix
        • System properties are available via the sys. prefix
  • Macros#

    • macros: Define named macros that can be invoked using !<name>
      • <name>:
        • description: An description of the macro (required)
        • queries: An array of queries where each entry is treated as if the user typed in a query.
  • Debug Settings#

    Controls debug settings useful when trouble-shooting connectivity issues.

    • debug: Debug configuration applicable to the whole application.
      • trace_mcp: Enables tracing of MCP communication, useful for debugging purposes.
      • recording_file: (optional) Path to a file where session recordings are saved.