Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Prepare the config to accept new types of agents (#57)
Jaana Dogan6054a6f5476f
diff --git a/README.md b/README.mdindex 807c827..f922366 100644--- a/README.md+++ b/README.md@@ -221,8 +221,9 @@ health_check:interval: 30s# Remote agents to register on startup-remote_agents:- - id: "text-processing-agent"+agents:+ - type: "remote"+ id: "text-processing-agent"name: "Text Processing Agent"description: "An agent for text processing"address: "localhost:50051"diff --git a/cmd/gar/serve.go b/cmd/gar/serve.goindex f467ed3..f8e50bf 100644--- a/cmd/gar/serve.go+++ b/cmd/gar/serve.go@@ -131,11 +131,17 @@ func newControllerFromConfig(ctx context.Context, approval controller.ApprovalHareturn nil, err}- // Register remote agents from config- for _, agentCfg := range cfg.RemoteAgents {- if err := c.Registry().RegisterRemote(agentCfg); err != nil {- return nil, fmt.Errorf("failed to register remote agent %s: %w", agentCfg.ID, err)+ for _, agentCfg := range cfg.Agents {+ switch agentCfg.Type {+ case "remote":+ cfg := agentCfg.RemoteAgentConfig+ if err := c.Registry().RegisterRemote(cfg); err != nil {+ return nil, fmt.Errorf("failed to register remote agent %s: %w", cfg.ID, err)+ }+ default:+ return nil, fmt.Errorf("unknown agent type: %s", agentCfg.Type)}}+return c, nil}diff --git a/gar.yaml b/gar.yamlindex c93446f..e3deec9 100644--- a/gar.yaml+++ b/gar.yaml@@ -57,10 +57,11 @@ health_check:# Remote agents configuration (optional)# List of remote agents to register on startup.# Remote agents run as separate gRPC servers.-# remote_agents:-# - id: "python-agent"-# name: "Python Agent"-# description: "Python-based agent for text processing"+# agents:+# - type: "remote"+# id: "text-processing-agent"+# name: "Text Processing Agent"+# description: "An agent for text processing"# address: "localhost:50051"# metadata:-# version: "1.0"+# version: "1.0"diff --git a/internal/config/config.go b/internal/config/config.goindex aa25da0..c9ec9c1 100644--- a/internal/config/config.go+++ b/internal/config/config.go@@ -26,12 +26,17 @@ import (// Config represents the main configuration for GAR server.type Config struct {- Server ServerConfig `yaml:"server"`- EventLog EventLogConfig `yaml:"eventlog"`- MaxSteps int `yaml:"max_steps"` // Maximum steps per trigger- HealthCheck HealthCheckConfig `yaml:"health_check"`- Planner PlannerConfig `yaml:"planner,omitempty"`- RemoteAgents []RemoteAgentConfig `yaml:"remote_agents,omitempty"` // List of remote agents to register+ Server ServerConfig `yaml:"server"`+ EventLog EventLogConfig `yaml:"eventlog"`+ MaxSteps int `yaml:"max_steps"` // Maximum steps per trigger+ HealthCheck HealthCheckConfig `yaml:"health_check"`+ Planner PlannerConfig `yaml:"planner,omitempty"`+ Agents []Agent `yaml:"agents,omitempty"` // List of local agents to register+}++type Agent struct {+ Type string `yaml:"type"` // remote and more in the future...+ RemoteAgentConfig `yaml:",inline"`}// HealthCheckConfig defines the configuration for agent health checks.