Skip to content

Configuration

Asya supports two methods for setting parameters: environment variables and a configuration file named config.lua. The configuration file should be placed at $HOME/.config/asya/config.lua. All parameters have default values described in the configuration file, which are also hardcoded into the configuration logic. Therefore, if any parameter is omitted, Asya will issue a warning but will proceed with default values.

Currently, the following configuration parameters are available in Asya:

Configuration Parameters

TableFieldEnvironment VariableDefault ValueDescription
netws_portNET_WS_PORT3001Port for the WebSocket server.
netws_ipNET_WS_IP”127.0.0.1”IP address for the WebSocket server.
loggingplaceLOGGING_PLACEfalseFlag to include the filename where the logging method was invoked.
loggingfolderLOGGING_FOLDER”logs”Directory where logs will be stored.
loggingfilescountLOGGING_FILESCOUNT5Number of log files to retain.
logginglevelLOGGING_LEVEL”info”Logging level (e.g., “debug”, “info”, “warn”, “error”).
loggingstdoutLOGGING_STDOUTtrueFlag to enable logging output to the console (stdout).
aiprompts_pathAI_PROMPTS_PATH”./ai-prompts.yaml”Path to the AI prompts file.
aigroq_tokenAI_GROQ_TOKEN”NOT”Token for accessing the Groq API (command recognition and response generation).
pluginsplugins_folderPLUGINS_FOLDER”plugins”Directory containing plugins.
pluginsconfigPLUGINS_CONFIG-Plugin configuration represented as a dictionary.
open_appsterminalOPEN_APPS_TERMINAL-Path to the terminal to be opened.
open_appsbrowserOPEN_APPS_BROWSER-Path to the browser to be opened.

Parameter Details

  1. net:

    • These parameters configure the server’s network settings:
      • ws_port: Port on which the WebSocket server listens. Default is 3001.
      • ws_ip: IP address the WebSocket server binds to. Default is localhost (127.0.0.1).
  2. logging:

    • Logging configuration defines where and how system activity is logged:
      • place: Indicates whether the filename invoking the logging method should be included. For example:
        src/logging.rs:24: 2025-01-05 00:13:21 SERVER INFO >>> Logging level: DEBUG
      • folder: Directory for storing log files.
      • filescount: Number of log files retained in the folder (feature to be implemented).
      • level: Logging level such as info for general messages or debug for troubleshooting.
      • stdout: Indicates whether logs should be printed to the console.
  3. ai:

    • AI configuration parameters control the behavior of the AI system:
      • prompts_path: Path to the file with predefined AI interaction prompts.
      • groq_token: Token for accessing the Groq service.
  4. plugins:

    • Plugin parameters allow customization of plugin usage in the system:
      • plugins_folder: Directory containing plugins.
      • config: Dictionary specifying configurations for individual plugins.
  5. open_apps:

    • Settings for launching applications during startup:
      • terminal: Path to the terminal application.
      • browser: Path to the browser application.

Configuration Example

return {
net = {
ws_port = 8080,
ws_ip = "0.0.0.0"
},
logging = {
place = true,
folder = "/var/logs",
filescount = 10,
level = "debug",
stdout = true
},
ai = {
prompts_path = "./ai/prompts.yaml",
groq_token = "your_token_here"
},
plugins = {
plugins_folder = "./custom_plugins",
config = {
plugin1 = {
option1 = "value1",
option2 = "value2"
}
}
},
open_apps = {
terminal = "/usr/bin/gnome-terminal",
browser = "/usr/bin/firefox"
}
}