Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

Delete the Python remote agent for now (#196)

Jaana Dogan43ba7aa7dbce
diff --git a/README.md b/README.md
index c8d3dfb..5ddb8d4 100644
--- a/README.md
+++ b/README.md
@@ -350,7 +350,7 @@ There are several ways to register custom agents in AX by implementing
the `AXAgentService` interface defined in `proto/ax.proto`:
- [Remote Agent](docs/remote-agent.md)
- [Kubernetes Sandbox Agents](docs/k8s-sandbox-agent.md)
-- [Remote Python Agent](docs/python-agent.md)
+
## License
diff --git a/docs/python-agent.md b/docs/python-agent.md
deleted file mode 100644
index 04da883..0000000
--- a/docs/python-agent.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Remote Python Agent
-
-AX is language agnostic and supports remote agents written in any language that can implement the `AgentService` interface. Python is a popular choice for AI agents, and AX provides first-class support for Python agents.
-
-To build a Python agent, first set up your environment by installing dependencies and generating the gRPC artifacts from the protobuf definitions:
-
-```bash
-# Install dependencies
-pip install grpcio grpcio-tools
-
-# Generate Python code from proto file
-python -m grpc_tools.protoc -I. --python_out=python --grpc_python_out=python proto/ax.proto
-```
-
-See `python/example_agent.py` for a complete implementation.
-
-**Register and use:**
-```bash
-# Start the Python agent
-python python/example_agent.py
-
-# Register the agent (in another terminal)
-ax register \
- --server localhost:8494 \
- --agent-id "echo-agent" \
- --agent-name "Echo Agent" \
- --agent-description "An agent that echoes the input." \
- --agent-addr localhost:50051
-
-ax exec \
- --server localhost:8494 \
- --conversation d85a4b4e-c53b-4c84-b879-f10d905bce40 \
- --input "Hello, can you echo what I just said?"
-```
diff --git a/python/ax.py b/python/ax.py
deleted file mode 100644
index e76aee9..0000000
--- a/python/ax.py
+++ /dev/null
@@ -1,135 +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.
-
-"""
-AX Agent Framework for Python
-
-A simple framework for building Python agents that work with the AX orchestrator.
-"""
-
-import grpc
-from concurrent import futures
-from typing import Callable, Iterator, Optional, Dict
-
-
-class Agent:
- """
- Agent provides a simple framework for building Python agents.
-
- Usage:
- import proto.ax_pb2 as pb2
- def process(execution_id, inputs):
- # Implement the agent...
-
- agent = Agent(process_func=process)
- agent.serve(port=50051)
- """
-
- def __init__(
- self,
- process_func: Callable,
- health_check_func: Optional[Callable] = None
- ):
- """
- Initialize an agent.
-
- Args:
- process_func: Function that takes (execution_id: str, inputs: list) and yields Content responses
- health_check_func: Optional function that returns (healthy: bool, message: str, metadata: dict)
- """
- self.process_func = process_func
- self.health_check_func = health_check_func
-
- def _create_servicer(self, pb2, pb2_grpc):
- """Create the gRPC servicer implementation."""
- agent = self
-
- class AgentServicer(pb2_grpc.AgentServiceServicer):
- def Process(self, request_iterator, context):
- # Extract id from gRPC metadata
- metadata = dict(context.invocation_metadata())
- id = metadata.get('execution-id', '')
-
- # Collect all content into a list
- inputs = list(request_iterator)
-
- # Process the list of content with id
- for response in agent.process_func(id, inputs):
- if response:
- yield response
-
- def HealthCheck(self, request, context):
- if agent.health_check_func:
- healthy, message, metadata = agent.health_check_func()
- else:
- healthy, message, metadata = True, "Agent is healthy", {}
-
- return pb2.HealthCheckResponse(
- healthy=healthy,
- message=message,
- metadata=metadata or {}
- )
-
- return AgentServicer()
-
- def serve(self, port: int = 50051, max_workers: int = 10):
- """
- Start the gRPC server.
-
- Args:
- port: Port to listen on (default: 50051)
- max_workers: Maximum number of worker threads (default: 10)
- """
- # Import proto files (assuming they've been generated)
- try:
- import proto.ax_pb2 as pb2
- import proto.ax_pb2_grpc as pb2_grpc
- except ImportError:
- raise ImportError(
- "Proto files not found. Generate them first:\n"
- " python -m grpc_tools.protoc -I. --python_out=python --grpc_python_out=python proto/ax.proto"
- )
-
- server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers))
- pb2_grpc.add_AgentServiceServicer_to_server(
- self._create_servicer(pb2, pb2_grpc),
- server
- )
- server.add_insecure_port(f'[::]:{port}')
- server.start()
- print(f"Agent listening on port {port}")
-
- try:
- server.wait_for_termination()
- except KeyboardInterrupt:
- print("\nShutting down agent...")
- server.stop(grace=5)
-
-
-# Convenience function for quick agent creation
-def create_agent(
- process_func: Callable,
- health_check_func: Optional[Callable] = None,
- port: int = 50051
-):
- """
- Create and start an agent in one call.
-
- Args:
- process_func: Function that takes (execution_id: str, inputs: list) and yields Content responses
- health_check_func: Optional function that returns (healthy: bool, message: str, metadata: dict)
- port: Port to listen on (default: 50051)
- """
- agent = Agent(process_func, health_check_func)
- agent.serve(port=port)
diff --git a/python/example_agent.py b/python/example_agent.py
deleted file mode 100644
index 97a8404..0000000
--- a/python/example_agent.py
+++ /dev/null
@@ -1,53 +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.
-
-#!/usr/bin/env python3
-"""
-Example Python agent using the AX.
-
-This demonstrates a simple agent that echoes the input.
-"""
-
-from ax import Agent
-import proto.ax_pb2 as pb2
-
-
-def process(execution_id, inputs):
- """Process incoming content list and yield responses"""
- for req in inputs:
- for content in req.contents:
- if content.HasField("text"):
- yield pb2.ProcessResponse(
- contents=[
- pb2.Content(
- role="assistant",
- text=pb2.TextContent(
- text=f"Echoed (in execution {execution_id}): {content.text.text}"
- )
- )
- ]
- )
-
-
-def health_check():
- """Health check function that always returns healthy"""
- return True, "OK", {}
-
-
-if __name__ == "__main__":
- agent = Agent(
- process_func=process,
- health_check_func=health_check
- )
- agent.serve(port=50051)
diff --git a/python/proto/__init__.py b/python/proto/__init__.py
deleted file mode 100644
index 58d482e..0000000
--- a/python/proto/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/python/proto/ax_pb2.py b/python/proto/ax_pb2.py
deleted file mode 100644
index 20a12e5..0000000
--- a/python/proto/ax_pb2.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- coding: utf-8 -*-
-# 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.
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: proto/ax.proto
-# Protobuf Python Version: 4.25.1
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import descriptor_pool as _descriptor_pool
-from google.protobuf import symbol_database as _symbol_database
-from google.protobuf.internal import builder as _builder
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
-from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
-from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
-
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eproto/ax.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19google/protobuf/any.proto\"2\n\x0eProcessRequest\x12 \n\x08\x63ontents\x18\x01 \x03(\x0b\x32\x0e.proto.Content\"^\n\x0fProcessResponse\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12 \n\x08\x63ontents\x18\x02 \x03(\x0b\x32\x0e.proto.Content\x12\x12\n\nfrom_cache\x18\x03 \x01(\x08\"-\n\x0bTextContent\x12\x0c\n\x04text\x18\x03 \x01(\tJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x04type\"$\n\x10\x41pprovalDecision\x12\x10\n\x08\x61pproved\x18\x01 \x01(\x08\"1\n\x0f\x44\x65\x63lineDecision\x12\x10\n\x08\x64\x65\x63lined\x18\x01 \x01(\x08J\x04\x08\x02\x10\x03R\x06reason\"\xa9\x01\n\x13\x43onfirmationContent\x12\n\n\x02id\x18\x03 \x01(\t\x12\x10\n\x08question\x18\x04 \x01(\t\x12+\n\x08\x61pproval\x18\x05 \x01(\x0b\x32\x17.proto.ApprovalDecisionH\x00\x12)\n\x07\x64\x65\x63line\x18\x06 \x01(\x0b\x32\x16.proto.DeclineDecisionH\x00\x42\n\n\x08\x64\x65\x63isionJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x04type\"q\n\x13\x46unctionCallContent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\n\n\x02id\x18\x03 \x01(\t\x12\x19\n\x11thought_signature\x18\x04 \x01(\x0c\"^\n\x17\x46unctionResponseContent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\n\n\x02id\x18\x03 \x01(\t\"\xff\x01\n\x07\x43ontent\x12\"\n\x04text\x18\n \x01(\x0b\x32\x12.proto.TextContentH\x00\x12\x32\n\x0c\x63onfirmation\x18\x1a \x01(\x0b\x32\x1a.proto.ConfirmationContentH\x00\x12\x33\n\rfunction_call\x18\x1b \x01(\x0b\x32\x1a.proto.FunctionCallContentH\x00\x12;\n\x11\x66unction_response\x18\x1c \x01(\x0b\x32\x1e.proto.FunctionResponseContentH\x00\x12\r\n\x04role\x18\xe8\x07 \x01(\tB\t\n\x07\x63ontentJ\x04\x08\x01\x10\x05J\x04\x08\x06\x10\nJ\x04\x08\x0b\x10\x1a\"\xc0\x01\n\x0e\x45xecutionEvent\x12\x0f\n\x07task_id\x18\x02 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x03 \x01(\t\x12\x1e\n\x06inputs\x18\x04 \x03(\x0b\x32\x0e.proto.Content\x12\x1f\n\x07outputs\x18\x05 \x03(\x0b\x32\x0e.proto.Content\x12\x1b\n\x05state\x18\x06 \x01(\x0e\x32\x0c.proto.State\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x14\n\x12HealthCheckRequest\"7\n\x13HealthCheckResponse\x12\x0f\n\x07healthy\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"w\n\x0b\x45xecRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12*\n\x0c\x61gent_config\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x1e\n\x06inputs\x18\x04 \x03(\x0b\x32\x0e.proto.Content\"L\n\x0c\x45xecResponse\x12\x1f\n\x07outputs\x18\x01 \x03(\x0b\x32\x0e.proto.Content\x12\x1b\n\x05state\x18\x02 \x01(\x0e\x32\x0c.proto.State\"I\n\x0b\x46orkRequest\x12\x0e\n\x06src_id\x18\x01 \x01(\t\x12\x19\n\x11src_checkpoint_id\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65st_id\x18\x03 \x01(\t\"\x1e\n\x0c\x46orkResponse\x12\x0e\n\x06new_id\x18\x01 \x01(\t\"$\n\x11RemoteAgentConfig\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"\xef\x01\n\x14RegisterAgentRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12;\n\x08metadata\x18\x04 \x03(\x0b\x32).proto.RegisterAgentRequest.MetadataEntry\x12*\n\x06remote\x18\x05 \x01(\x0b\x32\x18.proto.RemoteAgentConfigH\x00\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\"\x17\n\x15RegisterAgentResponse*X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_PENDING\x10\x01\x12\x10\n\x0cSTATE_FAILED\x10\x02\x12\x13\n\x0fSTATE_COMPLETED\x10\x03\x32\x92\x01\n\x0c\x41gentService\x12<\n\x07Process\x12\x15.proto.ProcessRequest\x1a\x16.proto.ProcessResponse(\x01\x30\x01\x12\x44\n\x0bHealthCheck\x12\x19.proto.HealthCheckRequest\x1a\x1a.proto.HealthCheckResponse2\xbb\x01\n\tAXService\x12\x31\n\x04\x45xec\x12\x12.proto.ExecRequest\x1a\x13.proto.ExecResponse0\x01\x12/\n\x04\x46ork\x12\x12.proto.ForkRequest\x1a\x13.proto.ForkResponse\x12J\n\rRegisterAgent\x12\x1b.proto.RegisterAgentRequest\x1a\x1c.proto.RegisterAgentResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')
-
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.ax_pb2', _globals)
-if _descriptor._USE_C_DESCRIPTORS == False:
- _globals['DESCRIPTOR']._options = None
- _globals['DESCRIPTOR']._serialized_options = b'Z\032github.com/google/ax/proto'
- _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._options = None
- _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_options = b'8\001'
- _globals['_STATE']._serialized_start=1925
- _globals['_STATE']._serialized_end=2013
- _globals['_PROCESSREQUEST']._serialized_start=115
- _globals['_PROCESSREQUEST']._serialized_end=165
- _globals['_PROCESSRESPONSE']._serialized_start=167
- _globals['_PROCESSRESPONSE']._serialized_end=261
- _globals['_TEXTCONTENT']._serialized_start=263
- _globals['_TEXTCONTENT']._serialized_end=308
- _globals['_APPROVALDECISION']._serialized_start=310
- _globals['_APPROVALDECISION']._serialized_end=346
- _globals['_DECLINEDECISION']._serialized_start=348
- _globals['_DECLINEDECISION']._serialized_end=397
- _globals['_CONFIRMATIONCONTENT']._serialized_start=400
- _globals['_CONFIRMATIONCONTENT']._serialized_end=569
- _globals['_FUNCTIONCALLCONTENT']._serialized_start=571
- _globals['_FUNCTIONCALLCONTENT']._serialized_end=684
- _globals['_FUNCTIONRESPONSECONTENT']._serialized_start=686
- _globals['_FUNCTIONRESPONSECONTENT']._serialized_end=780
- _globals['_CONTENT']._serialized_start=783
- _globals['_CONTENT']._serialized_end=1038
- _globals['_EXECUTIONEVENT']._serialized_start=1041
- _globals['_EXECUTIONEVENT']._serialized_end=1233
- _globals['_HEALTHCHECKREQUEST']._serialized_start=1235
- _globals['_HEALTHCHECKREQUEST']._serialized_end=1255
- _globals['_HEALTHCHECKRESPONSE']._serialized_start=1257
- _globals['_HEALTHCHECKRESPONSE']._serialized_end=1312
- _globals['_EXECREQUEST']._serialized_start=1314
- _globals['_EXECREQUEST']._serialized_end=1433
- _globals['_EXECRESPONSE']._serialized_start=1435
- _globals['_EXECRESPONSE']._serialized_end=1511
- _globals['_FORKREQUEST']._serialized_start=1513
- _globals['_FORKREQUEST']._serialized_end=1586
- _globals['_FORKRESPONSE']._serialized_start=1588
- _globals['_FORKRESPONSE']._serialized_end=1618
- _globals['_REMOTEAGENTCONFIG']._serialized_start=1620
- _globals['_REMOTEAGENTCONFIG']._serialized_end=1656
- _globals['_REGISTERAGENTREQUEST']._serialized_start=1659
- _globals['_REGISTERAGENTREQUEST']._serialized_end=1898
- _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_start=1841
- _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_end=1888
- _globals['_REGISTERAGENTRESPONSE']._serialized_start=1900
- _globals['_REGISTERAGENTRESPONSE']._serialized_end=1923
- _globals['_AGENTSERVICE']._serialized_start=2016
- _globals['_AGENTSERVICE']._serialized_end=2162
- _globals['_AXSERVICE']._serialized_start=2165
- _globals['_AXSERVICE']._serialized_end=2352
-# @@protoc_insertion_point(module_scope)
diff --git a/python/proto/ax_pb2_grpc.py b/python/proto/ax_pb2_grpc.py
deleted file mode 100644
index 1029d64..0000000
--- a/python/proto/ax_pb2_grpc.py
+++ /dev/null
@@ -1,252 +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.
-
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from proto import ax_pb2 as proto_dot_ax__pb2
-
-
-class AgentServiceStub(object):
- """AgentService defines the gRPC service for agent communication
- """
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.Process = channel.stream_stream(
- '/proto.AgentService/Process',
- request_serializer=proto_dot_ax__pb2.ProcessRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.ProcessResponse.FromString,
- )
- self.HealthCheck = channel.unary_unary(
- '/proto.AgentService/HealthCheck',
- request_serializer=proto_dot_ax__pb2.HealthCheckRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.HealthCheckResponse.FromString,
- )
-
-
-class AgentServiceServicer(object):
- """AgentService defines the gRPC service for agent communication
- """
-
- def Process(self, request_iterator, context):
- """Process handles bidirectional streaming of content between controller and agent
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def HealthCheck(self, request, context):
- """HealthCheck checks if the agent is healthy and responsive
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_AgentServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'Process': grpc.stream_stream_rpc_method_handler(
- servicer.Process,
- request_deserializer=proto_dot_ax__pb2.ProcessRequest.FromString,
- response_serializer=proto_dot_ax__pb2.ProcessResponse.SerializeToString,
- ),
- 'HealthCheck': grpc.unary_unary_rpc_method_handler(
- servicer.HealthCheck,
- request_deserializer=proto_dot_ax__pb2.HealthCheckRequest.FromString,
- response_serializer=proto_dot_ax__pb2.HealthCheckResponse.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'proto.AgentService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class AgentService(object):
- """AgentService defines the gRPC service for agent communication
- """
-
- @staticmethod
- def Process(request_iterator,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.stream_stream(request_iterator, target, '/proto.AgentService/Process',
- proto_dot_ax__pb2.ProcessRequest.SerializeToString,
- proto_dot_ax__pb2.ProcessResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def HealthCheck(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/proto.AgentService/HealthCheck',
- proto_dot_ax__pb2.HealthCheckRequest.SerializeToString,
- proto_dot_ax__pb2.HealthCheckResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
-
-class AXServiceStub(object):
- """AXService defines the gRPC service for AX operations
- """
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.Exec = channel.unary_stream(
- '/proto.AXService/Exec',
- request_serializer=proto_dot_ax__pb2.ExecRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.ExecResponse.FromString,
- )
- self.Fork = channel.unary_unary(
- '/proto.AXService/Fork',
- request_serializer=proto_dot_ax__pb2.ForkRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.ForkResponse.FromString,
- )
- self.RegisterAgent = channel.unary_unary(
- '/proto.AXService/RegisterAgent',
- request_serializer=proto_dot_ax__pb2.RegisterAgentRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.RegisterAgentResponse.FromString,
- )
-
-
-class AXServiceServicer(object):
- """AXService defines the gRPC service for AX operations
- """
-
- def Exec(self, request, context):
- """Exec executes an agentic task or resumes an existing one with streaming responses
- If the execution id already exists, it will be resumed from the last checkpoint.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def Fork(self, request, context):
- """Fork forks an event log from a specific checkpoint.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def RegisterAgent(self, request, context):
- """RegisterAgent registers a new agent with the controller
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_AXServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'Exec': grpc.unary_stream_rpc_method_handler(
- servicer.Exec,
- request_deserializer=proto_dot_ax__pb2.ExecRequest.FromString,
- response_serializer=proto_dot_ax__pb2.ExecResponse.SerializeToString,
- ),
- 'Fork': grpc.unary_unary_rpc_method_handler(
- servicer.Fork,
- request_deserializer=proto_dot_ax__pb2.ForkRequest.FromString,
- response_serializer=proto_dot_ax__pb2.ForkResponse.SerializeToString,
- ),
- 'RegisterAgent': grpc.unary_unary_rpc_method_handler(
- servicer.RegisterAgent,
- request_deserializer=proto_dot_ax__pb2.RegisterAgentRequest.FromString,
- response_serializer=proto_dot_ax__pb2.RegisterAgentResponse.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'proto.AXService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class AXService(object):
- """AXService defines the gRPC service for AX operations
- """
-
- @staticmethod
- def Exec(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/proto.AXService/Exec',
- proto_dot_ax__pb2.ExecRequest.SerializeToString,
- proto_dot_ax__pb2.ExecResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def Fork(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/proto.AXService/Fork',
- proto_dot_ax__pb2.ForkRequest.SerializeToString,
- proto_dot_ax__pb2.ForkResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def RegisterAgent(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/proto.AXService/RegisterAgent',
- proto_dot_ax__pb2.RegisterAgentRequest.SerializeToString,
- proto_dot_ax__pb2.RegisterAgentResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)