Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

gar trigger --input cannot be optional

JBDd35385860ab7
diff --git a/README.md b/README.md
index c44e169..2bc01d2 100644
--- a/README.md
+++ b/README.md
@@ -107,17 +107,17 @@ The `gar` command provides several subcommands:
```bash
gar trigger \
+ --input <text> \
[--session-id <id>] \
- [--input <text>] \
[--checkpoint <uuid>] \
[--server <address>]
```
-Triggers a new agentic loop session or automatically resumes an existing one. If the session ID already exists, the session will be resumed from its last checkpoint (or a specific checkpoint if provided) with optional new inputs.
+Triggers a new agentic loop session or automatically resumes an existing one. If the session ID already exists, the session will be resumed from its last checkpoint (or a specific checkpoint if provided) with the new input.
Options:
+- `--input`: Input message to send to agents (required)
- `--session-id`: Unique session identifier (optional, generates UUID if not provided, or resumes if exists)
-- `--input`: Input message to send to agents
- `--checkpoint`: Resume from specific checkpoint (empty for latest)
- `--server`: gRPC controller server address (default: "localhost:8494")
diff --git a/cmd/gar/trigger.go b/cmd/gar/trigger.go
index dbdca15..ca4bedc 100644
--- a/cmd/gar/trigger.go
+++ b/cmd/gar/trigger.go
@@ -31,9 +31,10 @@ Use --checkpoint to resume from a specific checkpoint.`,
func init() {
triggerCmd.Flags().StringVar(&triggerSessionID, "session-id", "", "Session ID (optional, generates UUID if not provided)")
- triggerCmd.Flags().StringVar(&triggerInput, "input", "", "Input message to send")
+ triggerCmd.Flags().StringVar(&triggerInput, "input", "", "Input message to send (required)")
triggerCmd.Flags().StringVar(&triggerCheckpoint, "checkpoint", "", "Resume from specific checkpoint UUID (empty for latest)")
triggerCmd.Flags().StringVar(&triggerServerAddr, "server", "localhost:8494", "gRPC controller server address (default: localhost:8494)")
+ triggerCmd.MarkFlagRequired("input")
}
func runTrigger(cmd *cobra.Command, args []string) error {
@@ -46,16 +47,13 @@ func runTrigger(cmd *cobra.Command, args []string) error {
fmt.Printf("Triggering session: %s\n", triggerSessionID)
// Create input content
- var inputs []*proto.Content
- if triggerInput != "" {
- inputs = []*proto.Content{
- {
- Role: "user",
- Type: "text",
- Mimetype: "text/plain",
- Data: triggerInput,
- },
- }
+ inputs := []*proto.Content{
+ {
+ Role: "user",
+ Type: "text",
+ Mimetype: "text/plain",
+ Data: triggerInput,
+ },
}
// Setup signal handling for graceful shutdown