Documentation
¶
Overview ¶
Package config loads the Agent Runtime configuration from a YAML file (server / db / memory sections) with environment-variable overrides. The YAML layout mirrors the XiaoQinglong agent-frame config so operators can reuse familiar conventions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolvePath ¶
ResolvePath returns the exact configuration path used by Load.
Types ¶
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
DB DBConfig `yaml:"db"`
Memory MemoryConfig `yaml:"memory"`
Sandbox SandboxConfig `yaml:"sandbox"`
Skills SkillsConfig `yaml:"skills"`
}
Config is the root configuration.
type DBConfig ¶
type DBConfig struct {
Enabled bool `yaml:"enabled"`
DBType string `yaml:"db_type"`
Username string `yaml:"username"`
Password string `yaml:"password"`
DBHost string `yaml:"db_host"`
DBPort int `yaml:"db_port"`
DBName string `yaml:"db_name"`
SSLMode string `yaml:"ssl_mode"`
MaxOpenConn int `yaml:"max_open_conn"`
MaxIdleConn int `yaml:"max_idle_conn"`
ConnMaxLifetime int `yaml:"conn_max_lifetime"` // seconds
LogMode int `yaml:"log_mode"`
}
DBConfig configures the PostgreSQL connection (gorm).
type MemoryConfig ¶
type MemoryConfig struct {
Enabled bool `yaml:"enabled"`
AutoMigrate bool `yaml:"auto_migrate"`
BackgroundReview bool `yaml:"background_review"`
MaxReviewMemory int `yaml:"max_review_memory"`
InjectIntoPrompt bool `yaml:"inject_into_prompt"`
}
MemoryConfig configures the memory module behaviour.
type ModelConfig ¶
type ModelConfig struct {
Provider string `yaml:"provider"`
Name string `yaml:"name"`
APIKey string `yaml:"api_key"`
APIBase string `yaml:"api_base"`
}
ModelConfig is the default model used when a request omits models.
type SandboxConfig ¶
type SandboxConfig struct {
DefaultImage string `yaml:"default_image"`
PptxImage string `yaml:"pptx_image"`
Workdir string `yaml:"workdir"`
TimeoutMs int `yaml:"timeout_ms"`
}
SandboxConfig holds operator-tunable defaults for skill sandbox execution. Per-request Sandbox settings still take precedence when provided.
type ServerConfig ¶
type ServerConfig struct {
GRPCAddr string `yaml:"grpc_addr"`
HTTPAddr string `yaml:"http_addr"`
Model ModelConfig `yaml:"default_model"`
}
ServerConfig holds listen addresses and default model settings.
type SkillsConfig ¶
type SkillsConfig struct {
Dir string `yaml:"dir"` // overrides skill discovery directory
ConfigPath string `yaml:"config_path"` // skills-config.yaml path
GlobalDir string `yaml:"global_dir"` // additional skills directory to scan
}
SkillsConfig configures where skills and skill config are located.