Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

Rename ATEAgent to SubstrateAgent (#362)

Jaana Dogan4f332b63879c
diff --git a/Makefile b/Makefile
index b73fb78..dc3615b 100644
--- a/Makefile
+++ b/Makefile
@@ -70,10 +70,6 @@ ax-image:
@echo "Building container image with ko..."
GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/ax
-ate-agent-image:
- @echo "Building ATE agent container image with ko..."
- GOFLAGS="-tags=ate" ko build --base-import-paths ./internal/experimental/examples/ate_agent
-
axepp-image:
@echo "Building axepp container image with ko..."
GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/axepp
@@ -84,4 +80,4 @@ ax-shell-image:
KO_DOCKER_REPO=$(KO_DOCKER_REPO)/ax-shell KO_DEFAULTBASEIMAGE=busybox:1.36 GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/ax
# Build all container images
-images: ax-image ate-agent-image axepp-image ax-shell-image
+images: ax-image axepp-image ax-shell-image
diff --git a/internal/cliutil/cliutil.go b/internal/cliutil/cliutil.go
index d8ff379..531047e 100644
--- a/internal/cliutil/cliutil.go
+++ b/internal/cliutil/cliutil.go
@@ -93,7 +93,7 @@ func NewControllerFromConfig(ctx context.Context, cfg *config.Config) (*controll
}
}
- for _, agentCfg := range cfg.Registry.ATEAgents {
+ for _, agentCfg := range cfg.Registry.SubstrateAgents {
if err := c.Registry().RegisterATE(ctx, cfg.ATE.Endpoint, agentCfg); err != nil {
return nil, fmt.Errorf("failed to register ATE agent %s: %w", agentCfg.ID, err)
}
diff --git a/internal/config/config.go b/internal/config/config.go
index 75db187..5769e75 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -37,8 +37,8 @@ type Config struct {
// RegistryConfig allows registring agents.
type RegistryConfig struct {
RemoteAgents []RemoteAgentConfig `yaml:"remote_agents,omitempty"`
- ColabAgents []ColabAgentConfig `yaml:"colab_agents,omitempty"`
- ATEAgents []ATEAgentConfig `yaml:"ate_agents,omitempty"`
+ ColabAgents []ColabAgentConfig `yaml:"colab_agents,omitempty"`
+ SubstrateAgents []SubstrateAgentConfig `yaml:"substrate_agents,omitempty"`
}
// ATEConfig configures the ATE integration.
@@ -111,8 +111,8 @@ type GeminiConfig struct {
Tools []string `json:"tools,omitempty" yaml:"tools,omitempty"`
}
-// ATEAgentConfig allows registering a new agent with an ATE actor template.
-type ATEAgentConfig struct {
+// SubstrateAgentConfig allows registering a new agent with an ATE actor template.
+type SubstrateAgentConfig struct {
ID string `yaml:"id"` // Unique agent identifier
Name string `yaml:"name"` // Human-readable name
Description string `yaml:"description"` // Description of agent capabilities
diff --git a/internal/controller/registry_ate.go b/internal/controller/registry_ate.go
index c38b4e6..938f5dc 100644
--- a/internal/controller/registry_ate.go
+++ b/internal/controller/registry_ate.go
@@ -26,7 +26,7 @@ import (
)
// RegisterATE registers an ATE agent by creating an ATE agent client.
-func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.ATEAgentConfig) error {
+func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.SubstrateAgentConfig) error {
r.mu.Lock()
defer r.mu.Unlock()
@@ -39,7 +39,7 @@ func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config
}
// Create ATE agent client
- ateAgent, err := expagent.NewATEAgent(ateTarget, expagent.ATEAgentConfig{
+ substrateAgent, err := expagent.NewSubstrateAgent(ateTarget, expagent.SubstrateAgentConfig{
ID: cfg.ID,
Namespace: cfg.Namespace,
Template: cfg.Template,
@@ -52,7 +52,7 @@ func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config
return fmt.Errorf("failed to create ATE agent: %w", err)
}
- r.agents[cfg.ID] = ateAgent
+ r.agents[cfg.ID] = substrateAgent
r.agentInfo[cfg.ID] = &agent.AgentInfo{
ID: cfg.ID,
Name: cfg.Name,
diff --git a/internal/controller/registry_noate.go b/internal/controller/registry_noate.go
index 2991ee7..9f37be5 100644
--- a/internal/controller/registry_noate.go
+++ b/internal/controller/registry_noate.go
@@ -24,6 +24,6 @@ import (
)
// RegisterATE returns an error stating that ATE support is not compiled in.
-func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.ATEAgentConfig) error {
+func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.SubstrateAgentConfig) error {
return fmt.Errorf("ATE support not compiled in; rebuild with -tags ate")
}
diff --git a/internal/experimental/agent/ate.go b/internal/experimental/agent/ate.go
index 09ae1cb..a547424 100644
--- a/internal/experimental/agent/ate.go
+++ b/internal/experimental/agent/ate.go
@@ -29,14 +29,14 @@ import (
"github.com/google/ax/proto"
)
-// ATEAgent manages execution in a SubstrATE actor.
-type ATEAgent struct {
+// SubstrateAgent manages execution in a SubstrATE actor.
+type SubstrateAgent struct {
ateClient *ate.Client
- config ATEAgentConfig
+ config SubstrateAgentConfig
}
-// ATEAgentConfig configures an ATE agent client.
-type ATEAgentConfig struct {
+// SubstrateAgentConfig configures an ATE agent client.
+type SubstrateAgentConfig struct {
ID string
Namespace string
Template string
@@ -46,8 +46,8 @@ type ATEAgentConfig struct {
Headers auth.Headers
}
-// NewATEAgent creates a new ATE agent client.
-func NewATEAgent(endpoint string, config ATEAgentConfig) (*ATEAgent, error) {
+// NewSubstrateAgent creates a new ATE agent client.
+func NewSubstrateAgent(endpoint string, config SubstrateAgentConfig) (*SubstrateAgent, error) {
if config.Port == 0 {
config.Port = 8494 // Default port
}
@@ -55,14 +55,14 @@ func NewATEAgent(endpoint string, config ATEAgentConfig) (*ATEAgent, error) {
if err != nil {
return nil, fmt.Errorf("failed to create ATE client: %w", err)
}
- return &ATEAgent{
+ return &SubstrateAgent{
ateClient: client,
config: config,
}, nil
}
// Connect handles processing of input content by creating an actor and delegating to RemoteAgent.
-func (a *ATEAgent) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, o agent.OutputHandler) error {
+func (a *SubstrateAgent) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, o agent.OutputHandler) error {
// 1. Create Actor
resp, err := a.ateClient.CreateActor(ctx, execID)
if err != nil {
@@ -120,7 +120,7 @@ func (a *ATEAgent) Connect(ctx context.Context, conversationID string, execID st
}
// Close gracefully shuts down the ATE agent connection.
-func (a *ATEAgent) Close() error {
+func (a *SubstrateAgent) Close() error {
if a.ateClient != nil {
return a.ateClient.Close()
}
diff --git a/internal/experimental/examples/ate_agent/README.md b/internal/experimental/examples/ate_agent/README.md
deleted file mode 100644
index dd863d2..0000000
--- a/internal/experimental/examples/ate_agent/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# ATE Agents
-
-ATE agents are experimental, they can be removed or significantly
-changed any time.
-
-## Setup
-
-To install the manifests on your Kubernetes cluster, run:
-
-```bash
-export PROJECT_ID="YOUR_PROJECT_ID"
-export GCE_REGION="us-central1"
-export BUCKET_NAME="ate-agent-snapshots"
-
-gcloud storage buckets create --project=${PROJECT_ID} --location=${GCE_REGION} "gs://${BUCKET_NAME}" --uniform-bucket-level-access
-
-kubectl apply -f manifest.yaml
-```
-
-## Run AX with ATE
-
-```bash
-kubectl port-forward -n ate-system service/api '35601:443'
-
-make install-ate && \
- ax --config-file ./internal/examples/ate_agent/ax.yaml --input "say hello world"
-```
diff --git a/internal/experimental/examples/ate_agent/ax.yaml b/internal/experimental/examples/ate_agent/ax.yaml
deleted file mode 100644
index 2b98a14..0000000
--- a/internal/experimental/examples/ate_agent/ax.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2026 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
- address: ":8494"
-
-# Event log configuration
-eventlog:
- sqlite:
- filename: "eventlog/log.sqlite"
-
-planner:
- gemini:
- model: "gemini-3-flash-preview"
- timeout: "60s"
-
-ate:
- endpoint: "localhost:35601"
-
-registry:
- ate_agents:
- - id: "hello-world"
- name: "Hello World"
- description: "Responds with 'Hello World'"
- port: 8494
- namespace: "ate-agent-example"
- template: "ate-agent-template"
diff --git a/internal/experimental/examples/ate_agent/main.go b/internal/experimental/examples/ate_agent/main.go
deleted file mode 100644
index a653557..0000000
--- a/internal/experimental/examples/ate_agent/main.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "fmt"
- "io"
- "log"
- "net"
-
- "google.golang.org/grpc"
-
- "github.com/google/ax/proto"
-)
-
-const port = ":50051"
-
-// server implements the AgentService gRPC server.
-type server struct {
- proto.UnimplementedAgentServiceServer
-}
-
-// Connect implements bidirectional streaming for agent processing.
-func (s *server) Connect(stream grpc.BidiStreamingServer[proto.AgentMessage, proto.AgentMessage]) error {
- for {
- incoming, err := stream.Recv()
- if err == io.EOF {
- return nil
- }
- if err != nil {
- return err
- }
-
- start := incoming.GetStart()
- if start == nil {
- continue
- }
-
- msg := &proto.Message{
- Role: "assistant",
- Content: &proto.Content{
- Type: &proto.Content_Text{
- Text: &proto.TextContent{
- Text: "Hello World",
- },
- },
- },
- }
-
- if err := stream.Send(&proto.AgentMessage{
- ConversationId: incoming.ConversationId,
- ExecId: incoming.ExecId,
- Type: &proto.AgentMessage_Outputs{
- Outputs: &proto.AgentOutputs{
- Messages: []*proto.Message{msg},
- },
- },
- }); err != nil {
- return err
- }
-
- // Send AgentEnd to signal end of outputs.
- if err := stream.Send(&proto.AgentMessage{
- ConversationId: incoming.ConversationId,
- ExecId: incoming.ExecId,
- Type: &proto.AgentMessage_End{
- End: &proto.AgentEnd{},
- },
- }); err != nil {
- return err
- }
- }
-}
-
-func main() {
- fmt.Printf("Listening on port: %s\n", port)
- lis, err := net.Listen("tcp", port)
- if err != nil {
- log.Fatalf("Failed to listen: %v", err)
- }
-
- grpcServer := grpc.NewServer()
- proto.RegisterAgentServiceServer(grpcServer, &server{})
-
- fmt.Println("\nATE Agent server is starting...")
- if err := grpcServer.Serve(lis); err != nil {
- log.Fatalf("Failed to serve: %v", err)
- }
-}
diff --git a/internal/experimental/examples/ate_agent/manifest.yaml b/internal/experimental/examples/ate_agent/manifest.yaml
deleted file mode 100644
index f06557e..0000000
--- a/internal/experimental/examples/ate_agent/manifest.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2026 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Namespace
-metadata:
- name: ate-agent-example
----
-apiVersion: ate.gke.io/v1alpha1
-kind: WorkerPool
-metadata:
- name: ate-agent-workerpool
- namespace: ate-agent-example
-spec:
- replicas: 10
- container:
- image: gcr.io/ax-container-images/ate_agent:latest
- ports:
- - containerPort: 50051
----
-apiVersion: ate.gke.io/v1alpha1
-kind: ActorTemplate
-metadata:
- name: ate-agent-template
- namespace: ate-agent-example
-spec:
- workerPoolRef:
- name: ate-agent-workerpool
- snapshotsConfig:
- location:
- bucket: ate-agent-snapshots
- folder: ate-agent-example