Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

Remove experimental Antigravity planner integration (#370)

JoyceLiu482886cae4ef
diff --git a/README.md b/README.md
index 3fcb77f..41bea6f 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ and execution resumption, even in complex distributed setups.
- **Skills, Tools, Agents**: Support for skill, tool, and agent selection and execution
- **Auditing & Policy**: All user and agentic calls are coordinated by a common controller, easy to control and audit the overall execution and skill/tool/agent calls
- **Portability**: Runs anywhere, scales to small and large deployments
-- **Customizability**: Agnostic of harness and model, uses Antigravity as the default harness
+- **Customizability**: Agnostic of harness and model
Built-in consistency and resumability features:
- **Single-Writer Architecture**: Single controller ensures consistent state management
diff --git a/ax.yaml b/ax.yaml
index d95936d..ddedbc3 100644
--- a/ax.yaml
+++ b/ax.yaml
@@ -20,8 +20,7 @@ eventlog:
filename: "eventlog/log.sqlite"
planner:
- # Type of planner to use: "gemini" or "antigravity" (default: "gemini")
- # Note: Only the configuration block matching this type will be active.
+ # Type of planner to use: "gemini" (default: "gemini")
type: "gemini"
# The Gemini planner uses Google's Gemini models for planning.
diff --git a/go.mod b/go.mod
index dd761ec..6f276cd 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,6 @@ require (
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
github.com/envoyproxy/go-control-plane/envoy v1.37.0
github.com/google/uuid v1.6.0
- github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
github.com/spf13/cobra v1.10.2
golang.org/x/sync v0.20.0
google.golang.org/genai v1.43.0
@@ -48,6 +47,7 @@ require (
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
github.com/googleapis/gax-go/v2 v2.21.0 // indirect
+ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
diff --git a/go.sum b/go.sum
index ae9410d..81a7a65 100644
--- a/go.sum
+++ b/go.sum
@@ -55,8 +55,8 @@ github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7X
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
-github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
-github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/envoyproxy/go-control-plane/envoy v1.37.0 h1:u3riX6BoYRfF4Dr7dwSOroNfdSbEPe9Yyl09/B6wBrQ=
@@ -76,8 +76,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
-github.com/google/pprof v0.0.0-20250602020802-c6617b811d0e h1:FJta/0WsADCe1r9vQjdHbd3KuiLPu7Y9WlyLGwMUNyE=
-github.com/google/pprof v0.0.0-20250602020802-c6617b811d0e/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA=
+github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
+github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -116,8 +116,8 @@ github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOF
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
-github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
-github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
@@ -175,8 +175,8 @@ google.golang.org/genai v1.43.0 h1:8vhqhzJNZu1U94e2m+KvDq/TUUjSmDrs1aKkvTa8SoM=
google.golang.org/genai v1.43.0/go.mod h1:A3kkl0nyBjyFlNjgxIwKq70julKbIxpSxqKO5gw/gmk=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I=
-google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA=
-google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M=
+google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7 h1:41r6JMbpzBMen0R/4TZeeAmGXSJC7DftGINUodzTkPI=
+google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:EIQZ5bFCfRQDV4MhRle7+OgjNtZ6P1PiZBgAKuxXu/Y=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.81.0 h1:W3G9N3KQf3BU+YuCtGKJk0CmxQNbAISICD/9AORxLIw=
diff --git a/internal/cliutil/cliutil.go b/internal/cliutil/cliutil.go
index 531047e..2183376 100644
--- a/internal/cliutil/cliutil.go
+++ b/internal/cliutil/cliutil.go
@@ -23,7 +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/internal/experimental/antigravity"
"github.com/google/ax/internal/gemini"
)
@@ -31,7 +30,7 @@ import (
func NewControllerFromConfig(ctx context.Context, cfg *config.Config) (*controller.Controller, error) {
// Validate planner type early
switch cfg.Planner.Type {
- case "antigravity", "gemini":
+ case "gemini":
// valid
default:
return nil, fmt.Errorf("unknown planner type: %s", cfg.Planner.Type)
@@ -45,10 +44,6 @@ func NewControllerFromConfig(ctx context.Context, cfg *config.Config) (*controll
// Create planner builder
plannerBuilder := func(ctx context.Context, r *controller.Registry) (agent.Agent, error) {
switch cfg.Planner.Type {
- case "antigravity":
- return antigravity.NewAntigravityPlannerAgent(ctx, antigravity.AntigravityPlannerConfig{
- Endpoint: cfg.Planner.Antigravity.Endpoint,
- })
case "gemini":
timeout, err := time.ParseDuration(cfg.Planner.Gemini.Timeout)
if err != nil {
diff --git a/internal/config/config.go b/internal/config/config.go
index 5769e75..dfc1fba 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -36,7 +36,7 @@ type Config struct {
// RegistryConfig allows registring agents.
type RegistryConfig struct {
- RemoteAgents []RemoteAgentConfig `yaml:"remote_agents,omitempty"`
+ RemoteAgents []RemoteAgentConfig `yaml:"remote_agents,omitempty"`
ColabAgents []ColabAgentConfig `yaml:"colab_agents,omitempty"`
SubstrateAgents []SubstrateAgentConfig `yaml:"substrate_agents,omitempty"`
}
@@ -62,22 +62,8 @@ type EventLogConfig struct {
// PlannerConfig configures the planner.
type PlannerConfig struct {
- Type string `yaml:"type"` // "gemini" or "antigravity"
- Gemini GeminiPlannerConfig `yaml:"gemini,omitempty"`
- Antigravity AntigravityPlannerConfig `yaml:"antigravity,omitempty"`
-}
-
-// AntigravityPlannerConfig configures the Antigravity-based planner.
-// TODO: Support additional Antigravity SDK features (e.g., custom tools, hooks, MCP servers, agentic mode).
-type AntigravityPlannerConfig struct {
- Endpoint string `yaml:"endpoint,omitempty"` // URL of the Python sidecar
-}
-
-// setDefaults sets default values for AntigravityPlannerConfig.
-func (c *AntigravityPlannerConfig) setDefaults() {
- if c.Endpoint == "" {
- c.Endpoint = "http://localhost:8085/plan"
- }
+ Type string `yaml:"type"` // "gemini"
+ Gemini GeminiPlannerConfig `yaml:"gemini,omitempty"`
}
// GeminiPlannerConfig configures the Gemini-based planner.
@@ -212,9 +198,6 @@ func (c *Config) setDefaults() {
if c.Planner.Type == "gemini" {
c.Planner.Gemini.setDefaults()
}
- if c.Planner.Type == "antigravity" {
- c.Planner.Antigravity.setDefaults()
- }
}
diff --git a/internal/experimental/antigravity/antigravity_planner.go b/internal/experimental/antigravity/antigravity_planner.go
deleted file mode 100644
index 9e89084..0000000
--- a/internal/experimental/antigravity/antigravity_planner.go
+++ /dev/null
@@ -1,231 +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 antigravity
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "github.com/google/ax/internal/agent"
- "github.com/google/ax/proto"
- "github.com/gorilla/websocket"
- "google.golang.org/protobuf/encoding/protojson"
- "log"
-)
-
-// AntigravityPlannerConfig configures the Antigravity-based planner.
-type AntigravityPlannerConfig struct {
- Endpoint string // ws://localhost:8765 or similar
-}
-
-// AntigravityPlannerAgent implements the agent.Agent interface by calling an external Python server via WebSocket.
-type AntigravityPlannerAgent struct {
- config AntigravityPlannerConfig
- wsConn *websocket.Conn
-}
-
-// NewAntigravityPlannerAgent creates a new Antigravity-based planner agent.
-func NewAntigravityPlannerAgent(_ context.Context, cfg AntigravityPlannerConfig) (agent.Agent, error) {
- return &AntigravityPlannerAgent{
- config: cfg,
- }, nil
-}
-
-// Connect starts the agent loop.
-func (p *AntigravityPlannerAgent) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, handler agent.OutputHandler) error {
- // TODO(lhuan): remove when stable
- log.Printf("[AX] Connecting to Antigravity WebSocket for execution %s", execID)
-
- conn, _, err := websocket.DefaultDialer.DialContext(ctx, p.config.Endpoint, nil)
- if err != nil {
- return fmt.Errorf("failed to dial WebSocket: %w", err)
- }
- defer conn.Close() // Ensure connection is closed when function exits
-
- // Create local message channel and read goroutine
- msgCh := make(chan []byte, 10)
- go func() {
- defer close(msgCh)
- for {
- _, message, err := conn.ReadMessage()
- if err != nil {
- // Exit when connection closed or read error occurs
- return
- }
- msgCh <- message
- }
- }()
-
- return p.loop(ctx, conversationID, execID, start, e, handler, conn, msgCh)
-}
-
-// loop is the main execution loop for the Antigravity planner.
-func (p *AntigravityPlannerAgent) loop(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, handler agent.OutputHandler, conn *websocket.Conn, msgCh <-chan []byte) error {
-
- agentMsg := &proto.AgentMessage{
- Type: &proto.AgentMessage_Start{
- Start: start,
- },
- }
-
- payload, err := protojson.Marshal(agentMsg)
- if err != nil {
- return fmt.Errorf("failed to marshal AgentMessage: %w", err)
- }
-
- if err := conn.WriteMessage(websocket.TextMessage, payload); err != nil {
- return fmt.Errorf("failed to send request over WebSocket: %w", err)
- }
-
- for {
- nextAgentID, keepLooping, err := p.process(ctx, conn, msgCh, handler)
- if err != nil {
- return err
- }
- if !keepLooping && nextAgentID == "" {
- return nil
- }
-
- if nextAgentID != "" {
- startMsg := &proto.AgentStart{
- AgentId: nextAgentID,
- Messages: start.Messages,
- }
-
- var toolOutputs []*proto.Message
- outputCapturer := func(resp *proto.AgentOutputs) error {
- toolOutputs = append(toolOutputs, resp.Messages...)
- return handler(resp)
- }
-
- if _, err := e.Exec(ctx, conversationID, nextAgentID, startMsg, outputCapturer); err != nil {
- log.Printf("Failed to execute tool via controller: %v", err)
- }
- // TODO: remove this log later
- log.Printf("[AX] Captured %d tool outputs for %s", len(toolOutputs), nextAgentID)
-
- // Capture output and send back to Python
- outputsMsg := &proto.AgentMessage{
- Type: &proto.AgentMessage_Outputs{
- Outputs: &proto.AgentOutputs{
- Messages: toolOutputs,
- },
- },
- }
- payload, err := protojson.Marshal(outputsMsg)
- if err != nil {
- log.Printf("Failed to marshal tool outputs: %v", err)
- continue
- }
- if err := conn.WriteMessage(websocket.TextMessage, payload); err != nil {
- log.Printf("Failed to send tool outputs over WebSocket: %v", err)
- return fmt.Errorf("failed to send tool outputs: %w", err)
- }
- }
- }
-}
-
-// HealthCheck implements the agent.Agent interface.
-func (p *AntigravityPlannerAgent) HealthCheck(ctx context.Context) error {
- return nil
-}
-
-// Close implements the agent.Agent interface.
-func (p *AntigravityPlannerAgent) Close() error {
- return nil
-}
-
-func (p *AntigravityPlannerAgent) process(ctx context.Context, conn *websocket.Conn, msgCh <-chan []byte, handler agent.OutputHandler) (string, bool, error) {
- for {
- var message []byte
- var ok bool
- select {
- case message, ok = <-msgCh:
- if !ok {
- return "", false, fmt.Errorf("WebSocket channel closed")
- }
- case <-ctx.Done():
- return "", false, ctx.Err()
- }
-
-
- // Check for custom confirmation message
- var customMsg struct {
- Confirmation struct {
- Id string `json:"id"`
- Question string `json:"question"`
- } `json:"confirmation"`
- }
- if err := json.Unmarshal(message, &customMsg); err == nil && customMsg.Confirmation.Id != "" {
- log.Printf("[AX] Received confirmation request for tool: %s", customMsg.Confirmation.Id)
- outputs := &proto.AgentOutputs{
- Messages: []*proto.Message{
- {
- Content: &proto.Content{
- Type: &proto.Content_Confirmation{
- Confirmation: &proto.ConfirmationContent{
- Id: customMsg.Confirmation.Id,
- Question: customMsg.Confirmation.Question,
- },
- },
- },
- },
- },
- }
- handler(outputs)
- return "", false, nil
- }
-
- // Check for custom done message
- var doneMsg struct {
- Type string `json:"type"`
- }
- if err := json.Unmarshal(message, &doneMsg); err == nil && doneMsg.Type == "done" {
- log.Printf("[AX] Conversation completed.")
- return "", false, nil
- }
-
- var agentMsg proto.AgentMessage
- if err := (protojson.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(message, &agentMsg); err != nil {
- log.Printf("Failed to unmarshal WebSocket message as AgentMessage: %v", err)
- continue
- }
-
- if outputs := agentMsg.GetOutputs(); outputs != nil {
- handler(outputs)
-
- for _, msg := range outputs.Messages {
- if msg.Content != nil {
- switch o := msg.Content.Type.(type) {
- case *proto.Content_Confirmation:
- // TODO(lhuan): still need to implement logic end to end
- log.Printf("[AX] Waiting for user response via client resumption...")
- return "", false, nil
- case *proto.Content_ToolCall:
- log.Printf("[AX] Handling tool call: %s", o.ToolCall.GetFunctionCall().GetName())
- nextAgentID := o.ToolCall.GetFunctionCall().GetName()
- return nextAgentID, false, nil
- }
- }
- }
- continue
- }
-
- if agentMsg.GetEnd() != nil {
- log.Printf("[AX] Conversation completed.")
- return "", false, nil
- }
- }
-}