Agent Executor (AX) is Google's open agentic orchestration runtime
Go
refactor: rename CLI flags to --config and --ax-config for improved command naming consistency
Jaana Dogan701feadd055b
diff --git a/README.md b/README.mdindex 859b46a..d49d832 100644--- a/README.md+++ b/README.md@@ -170,7 +170,6 @@ any registered harness:```bashax exec \- --harness antigravity \--input "Can you write me a simple HTTP server in Python?"```@@ -179,7 +178,6 @@ you can resume an incomplete execution in a conversation:```bashax exec \--conversation edf98ef5-4bb1-4a9e-a091-3a77e03727e6 \- --harness antigravity \--resume```@@ -195,10 +193,10 @@ ax exec \[--input <text>] \[--conversation <id>] \[--harness <id>] \- [--harness-config <file.json>] \- [--harness-config-json <json>] \+ [--config <file.json>] \+ [--config-json <json>] \[--server <address>] \- [--config <file>] \+ [--ax-config <file>] \[--resume] \[--last-seq <number>]```@@ -209,10 +207,10 @@ Options:- `--input`: Input message to send to agents (optional if `--resume` is set, otherwise required)- `--conversation`: Conversation ID (optional, generates UUID if not provided, or resumes if exists)- `--harness`: Harness ID to use (optional, defaults to the default harness)-- `--harness-config`: Path to a JSON file with per-request harness configuration (optional)-- `--harness-config-json`: Per-request harness configuration as an inline JSON string (optional, mutually exclusive with `--harness-config`)+- `--config`: Path to a JSON file with per-request harness configuration (optional)+- `--config-json`: Per-request harness configuration as an inline JSON string (optional, mutually exclusive with `--config`)- `--server`: gRPC controller server address (optional. If not provided, runs with a local built-in AX server)-- `--config`: Path to YAML configuration file (only used with a local built-in AX server, default: "ax.yaml")+- `--ax-config`: Path to YAML configuration file (only used with a local built-in AX server, default: "ax.yaml")- `--resume`: Resume a conversation without inputs (optional, mutually exclusive with `--input`)- `--last-seq`: Last sequence number seen by the client to resume from (optional). The server replays any later events so the client can catch up after a disconnect.@@ -228,16 +226,13 @@ ax exec --conversation a53d4db3-1165-4925-87da-be6c72bbdeb1 --input "Ok, now let# Execute using server modeax exec --server localhost:8494 --input "Hello agents!"-# Execute using a specific harness-ax exec --harness antigravity --input "Write me a cool Go program!"-# Execute with per-request harness configax exec \- --harness-config-json '{"system_instructions":"Answer in one sentence.","model":"gemini-3.5-flash"}' \+ --config-json '{"system_instructions":"Answer in one sentence.","model":"gemini-3.5-flash"}' \--input "Explain durable execution."-# To keep the same JSON in a file, use `--harness-config` instead:-ax exec --harness-config antigravity.json --input "Explain durable execution."+# To keep the same JSON in a file, use `--config` instead:+ax exec --config antigravity.json --input "Explain durable execution."```### Servediff --git a/cmd/ax/exec.go b/cmd/ax/exec.goindex 947b6b1..d24ec9e 100644--- a/cmd/ax/exec.go+++ b/cmd/ax/exec.go@@ -57,15 +57,15 @@ If no conversation ID is provided, a new UUID will be generated.`,func init() {execCmd.Flags().StringVar(&execConversationID, "conversation", "", "Conversation ID (optional, generates UUID if not provided)")execCmd.Flags().StringVar(&execHarnessID, "harness", "", "Harness ID (optional, default harness is used if not specified)")- execCmd.Flags().StringVar(&execHarnessConfig, "harness-config", "", "Path to a JSON file with per-request harness configuration")- execCmd.Flags().StringVar(&execHarnessConfigJSON, "harness-config-json", "", "Per-request harness configuration as an inline JSON string (mutually exclusive with --harness-config)")+ execCmd.Flags().StringVar(&execHarnessConfig, "config", "", "Path to a JSON file with per-request harness configuration")+ execCmd.Flags().StringVar(&execHarnessConfigJSON, "config-json", "", "Per-request harness configuration as an inline JSON string (mutually exclusive with --config)")execCmd.Flags().StringVar(&execInput, "input", "", "Input message to send (optional)")execCmd.Flags().StringVar(&execServerAddr, "server", "", "gRPC controller server address (if specified, connects to remote server; otherwise runs with a local built-in AX server)")- execCmd.Flags().StringVar(&execConfigFile, "config", "ax.yaml", "Path to YAML configuration file (only used with a local built-in AX server)")+ execCmd.Flags().StringVar(&execConfigFile, "ax-config", "ax.yaml", "Path to YAML configuration file (only used with a local built-in AX server)")execCmd.Flags().BoolVar(&execResume, "resume", false, "Resume a conversation without inputs")execCmd.Flags().Int32Var(&execLastSeq, "last-seq", 0, "Last sequence number seen by the client")execCmd.MarkFlagsMutuallyExclusive("input", "resume")- execCmd.MarkFlagsMutuallyExclusive("harness-config", "harness-config-json")+ execCmd.MarkFlagsMutuallyExclusive("config", "config-json")}// TODO(jbd): Add multimodal input flags, e.g. --input-image.diff --git a/cmd/ax/main.go b/cmd/ax/main.goindex ee65c4a..c87d8b9 100644--- a/cmd/ax/main.go+++ b/cmd/ax/main.go@@ -64,7 +64,9 @@ const currentVersion = "v1alpha"func newConfig(cmd *cobra.Command, configFile string) (*cliutil.Config, error) {cfg, err := cliutil.LoadFromFile(configFile)- if errors.Is(err, os.ErrNotExist) && !cmd.Flags().Changed("config") {+ configFlagChanged := (cmd.Flags().Lookup("ax-config") != nil && cmd.Flags().Changed("ax-config")) ||+ (cmd.Flags().Lookup("config") != nil && cmd.Flags().Changed("config") && cmd.Flags().Lookup("ax-config") == nil)+ if errors.Is(err, os.ErrNotExist) && !configFlagChanged {cfg := cliutil.DefaultConfig()cfg.Version = currentVersionreturn cfg, nil