Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

go fmt ./... (#254)

Jaana Dogan17718da5717c
diff --git a/cmd/ax/exec.go b/cmd/ax/exec.go
index 56a1b31..ba14e17 100644
--- a/cmd/ax/exec.go
+++ b/cmd/ax/exec.go
@@ -38,7 +38,7 @@ var (
execServerAddr string
execConfigFile string
execResume bool // allow resuming an execution without inputs
- execLastSeq int32
+ execLastSeq int32
)
var execCmd = &cobra.Command{
@@ -138,7 +138,7 @@ func execLoop(ctx context.Context, id string, agentID string, input string, last
ConversationId: id,
AgentId: agentID,
Inputs: inputs,
- LastSeq: lastSeq,
+ LastSeq: lastSeq,
})
lastSeq = 0 // disable resuming from sequence, user sees the seq on the screen
if err != nil {
diff --git a/cmd/ax/internal/display.go b/cmd/ax/internal/display.go
index 326d661..e9ecdc3 100644
--- a/cmd/ax/internal/display.go
+++ b/cmd/ax/internal/display.go
@@ -45,12 +45,12 @@ type Display struct {
func NewDisplay(id string) *Display {
return &Display{
- id: id,
- userStyle: lipgloss.NewStyle().Foreground(purple),
+ id: id,
+ userStyle: lipgloss.NewStyle().Foreground(purple),
checkpointStyle: lipgloss.NewStyle().Foreground(comment),
- idStyle: lipgloss.NewStyle().Foreground(comment),
- resumeStyle: lipgloss.NewStyle().Foreground(comment),
- loadingStopCh: make(chan bool),
+ idStyle: lipgloss.NewStyle().Foreground(comment),
+ resumeStyle: lipgloss.NewStyle().Foreground(comment),
+ loadingStopCh: make(chan bool),
}
}
@@ -123,4 +123,4 @@ func (d *Display) PromptForInput() (string, error) {
func (d *Display) ShowResumption(id string) {
fmt.Println(d.resumeStyle.Render("To resume the conversation,"))
fmt.Println(d.resumeStyle.Render(fmt.Sprintf("ax exec --conversation %s", id)))
-}
\ No newline at end of file
+}
diff --git a/cmd/ax/serve.go b/cmd/ax/serve.go
index 3d5d1f4..fb35f90 100644
--- a/cmd/ax/serve.go
+++ b/cmd/ax/serve.go
@@ -80,4 +80,3 @@ func runServe(cmd *cobra.Command, args []string) error {
return nil
}
-
diff --git a/cmd/ax/trace.go b/cmd/ax/trace.go
index a0cd4e3..b2b5c18 100644
--- a/cmd/ax/trace.go
+++ b/cmd/ax/trace.go
@@ -30,7 +30,6 @@ import (
"github.com/spf13/cobra"
)
-
var (
conversationID string
traceServerAddr string
@@ -75,7 +74,6 @@ func runTrace(cmd *cobra.Command, args []string) error {
return serveTraceUI(listener, data, indexHTML)
}
-
type Text struct {
Text string `json:"text"`
}
@@ -244,8 +242,6 @@ func extractExecutionEvent(execID string, protoEv *proto.ExecutionEvent) Executi
return ev
}
-
-
func openBrowser(url string) {
var err error
switch runtime.GOOS {
diff --git a/cmd/ax/trace_test.go b/cmd/ax/trace_test.go
index e9f3fc2..9e815f3 100644
--- a/cmd/ax/trace_test.go
+++ b/cmd/ax/trace_test.go
@@ -23,7 +23,7 @@ import (
func TestBuildExecTraces_PreservesOrderOfExecIDs(t *testing.T) {
rootExecID := "root-exec"
execIDs := []string{"root-exec", "child-exec-1", "child-exec-2"}
-
+
// Events arrive in arbitrary order
events := []*proto.ExecutionEvent{
{ExecId: "child-exec-2"},
diff --git a/internal/controller/controller.go b/internal/controller/controller.go
index a5f8fa2..788e6d1 100644
--- a/internal/controller/controller.go
+++ b/internal/controller/controller.go
@@ -234,9 +234,9 @@ func (d *Controller) execute(ctx context.Context, conversationID string, execID
return err
}
state, err := e.Exec(ctx, conversationID, execID, &proto.AgentStart{
- AgentId: agentID,
+ AgentId: agentID,
AgentConfig: agentConfig,
- Messages: append(history, newInputs...),
+ Messages: append(history, newInputs...),
}, outputCapturer)
if err != nil {
return err
diff --git a/internal/controller/registry.go b/internal/controller/registry.go
index 942144d..e09b933 100644
--- a/internal/controller/registry.go
+++ b/internal/controller/registry.go
@@ -23,8 +23,6 @@ import (
"github.com/google/ax/internal/config"
)
-
-
// AgentInfo contains metadata about a registered agent.
type AgentInfo struct {
ID string