feat: add assistant bot with LLM integration and configuration
- Implemented the assistant bot with basic command handling and LLM routing. - Created configuration file for the assistant bot with personality, behavior, and LLM settings. - Added system prompt for the assistant bot to define its capabilities and limitations. - Developed registration script for creating Matrix bot users via Synapse admin API. - Introduced common development scripts for agent management (start, stop, list, logs). - Scaffolded new agent creation script to streamline the addition of new agents. - Implemented agent removal script to disable agents without deleting data.
This commit is contained in:
@@ -29,6 +29,24 @@ func Load(path string) (*AgentConfig, error) {
|
||||
return &cfg, nil
|
||||
}
|
||||
|
||||
// LoadMeta reads only the `agent:` block from a config file without expanding
|
||||
// env vars or running full validation. Used by agentctl list to show all
|
||||
// agents regardless of whether their env vars are configured.
|
||||
func LoadMeta(path string) (*AgentConfig, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read config %s: %w", path, err)
|
||||
}
|
||||
var cfg AgentConfig
|
||||
if err := yaml.Unmarshal(data, &cfg); err != nil {
|
||||
return nil, fmt.Errorf("parse config %s: %w", path, err)
|
||||
}
|
||||
if cfg.Agent.ID == "" {
|
||||
return nil, fmt.Errorf("agent.id is required")
|
||||
}
|
||||
return &cfg, nil
|
||||
}
|
||||
|
||||
// validate applies basic sanity checks.
|
||||
func validate(cfg *AgentConfig) error {
|
||||
if cfg.Agent.ID == "" {
|
||||
|
||||
Reference in New Issue
Block a user