Skip to content

5. Configuration and Variables - HugAI v2 Specification

This section describes how to configure the system, agents, and key variables in the HugAI v2 protocol.


5.1. General Description

Configuration in HugAI v2 allows adapting the behavior of agents, clients, and the central system. It can be managed through files (JSON/YAML), environment variables, or runtime parameters.


5.2. Global and Environment Variables

Variable Type Description
governanceLevel string Governance level: autonomous, supervised, human-in-the-loop
workspaceFolders string[] Associated workspace folder paths
capabilities object Enabled capabilities for the agent or system
logging.level string Log level: error, warn, info, debug, trace
logging.path string Path to the log file
integration.tools object[] Integrated external tools
agentId string Unique identifier for the agent
agentSecret string Token/key for authentication (if applicable)
environment string Environment: development, staging, production

5.3. Example Configuration File (JSON)

{
  "agentId": "demo-agent-1",
  "governanceLevel": "supervised",
  "workspaceFolders": ["/project/demo"],
  "capabilities": {
    "code-generation": true,
    "testing": true,
    "refactoring": false
  },
  "logging": {
    "level": "info",
    "path": "./logs/agent.log"
  },
  "integration": {
    "tools": [
      { "name": "ci-pipeline", "enabled": true },
      { "name": "static-analysis", "enabled": false }
    ]
  },
  "environment": "development"
}

5.4. Key Parameters

  • governanceLevel: Defines the degree of human intervention. Typical values:
  • autonomous: The agent acts without human intervention.
  • supervised: Requires reviews or approvals at critical points.
  • human-in-the-loop: Every relevant action requires human approval.

  • workspaceFolders: Working directories operated on by the agent.

  • capabilities: Enabled functionalities (e.g., code-generation, testing, refactoring).

  • logging: Log configuration for auditing and debugging.

  • integration.tools: External tools available to the agent.

  • agentId / agentSecret: Identifiers and credentials for authentication and traceability.

  • environment: Allows adapting behavior according to the environment (development, production, etc.).


5.5. Best Practices for Configuration Management

  • Use versioned and validated configuration files.
  • Separate sensitive credentials (e.g., agentSecret) using environment variables.
  • Document all parameters and possible values.
  • Validate configuration at startup and upon dynamic changes.
  • Allow parameter overrides via command line or environment variables.
  • Keep configuration modular to facilitate extension and customization.

Note: Configuration may evolve according to the needs of the system and agents. It is recommended to maintain backward compatibility and document changes.