Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Use JSON encoding for agent configuration (#252)
Jaana Dogan5dc999316a86
diff --git a/Makefile b/Makefileindex b07f855..0440813 100644--- a/Makefile+++ b/Makefile@@ -24,13 +24,6 @@ proto:proto/ax.proto proto/content.proto@echo "Protobuf generation complete!"- @echo "Generating testagent protobuf code..."- @export PATH=$$PATH:$$(go env GOPATH)/bin && \- protoc --go_out=. --go_opt=paths=source_relative \- --go-grpc_out=. --go-grpc_opt=paths=source_relative \- internal/testagent/proto/testagent.proto- @echo "Protobuf generation complete!"-# Run teststest:@echo "Running tests..."diff --git a/internal/cliutil/cliutil.go b/internal/cliutil/cliutil.goindex 913c66f..193b694 100644--- a/internal/cliutil/cliutil.go+++ b/internal/cliutil/cliutil.go@@ -23,8 +23,6 @@ import ("github.com/google/ax/internal/config""github.com/google/ax/internal/controller""github.com/google/ax/internal/controller/executor"- "github.com/google/ax/proto"- "google.golang.org/protobuf/types/known/durationpb")// NewControllerFromConfig creates a new Controller instance based on the provided configuration.@@ -55,10 +53,10 @@ func NewControllerFromConfig(ctx context.Context, cfg *config.Config) (*controllreturn nil, fmt.Errorf("failed to parse duration: %v", err)}return controller.NewGeminiPlannerAgent(ctx, r, controller.GeminiPlannerConfig{- GeminiConfig: &proto.GeminiConfig{+ GeminiConfig: &config.GeminiConfig{Model: cfg.Planner.Gemini.Model,MaxTokens: cfg.Planner.Gemini.MaxTokens,- Timeout: durationpb.New(timeout),+ Timeout: timeout,SystemPrompt: cfg.Planner.Gemini.SystemPrompt,},SkillsDir: cfg.Planner.Gemini.SkillsDir,diff --git a/internal/config/config.go b/internal/config/config.goindex cdd2b65..16226b8 100644--- a/internal/config/config.go+++ b/internal/config/config.go@@ -18,6 +18,7 @@ package configimport ("fmt""os"+ "time""github.com/google/ax/internal/agent""gopkg.in/yaml.v3"@@ -61,8 +62,8 @@ type EventLogConfig struct {// PlannerConfig configures the planner.type PlannerConfig struct {- Type string `yaml:"type"` // "gemini" or "antigravity"- Gemini GeminiPlannerConfig `yaml:"gemini,omitempty"`+ Type string `yaml:"type"` // "gemini" or "antigravity"+ Gemini GeminiPlannerConfig `yaml:"gemini,omitempty"`Antigravity AntigravityPlannerConfig `yaml:"antigravity,omitempty"`}@@ -91,6 +92,24 @@ type GeminiPlannerConfig struct {SkillsDir string `yaml:"skills_dir,omitempty"` // Directory to discover skills from}+func (c *GeminiPlannerConfig) setDefaults() {+ if c.Model == "" {+ c.Model = "gemini-3-flash-preview"+ }+ if c.Timeout == "" {+ c.Timeout = "30s"+ }+}++// GeminiConfig is the configuration for a Gemini agent execution.+type GeminiConfig struct {+ Model string `json:"model,omitempty" yaml:"model,omitempty"`+ SystemPrompt string `json:"system_prompt,omitempty" yaml:"system_prompt,omitempty"`+ MaxTokens int32 `json:"max_tokens,omitempty" yaml:"max_tokens,omitempty"`+ Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"`+ Tools []string `json:"tools,omitempty" yaml:"tools,omitempty"`+}+// ATEAgentConfig allows registering a new agent with an ATE actor template.type ATEAgentConfig struct {ID string `yaml:"id"` // Unique agent identifier@@ -188,6 +207,9 @@ func (c *Config) setDefaults() {if c.Planner.Type == "" {c.Planner.Type = "gemini"}+ if c.Planner.Type == "gemini" {+ c.Planner.Gemini.setDefaults()+ }if c.Planner.Type == "antigravity" {c.Planner.Antigravity.setDefaults()}diff --git a/internal/controller/gemini.go b/internal/controller/gemini.goindex 4b2d131..2b4747b 100644--- a/internal/controller/gemini.go+++ b/internal/controller/gemini.go@@ -16,18 +16,19 @@ package controllerimport ("context"+ "encoding/json""errors""fmt""os/exec""runtime""strings"+ "time"- "github.com/golang/protobuf/ptypes/duration""github.com/google/ax/internal/agent"+ "github.com/google/ax/internal/config""github.com/google/ax/internal/skills""github.com/google/ax/proto""google.golang.org/genai"- pb "google.golang.org/protobuf/proto""google.golang.org/protobuf/types/known/structpb")@@ -40,16 +41,16 @@ func NewGeminiAgent() *GeminiAgent {return &GeminiAgent{}}-func (a *GeminiAgent) config(start *proto.AgentStart) (*proto.GeminiConfig, error) {+func (a *GeminiAgent) config(start *proto.AgentStart) (*config.GeminiConfig, error) {if len(start.AgentConfig) == 0 {- return &proto.GeminiConfig{+ return &config.GeminiConfig{Model: "gemini-3-flash-preview",- Timeout: &duration.Duration{Seconds: 30},+ Timeout: 30 * time.Second,}, nil}- var cfg proto.GeminiConfig- if err := pb.Unmarshal(start.AgentConfig, &cfg); err != nil {+ var cfg config.GeminiConfig+ if err := json.Unmarshal(start.AgentConfig, &cfg); err != nil {return nil, fmt.Errorf("failed to unmarshal Gemini config: %w", err)}return &cfg, nil@@ -68,7 +69,11 @@ func (a *GeminiAgent) Connect(ctx context.Context, conversationID string, execIDinputs := start.Messagescontents := protoToContents(inputs)- ctx, cancel := context.WithTimeout(ctx, cfg.Timeout.AsDuration())+ timeout := 30 * time.Second+ if cfg.Timeout != 0 {+ timeout = cfg.Timeout+ }+ ctx, cancel := context.WithTimeout(ctx, timeout)defer cancel()var systemPrompt *genai.Contentdiff --git a/internal/controller/gemini_planner.go b/internal/controller/gemini_planner.goindex 54962a8..029aa29 100644--- a/internal/controller/gemini_planner.go+++ b/internal/controller/gemini_planner.go@@ -19,9 +19,10 @@ import ("fmt""io""os"+ "time"- "github.com/golang/protobuf/ptypes/duration""github.com/google/ax/internal/agent"+ "github.com/google/ax/internal/config""github.com/google/ax/proto""github.com/google/uuid""google.golang.org/genai"@@ -29,7 +30,7 @@ import (// GeminiPlannerConfig configures the Gemini-based planner.type GeminiPlannerConfig struct {- GeminiConfig *proto.GeminiConfig+ GeminiConfig *config.GeminiConfigSkillsDir string // Directory for discovering skills (optional)MaxSteps int // Max steps (default: 100)}@@ -44,23 +45,23 @@ type geminiPlannerAgent struct {}// NewGeminiPlannerAgent creates a new Gemini-based agent.-func NewGeminiPlannerAgent(ctx context.Context, registry *Registry, config GeminiPlannerConfig) (agent.Agent, error) {- if config.GeminiConfig == nil {- config.GeminiConfig = &proto.GeminiConfig{}+func NewGeminiPlannerAgent(ctx context.Context, registry *Registry, cfg GeminiPlannerConfig) (agent.Agent, error) {+ if cfg.GeminiConfig == nil {+ cfg.GeminiConfig = &config.GeminiConfig{}}- if config.GeminiConfig.Timeout == nil {- config.GeminiConfig.Timeout = &duration.Duration{Seconds: 30}+ if cfg.GeminiConfig.Timeout == 0 {+ cfg.GeminiConfig.Timeout = 30 * time.Second}- if config.GeminiConfig.Model == "" {- config.GeminiConfig.Model = os.Getenv("AX_GEMINI_MODEL")- if config.GeminiConfig.Model == "" {- config.GeminiConfig.Model = "gemini-3-flash-preview"+ if cfg.GeminiConfig.Model == "" {+ cfg.GeminiConfig.Model = os.Getenv("AX_GEMINI_MODEL")+ if cfg.GeminiConfig.Model == "" {+ cfg.GeminiConfig.Model = "gemini-3-flash-preview"}}// Default system prompt- if config.GeminiConfig.SystemPrompt == "" {- config.GeminiConfig.SystemPrompt = `You are an intelligent orchestrator. Your role is to analyze the conversation history and user requests, then select the most appropriate agent to handle the task.+ if cfg.GeminiConfig.SystemPrompt == "" {+ cfg.GeminiConfig.SystemPrompt = `You are an intelligent orchestrator. Your role is to analyze the conversation history and user requests, then select the most appropriate agent to handle the task.Available tools have been provided to you as function tools. Each agent has:- A unique ID@@ -85,7 +86,7 @@ Guidelines:return nil, fmt.Errorf("failed to create Gemini client: %w", err)}- skillsTool, err := NewSkillsTool(config.SkillsDir)+ skillsTool, err := NewSkillsTool(cfg.SkillsDir)if err != nil && err != io.EOF {return nil, fmt.Errorf("failed to initialize skills tool: %w", err)}@@ -95,7 +96,7 @@ Guidelines:bashTool: &BashTool{},skillsTool: skillsTool,registry: registry,- config: config,+ config: cfg,}if sp := skillsTool.SystemPrompt(); sp != "" {@@ -165,7 +166,7 @@ func (p *geminiPlannerAgent) process(ctx context.Context, start *proto.AgentStar}contents := protoToContents(inputs)- ctx, cancel := context.WithTimeout(ctx, p.config.GeminiConfig.Timeout.AsDuration())+ ctx, cancel := context.WithTimeout(ctx, p.config.GeminiConfig.Timeout)defer cancel()resp, err := p.client.Models.GenerateContent(ctx, p.config.GeminiConfig.Model, contents, &genai.GenerateContentConfig{diff --git a/internal/testagent/agent.go b/internal/testagent/agent.goindex 0714f57..35a7cd7 100644--- a/internal/testagent/agent.go+++ b/internal/testagent/agent.go@@ -18,16 +18,15 @@ import ("context""crypto/rand""encoding/hex"+ "encoding/json""fmt""strings""time""github.com/google/ax/internal/agent""github.com/google/ax/internal/historyutil"- testagentpb "github.com/google/ax/internal/testagent/proto""github.com/google/ax/proto""github.com/google/uuid"- pb "google.golang.org/protobuf/proto")// Please note that this is not production code. testagent is only for testing ax.@@ -43,6 +42,10 @@ func Agents() map[string]agent.Agent {}}+type KubernetesDeployAgentConfig struct {+ Regions []string `json:"regions"`+}+type CodingAgent struct{}// Connect handles processing of input content with callback handler.@@ -86,15 +89,15 @@ func (a *CodingAgent) Connect(ctx context.Context, conversationID string, execID}{- config, err := pb.Marshal(&testagentpb.KubernetesDeployAgentConfig{+ config, err := json.Marshal(&KubernetesDeployAgentConfig{Regions: []string{"us-central1"},})if err != nil {return err}outputs, err := exec.Exec(ctx, conversationID, "deploy", &proto.AgentStart{- AgentId: "kubernetes-deploy",- Messages: history,+ AgentId: "kubernetes-deploy",+ Messages: history,AgentConfig: config,})if err != nil {@@ -109,15 +112,15 @@ func (a *CodingAgent) Connect(ctx context.Context, conversationID string, execID}{- config, err := pb.Marshal(&testagentpb.KubernetesDeployAgentConfig{+ config, err := json.Marshal(&KubernetesDeployAgentConfig{Regions: []string{"europe-north1", "asia-east1", "us-west2"},})if err != nil {return err}outputs, err := exec.Exec(ctx, conversationID, "deploy-more", &proto.AgentStart{- AgentId: "kubernetes-deploy",- Messages: history,+ AgentId: "kubernetes-deploy",+ Messages: history,AgentConfig: config,})if err != nil {@@ -274,8 +277,8 @@ func (a *KubernetesDeployAgent) Connect(ctx context.Context, conversationID striif start.AgentConfig == nil {return fmt.Errorf("no config for id=%v", execID)}- var config testagentpb.KubernetesDeployAgentConfig- if err := pb.Unmarshal(start.AgentConfig, &config); err != nil {+ var config KubernetesDeployAgentConfig+ if err := json.Unmarshal(start.AgentConfig, &config); err != nil {return err}if len(config.Regions) == 0 {diff --git a/internal/testagent/proto/testagent.pb.go b/internal/testagent/proto/testagent.pb.godeleted file mode 100644index 78ae1ea..0000000--- a/internal/testagent/proto/testagent.pb.go+++ /dev/null@@ -1,136 +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.--// Code generated by protoc-gen-go. DO NOT EDIT.-// versions:-// protoc-gen-go v1.36.11-// protoc v5.28.2-// source: internal/testagent/proto/testagent.proto--package proto--import (- protoreflect "google.golang.org/protobuf/reflect/protoreflect"- protoimpl "google.golang.org/protobuf/runtime/protoimpl"- reflect "reflect"- sync "sync"- unsafe "unsafe"-)--const (- // Verify that this generated code is sufficiently up-to-date.- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)- // Verify that runtime/protoimpl is sufficiently up-to-date.- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)-)--type KubernetesDeployAgentConfig struct {- state protoimpl.MessageState `protogen:"open.v1"`- Regions []string `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *KubernetesDeployAgentConfig) Reset() {- *x = KubernetesDeployAgentConfig{}- mi := &file_internal_testagent_proto_testagent_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *KubernetesDeployAgentConfig) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*KubernetesDeployAgentConfig) ProtoMessage() {}--func (x *KubernetesDeployAgentConfig) ProtoReflect() protoreflect.Message {- mi := &file_internal_testagent_proto_testagent_proto_msgTypes[0]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use KubernetesDeployAgentConfig.ProtoReflect.Descriptor instead.-func (*KubernetesDeployAgentConfig) Descriptor() ([]byte, []int) {- return file_internal_testagent_proto_testagent_proto_rawDescGZIP(), []int{0}-}--func (x *KubernetesDeployAgentConfig) GetRegions() []string {- if x != nil {- return x.Regions- }- return nil-}--var File_internal_testagent_proto_testagent_proto protoreflect.FileDescriptor--const file_internal_testagent_proto_testagent_proto_rawDesc = "" +- "\n" +- "(internal/testagent/proto/testagent.proto\x12\x05proto\"7\n" +- "\x1bKubernetesDeployAgentConfig\x12\x18\n" +- "\aregions\x18\x01 \x03(\tR\aregionsB/Z-github.com/google/ax/internal/testagent/protob\x06proto3"--var (- file_internal_testagent_proto_testagent_proto_rawDescOnce sync.Once- file_internal_testagent_proto_testagent_proto_rawDescData []byte-)--func file_internal_testagent_proto_testagent_proto_rawDescGZIP() []byte {- file_internal_testagent_proto_testagent_proto_rawDescOnce.Do(func() {- file_internal_testagent_proto_testagent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_testagent_proto_testagent_proto_rawDesc), len(file_internal_testagent_proto_testagent_proto_rawDesc)))- })- return file_internal_testagent_proto_testagent_proto_rawDescData-}--var file_internal_testagent_proto_testagent_proto_msgTypes = make([]protoimpl.MessageInfo, 1)-var file_internal_testagent_proto_testagent_proto_goTypes = []any{- (*KubernetesDeployAgentConfig)(nil), // 0: proto.KubernetesDeployAgentConfig-}-var file_internal_testagent_proto_testagent_proto_depIdxs = []int32{- 0, // [0:0] is the sub-list for method output_type- 0, // [0:0] is the sub-list for method input_type- 0, // [0:0] is the sub-list for extension type_name- 0, // [0:0] is the sub-list for extension extendee- 0, // [0:0] is the sub-list for field type_name-}--func init() { file_internal_testagent_proto_testagent_proto_init() }-func file_internal_testagent_proto_testagent_proto_init() {- if File_internal_testagent_proto_testagent_proto != nil {- return- }- type x struct{}- out := protoimpl.TypeBuilder{- File: protoimpl.DescBuilder{- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),- RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_testagent_proto_testagent_proto_rawDesc), len(file_internal_testagent_proto_testagent_proto_rawDesc)),- NumEnums: 0,- NumMessages: 1,- NumExtensions: 0,- NumServices: 0,- },- GoTypes: file_internal_testagent_proto_testagent_proto_goTypes,- DependencyIndexes: file_internal_testagent_proto_testagent_proto_depIdxs,- MessageInfos: file_internal_testagent_proto_testagent_proto_msgTypes,- }.Build()- File_internal_testagent_proto_testagent_proto = out.File- file_internal_testagent_proto_testagent_proto_goTypes = nil- file_internal_testagent_proto_testagent_proto_depIdxs = nil-}diff --git a/internal/testagent/proto/testagent.proto b/internal/testagent/proto/testagent.protodeleted file mode 100644index 3266e8b..0000000--- a/internal/testagent/proto/testagent.proto+++ /dev/null@@ -1,23 +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.--syntax = "proto3";--package proto;--option go_package = "github.com/google/ax/internal/testagent/proto";--message KubernetesDeployAgentConfig {- repeated string regions = 1;-}\ No newline at end of filediff --git a/proto/ax.pb.go b/proto/ax.pb.goindex f2c467b..8b1a686 100644--- a/proto/ax.pb.go+++ b/proto/ax.pb.go@@ -15,7 +15,7 @@// Code generated by protoc-gen-go. DO NOT EDIT.// versions:// protoc-gen-go v1.36.11-// protoc v5.28.2+// protoc v7.34.1// source: proto/ax.protopackage proto@@ -23,7 +23,6 @@ package protoimport (protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"- durationpb "google.golang.org/protobuf/types/known/durationpb"timestamppb "google.golang.org/protobuf/types/known/timestamppb"reflect "reflect"sync "sync"@@ -1259,88 +1258,11 @@ func (x *ForkResponse) GetConversationId() string {return ""}-// GeminiConfig is the configuration for a Gemini agent.-type GeminiConfig struct {- state protoimpl.MessageState `protogen:"open.v1"`- Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // e.g. "gemini-3-flash-preview"- SystemPrompt string `protobuf:"bytes,2,opt,name=system_prompt,json=systemPrompt,proto3" json:"system_prompt,omitempty"` // System prompt for the agent- MaxTokens int32 `protobuf:"varint,3,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` // Maximum number of tokens to generate- Timeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // e.g. "10s"- Tools []string `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"` // List of enabled tools (e.g. "google_search")- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *GeminiConfig) Reset() {- *x = GeminiConfig{}- mi := &file_proto_ax_proto_msgTypes[20]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *GeminiConfig) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*GeminiConfig) ProtoMessage() {}--func (x *GeminiConfig) ProtoReflect() protoreflect.Message {- mi := &file_proto_ax_proto_msgTypes[20]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use GeminiConfig.ProtoReflect.Descriptor instead.-func (*GeminiConfig) Descriptor() ([]byte, []int) {- return file_proto_ax_proto_rawDescGZIP(), []int{20}-}--func (x *GeminiConfig) GetModel() string {- if x != nil {- return x.Model- }- return ""-}--func (x *GeminiConfig) GetSystemPrompt() string {- if x != nil {- return x.SystemPrompt- }- return ""-}--func (x *GeminiConfig) GetMaxTokens() int32 {- if x != nil {- return x.MaxTokens- }- return 0-}--func (x *GeminiConfig) GetTimeout() *durationpb.Duration {- if x != nil {- return x.Timeout- }- return nil-}--func (x *GeminiConfig) GetTools() []string {- if x != nil {- return x.Tools- }- return nil-}-var File_proto_ax_proto protoreflect.FileDescriptorconst file_proto_ax_proto_rawDesc = "" +"\n" +- "\x0eproto/ax.proto\x12\x02ax\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x13proto/content.proto\"s\n" ++ "\x0eproto/ax.proto\x12\x02ax\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13proto/content.proto\"s\n" +"\n" +"AgentStart\x12\x19\n" +"\bagent_id\x18\x01 \x01(\tR\aagentId\x12!\n" +@@ -1413,14 +1335,7 @@ const file_proto_ax_proto_rawDesc = "" +"\asrc_seq\x18\x02 \x01(\x05R\x06srcSeq\x120\n" +"\x14dest_conversation_id\x18\x03 \x01(\tR\x12destConversationId\"7\n" +"\fForkResponse\x12'\n" +- "\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId\"\xb3\x01\n" +- "\fGeminiConfig\x12\x14\n" +- "\x05model\x18\x01 \x01(\tR\x05model\x12#\n" +- "\rsystem_prompt\x18\x02 \x01(\tR\fsystemPrompt\x12\x1d\n" +- "\n" +- "max_tokens\x18\x03 \x01(\x05R\tmaxTokens\x123\n" +- "\atimeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12\x14\n" +- "\x05tools\x18\x05 \x03(\tR\x05tools*X\n" ++ "\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId*X\n" +"\x05State\x12\x15\n" +"\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n" +"\rSTATE_PENDING\x10\x01\x12\x10\n" +@@ -1450,7 +1365,7 @@ func file_proto_ax_proto_rawDescGZIP() []byte {}var file_proto_ax_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_proto_ax_proto_msgTypes = make([]protoimpl.MessageInfo, 22)+var file_proto_ax_proto_msgTypes = make([]protoimpl.MessageInfo, 21)var file_proto_ax_proto_goTypes = []any{(State)(0), // 0: ax.State(*AgentStart)(nil), // 1: ax.AgentStart@@ -1473,11 +1388,9 @@ var file_proto_ax_proto_goTypes = []any{(*DeleteResponse)(nil), // 18: ax.DeleteResponse(*ForkRequest)(nil), // 19: ax.ForkRequest(*ForkResponse)(nil), // 20: ax.ForkResponse- (*GeminiConfig)(nil), // 21: ax.GeminiConfig- nil, // 22: ax.RegisterAgentRequest.MetadataEntry- (*Content)(nil), // 23: ax.Content- (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp- (*durationpb.Duration)(nil), // 25: google.protobuf.Duration+ nil, // 21: ax.RegisterAgentRequest.MetadataEntry+ (*Content)(nil), // 22: ax.Content+ (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp}var file_proto_ax_proto_depIdxs = []int32{5, // 0: ax.AgentStart.messages:type_name -> ax.Message@@ -1485,38 +1398,37 @@ var file_proto_ax_proto_depIdxs = []int32{1, // 2: ax.AgentMessage.start:type_name -> ax.AgentStart2, // 3: ax.AgentMessage.outputs:type_name -> ax.AgentOutputs3, // 4: ax.AgentMessage.end:type_name -> ax.AgentEnd- 23, // 5: ax.Message.content:type_name -> ax.Content+ 22, // 5: ax.Message.content:type_name -> ax.Content5, // 6: ax.ConversationEvent.messages:type_name -> ax.Message0, // 7: ax.ConversationEvent.state:type_name -> ax.State5, // 8: ax.ExecutionEvent.inputs:type_name -> ax.Message5, // 9: ax.ExecutionEvent.outputs:type_name -> ax.Message0, // 10: ax.ExecutionEvent.state:type_name -> ax.State- 24, // 11: ax.ExecutionEvent.timestamp:type_name -> google.protobuf.Timestamp+ 23, // 11: ax.ExecutionEvent.timestamp:type_name -> google.protobuf.Timestamp5, // 12: ax.ExecRequest.inputs:type_name -> ax.Message5, // 13: ax.ExecResponse.outputs:type_name -> ax.Message- 22, // 14: ax.RegisterAgentRequest.metadata:type_name -> ax.RegisterAgentRequest.MetadataEntry+ 21, // 14: ax.RegisterAgentRequest.metadata:type_name -> ax.RegisterAgentRequest.MetadataEntry12, // 15: ax.RegisterAgentRequest.remote:type_name -> ax.RemoteAgentConfig6, // 16: ax.ListResponse.events:type_name -> ax.ConversationEvent- 25, // 17: ax.GeminiConfig.timeout:type_name -> google.protobuf.Duration- 4, // 18: ax.AgentService.Connect:input_type -> ax.AgentMessage- 8, // 19: ax.AgentService.HealthCheck:input_type -> ax.HealthCheckRequest- 10, // 20: ax.ControllerService.Exec:input_type -> ax.ExecRequest- 13, // 21: ax.ControllerService.RegisterAgent:input_type -> ax.RegisterAgentRequest- 15, // 22: ax.EventLogService.List:input_type -> ax.ListRequest- 17, // 23: ax.EventLogService.Delete:input_type -> ax.DeleteRequest- 19, // 24: ax.EventLogService.Fork:input_type -> ax.ForkRequest- 4, // 25: ax.AgentService.Connect:output_type -> ax.AgentMessage- 9, // 26: ax.AgentService.HealthCheck:output_type -> ax.HealthCheckResponse- 11, // 27: ax.ControllerService.Exec:output_type -> ax.ExecResponse- 14, // 28: ax.ControllerService.RegisterAgent:output_type -> ax.RegisterAgentResponse- 16, // 29: ax.EventLogService.List:output_type -> ax.ListResponse- 18, // 30: ax.EventLogService.Delete:output_type -> ax.DeleteResponse- 20, // 31: ax.EventLogService.Fork:output_type -> ax.ForkResponse- 25, // [25:32] is the sub-list for method output_type- 18, // [18:25] is the sub-list for method input_type- 18, // [18:18] is the sub-list for extension type_name- 18, // [18:18] is the sub-list for extension extendee- 0, // [0:18] is the sub-list for field type_name+ 4, // 17: ax.AgentService.Connect:input_type -> ax.AgentMessage+ 8, // 18: ax.AgentService.HealthCheck:input_type -> ax.HealthCheckRequest+ 10, // 19: ax.ControllerService.Exec:input_type -> ax.ExecRequest+ 13, // 20: ax.ControllerService.RegisterAgent:input_type -> ax.RegisterAgentRequest+ 15, // 21: ax.EventLogService.List:input_type -> ax.ListRequest+ 17, // 22: ax.EventLogService.Delete:input_type -> ax.DeleteRequest+ 19, // 23: ax.EventLogService.Fork:input_type -> ax.ForkRequest+ 4, // 24: ax.AgentService.Connect:output_type -> ax.AgentMessage+ 9, // 25: ax.AgentService.HealthCheck:output_type -> ax.HealthCheckResponse+ 11, // 26: ax.ControllerService.Exec:output_type -> ax.ExecResponse+ 14, // 27: ax.ControllerService.RegisterAgent:output_type -> ax.RegisterAgentResponse+ 16, // 28: ax.EventLogService.List:output_type -> ax.ListResponse+ 18, // 29: ax.EventLogService.Delete:output_type -> ax.DeleteResponse+ 20, // 30: ax.EventLogService.Fork:output_type -> ax.ForkResponse+ 24, // [24:31] is the sub-list for method output_type+ 17, // [17:24] is the sub-list for method input_type+ 17, // [17:17] is the sub-list for extension type_name+ 17, // [17:17] is the sub-list for extension extendee+ 0, // [0:17] is the sub-list for field type_name}func init() { file_proto_ax_proto_init() }@@ -1539,7 +1451,7 @@ func file_proto_ax_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ax_proto_rawDesc), len(file_proto_ax_proto_rawDesc)),NumEnums: 1,- NumMessages: 22,+ NumMessages: 21,NumExtensions: 0,NumServices: 3,},diff --git a/proto/ax.proto b/proto/ax.protoindex 060c725..f50e736 100644--- a/proto/ax.proto+++ b/proto/ax.proto@@ -17,7 +17,6 @@ syntax = "proto3";package ax;import "google/protobuf/timestamp.proto";-import "google/protobuf/duration.proto";import "proto/content.proto";option go_package = "github.com/google/ax/proto";@@ -198,12 +197,3 @@ service EventLogService {// Fork forks an event log from a specific conversation.rpc Fork(ForkRequest) returns (ForkResponse);}--// GeminiConfig is the configuration for a Gemini agent.-message GeminiConfig {- string model = 1; // e.g. "gemini-3-flash-preview"- string system_prompt = 2; // System prompt for the agent- int32 max_tokens = 3; // Maximum number of tokens to generate- google.protobuf.Duration timeout = 4; // e.g. "10s"- repeated string tools = 5; // List of enabled tools (e.g. "google_search")-}diff --git a/proto/ax_grpc.pb.go b/proto/ax_grpc.pb.goindex c234866..376d1e2 100644--- a/proto/ax_grpc.pb.go+++ b/proto/ax_grpc.pb.go@@ -14,8 +14,8 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.5.1-// - protoc v5.28.2+// - protoc-gen-go-grpc v1.6.0+// - protoc v7.34.1// source: proto/ax.protopackage proto@@ -113,10 +113,10 @@ type AgentServiceServer interface {type UnimplementedAgentServiceServer struct{}func (UnimplementedAgentServiceServer) Connect(grpc.BidiStreamingServer[AgentMessage, AgentMessage]) error {- return status.Errorf(codes.Unimplemented, "method Connect not implemented")+ return status.Error(codes.Unimplemented, "method Connect not implemented")}func (UnimplementedAgentServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")+ return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")}func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {}func (UnimplementedAgentServiceServer) testEmbeddedByValue() {}@@ -129,7 +129,7 @@ type UnsafeAgentServiceServer interface {}func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {- // If the following call pancis, it indicates UnimplementedAgentServiceServer was+ // If the following call panics, it indicates UnimplementedAgentServiceServer was// embedded by pointer and is nil. This will cause panics if an// unimplemented method is ever invoked, so we test this at initialization// time to prevent it from happening at runtime later due to I/O.@@ -260,10 +260,10 @@ type ControllerServiceServer interface {type UnimplementedControllerServiceServer struct{}func (UnimplementedControllerServiceServer) Exec(*ExecRequest, grpc.ServerStreamingServer[ExecResponse]) error {- return status.Errorf(codes.Unimplemented, "method Exec not implemented")+ return status.Error(codes.Unimplemented, "method Exec not implemented")}func (UnimplementedControllerServiceServer) RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method RegisterAgent not implemented")+ return nil, status.Error(codes.Unimplemented, "method RegisterAgent not implemented")}func (UnimplementedControllerServiceServer) mustEmbedUnimplementedControllerServiceServer() {}func (UnimplementedControllerServiceServer) testEmbeddedByValue() {}@@ -276,7 +276,7 @@ type UnsafeControllerServiceServer interface {}func RegisterControllerServiceServer(s grpc.ServiceRegistrar, srv ControllerServiceServer) {- // If the following call pancis, it indicates UnimplementedControllerServiceServer was+ // If the following call panics, it indicates UnimplementedControllerServiceServer was// embedded by pointer and is nil. This will cause panics if an// unimplemented method is ever invoked, so we test this at initialization// time to prevent it from happening at runtime later due to I/O.@@ -416,13 +416,13 @@ type EventLogServiceServer interface {type UnimplementedEventLogServiceServer struct{}func (UnimplementedEventLogServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method List not implemented")+ return nil, status.Error(codes.Unimplemented, "method List not implemented")}func (UnimplementedEventLogServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")+ return nil, status.Error(codes.Unimplemented, "method Delete not implemented")}func (UnimplementedEventLogServiceServer) Fork(context.Context, *ForkRequest) (*ForkResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method Fork not implemented")+ return nil, status.Error(codes.Unimplemented, "method Fork not implemented")}func (UnimplementedEventLogServiceServer) mustEmbedUnimplementedEventLogServiceServer() {}func (UnimplementedEventLogServiceServer) testEmbeddedByValue() {}@@ -435,7 +435,7 @@ type UnsafeEventLogServiceServer interface {}func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer) {- // If the following call pancis, it indicates UnimplementedEventLogServiceServer was+ // If the following call panics, it indicates UnimplementedEventLogServiceServer was// embedded by pointer and is nil. This will cause panics if an// unimplemented method is ever invoked, so we test this at initialization// time to prevent it from happening at runtime later due to I/O.diff --git a/proto/content.pb.go b/proto/content.pb.goindex 86e5e0b..a990246 100644--- a/proto/content.pb.go+++ b/proto/content.pb.go@@ -15,7 +15,7 @@// Code generated by protoc-gen-go. DO NOT EDIT.// versions:// protoc-gen-go v1.36.11-// protoc v5.28.2+// protoc v7.34.1// source: proto/content.protopackage proto