Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Add support for external ADK agents via gRPC (#285)
zbl947dbf4e21c067
diff --git a/ax.yaml b/ax.yamlindex 0984441..b07c768 100644--- a/ax.yaml+++ b/ax.yaml@@ -47,6 +47,14 @@ registry:# metadata:# version: "1.0"+ # remote_agents:+ # - id: "weather-agent"+ # name: "Weather agent"+ # description: "Agent to answer questions about the weather in a city."+ # address: "localhost:50051"+ # metadata:+ # version: "1.0"+# colab_agents:# - id: "plotter"# name: "Function Plotter"@@ -63,4 +71,3 @@ registry:# drive_file: "MyDrive/notebooks/data_analysis.ipynb"# input_flag: "query"# output_image: "./examples/colab_agent/chart.png"-diff --git a/examples/adk_agent/__init__.py b/examples/adk_agent/__init__.pynew file mode 100644index 0000000..58d482e--- /dev/null+++ b/examples/adk_agent/__init__.py@@ -0,0 +1,13 @@+# 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/examples/adk_agent/agent.py b/examples/adk_agent/agent.pynew file mode 100644index 0000000..6cf17df--- /dev/null+++ b/examples/adk_agent/agent.py@@ -0,0 +1,59 @@+# 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.++from google.adk.agents import Agent++def get_weather(city: str) -> dict:+ """Retrieves the current weather report for a specified city.++ Args:+ city (str): The name of the city for which to retrieve the weather report.++ Returns:+ dict: status and result or error msg.+ """+ if "new york" in city.lower() or "nyc" in city.lower():+ return {+ "status": "success",+ "report": (+ "The weather in New York is sunny with a temperature of 25 degrees"+ " Celsius (77 degrees Fahrenheit)."+ ),+ }+ elif "san francisco" in city.lower() or "sf" in city.lower():+ return {+ "status": "success",+ "report": (+ "The weather in San Francisco is foggy with a temperature of 16 degrees"+ " Celsius (60.8 degrees Fahrenheit)."+ ),+ }+ else:+ return {+ "status": "error",+ "error_message": f"Weather information for '{city}' is not available.",+ }+++root_agent = Agent(+ name="weather_agent",+ model="gemini-3-flash-preview",+ description=(+ "Agent to answer questions about the weather in a city."+ ),+ instruction=(+ "You are a helpful agent who can answer user questions about the weather in a city."+ ),+ tools=[get_weather],+)diff --git a/python/adk/README.md b/python/adk/README.mdnew file mode 100644index 0000000..2726e44--- /dev/null+++ b/python/adk/README.md@@ -0,0 +1,96 @@+# AX ADK Agent Server Wrapper++This directory contains a Python gRPC wrapper designed to expose any [Google ADK](https://github.com/google/adk) agent as an `AgentService` compatible with the **Agent eXecutor (AX)** runtime.++The wrapper uses `grpc.aio` to run a fully asynchronous, high-performance gRPC server and processes incoming start messages independently within isolated sessions.++---++## Setup Instructions++### 1. Create & Activate a Virtual Environment++It is recommended to use a Python virtual environment (`.venv`) to avoid package conflicts. From the root of the repository, run:++```bash+# Create the virtual environment+python3 -m venv .venv++# Activate the environment (Linux/macOS)+source .venv/bin/activate++# Activate the environment (Windows)+.venv\Scripts\activate+```++### 2. Install Dependencies++Install the required libraries (including `grpcio`, `google-genai`, and `google-adk`) using the provided requirements file:++```bash+pip install -r python/adk/requirements.txt+```++---++## Running the Server++The server loads a target agent file dynamically. By default, it is configured to load the example ADK weather agent at `examples/adk_agent/agent.py`.++### 1. Configure API Credentials++Since the example ADK agent utilizes Gemini models, you need to supply a Gemini API key if using the example ADK agent:++```bash+export GEMINI_API_KEY="your-gemini-api-key-here"+```++### 2. Start the Server++Run the server using your Python virtual environment:++```bash+python python/adk/adk_agent_server.py [options]+```++#### Available CLI Options:+- `--agent_file`: Path to the Python file containing your ADK `root_agent` (default: `examples/adk_agent/agent.py`)+- `--port`: Port number to bind the gRPC server to (default: `50051`)+- `--debug`: Enable debug mode to log all incoming and outgoing gRPC messages (default: `False`)++#### Examples:++```bash+# Start with default weather agent on port 50051+python python/adk/adk_agent_server.py++# Start with debug logging enabled+python python/adk/adk_agent_server.py --debug++# Start with a custom agent file on a custom port with debug mode+python python/adk/adk_agent_server.py --agent_file path/to/your_agent.py --port 50055 --debug+```++Once started, the server will print:+```+Loading agent from examples/adk_agent/agent.py...+Agent loaded successfully.+Server started on port 50051+```++---++## Integrating with AX++To use your running ADK agent in an AX conversation, ensure that the agent is registered in your `ax.yaml` configuration. Example:++```yaml+registry:+ remote_agents:+ - id: "weather-agent"+ name: "Weather agent"+ description: "Agent to answer questions about the weather in a city."+ address: "localhost:50051"+ metadata:+ version: "1.0"+```diff --git a/python/adk/adk_agent_server.py b/python/adk/adk_agent_server.pynew file mode 100644index 0000000..f3dce8c--- /dev/null+++ b/python/adk/adk_agent_server.py@@ -0,0 +1,191 @@+# 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.++import sys+import os+from concurrent import futures+import grpc+import asyncio+import importlib.util+import uuid++# Add the root of the project to sys.path to find generated protos+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../proto')))++import ax_pb2+import ax_pb2_grpc+import content_pb2+from google.adk.agents import Agent, InvocationContext+from google.adk.sessions import Session, InMemorySessionService+from google.genai import types+from google.adk.runners import Runner, Event++class ADKAgentServicer(ax_pb2_grpc.AgentServiceServicer):+ def __init__(self, agent, debug=False):+ self.agent = agent+ self.debug = debug+ self.session_service = InMemorySessionService()+ self.runner = Runner(session_service=self.session_service, agent=self.agent, app_name=self.agent.name)++ async def Connect(self, request_iterator, context):+ try:+ async for request in request_iterator:+ if self.debug:+ print(f"\n{'='*80}\n[DEBUG] Incoming Request (conversation_id: {request.conversation_id}, exec_id: {request.exec_id})\n{'='*80}\n{request}\n{'-'*80}")++ # Use UUID as session id to ensure calls to ADK agents are stateless and isolated.+ session = await self.session_service.create_session(app_name=self.agent.name, user_id="AX_USER", session_id=str(uuid.uuid4()))+ conversation_id = request.conversation_id+ exec_id = request.exec_id+ if not request.HasField('start'):+ raise ValueError(f"Expect start message, got: {request}")++ if not request.start.messages:+ raise ValueError(f"Empty messages in start request")+ messages = request.start.messages++ # Separate historical messages from the latest active query.+ # Only execute/reply to the last message.+ historical_messages = messages[:-1]+ latest_message = messages[-1]++ # Hydrate past history into the session without executing them+ for msg in historical_messages:+ # TODO - Conversion logic for different content types beyond text+ content = types.Content(role=msg.role, parts=[types.Part(text=msg.content.text.text)])+ event = Event(+ invocation_id=str(uuid.uuid4()),+ author=self.agent.name,+ content=content+ )+ await self.session_service.append_event(session, event)++ # Execute only the latest query+ content = types.Content(role=latest_message.role, parts=[types.Part(text=latest_message.content.text.text)])+ async for event in self.runner.run_async(session_id=session.id, user_id=session.user_id, new_message=content):+ if event.content and event.content.parts:+ for part in event.content.parts:+ # TODO - Conversion logic for different content types beyond text+ if getattr(part, 'text', None):+ if part.thought:+ thought_summary = content_pb2.ThoughtSummaryContent(+ text=content_pb2.TextContent(text=part.text)+ )+ response_msg = ax_pb2.Message(+ role="assistant",+ content=content_pb2.Content(+ thought=content_pb2.ThoughtContent(+ summary=[thought_summary]+ )+ )+ )+ else:+ response_msg = ax_pb2.Message(+ role="assistant",+ content=content_pb2.Content(+ text=content_pb2.TextContent(text=part.text)+ )+ )+ # Send conversion_id and exec_id as it is, since ADK agent is stateless.+ yield_msg = ax_pb2.AgentMessage(+ conversation_id=conversation_id,+ exec_id=exec_id,+ outputs=ax_pb2.AgentOutputs(messages=[response_msg])+ )+ if self.debug:+ print(f"[DEBUG] Yielding AgentMessage Response Chunk:\n{yield_msg}\n{'-'*80}")+ yield yield_msg++ # Clean up/delete the stateless session to free resources+ await self.session_service.delete_session(+ app_name=self.agent.name,+ user_id=session.user_id,+ session_id=session.id+ )++ # Send End+ end_msg = ax_pb2.AgentMessage(+ conversation_id=conversation_id,+ exec_id=exec_id,+ end=ax_pb2.AgentEnd()+ )+ if self.debug:+ print(f"[DEBUG] Sending End AgentMessage:\n{end_msg}\n{'='*80}\n")+ yield end_msg+ except Exception as e:+ import logging+ logging.exception(f"CRITICAL ERROR in Connect: {e}")+ raise e++ async def HealthCheck(self, request, context):+ return ax_pb2.HealthCheckResponse(healthy=True, message="ADK Agent Wrapper is healthy")++class ADKAgentServer:+ def __init__(self, agent_file, port="50051", debug=False):+ self.agent_file = agent_file+ self.port = port+ self.debug = debug+ self.server = None+ self.agent = None++ def load_agent(self):+ print(f"Loading agent from {self.agent_file}...")+ spec = importlib.util.spec_from_file_location("agent_module", self.agent_file)+ if spec is None or spec.loader is None:+ raise FileNotFoundError(f"Could not find or load agent file: {self.agent_file}")+ agent_module = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(agent_module)++ self.agent = getattr(agent_module, "root_agent", None)+ if not self.agent:+ raise ValueError(f"No root_agent found in {self.agent_file}")+ print("Agent loaded successfully.")++ async def start(self):+ if not self.agent:+ self.load_agent()++ self.server = grpc.aio.server()+ ax_pb2_grpc.add_AgentServiceServicer_to_server(ADKAgentServicer(self.agent, debug=self.debug), self.server)+ # TODO: Implement auth here and in other places in AX for a stable release.+ self.server.add_insecure_port(f'[::]:{self.port}')+ await self.server.start()+ print(f"Server started on port {self.port}")++ async def wait_for_termination(self):+ if self.server:+ await self.server.wait_for_termination()++ async def stop(self, grace=None):+ if self.server:+ await self.server.stop(grace)++async def main():+ import argparse+ parser = argparse.ArgumentParser()+ parser.add_argument("--agent_file", default="examples/adk_agent/agent.py")+ parser.add_argument("--port", default="50051")+ parser.add_argument("--debug", action="store_true", help="Log all incoming and outgoing gRPC messages")+ args = parser.parse_args()++ server = ADKAgentServer(args.agent_file, args.port, debug=args.debug)+ await server.start()+ try:+ await server.wait_for_termination()+ except KeyboardInterrupt:+ print("Shutting down...")+ await server.stop()++if __name__ == '__main__':+ asyncio.run(main())diff --git a/python/adk/adk_agent_server_test.py b/python/adk/adk_agent_server_test.pynew file mode 100644index 0000000..b5e689f--- /dev/null+++ b/python/adk/adk_agent_server_test.py@@ -0,0 +1,268 @@+# 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.++"""+How to run these tests:++From the root directory of the project, with the virtual environment activated:+ python3 -m unittest python/adk/adk_agent_server_test.py+"""+++import unittest+from unittest.mock import MagicMock, AsyncMock, patch+import asyncio+import sys+import os++# Add proto path to sys.path+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../proto')))++import ax_pb2+import content_pb2+from google.genai import types+from google.adk.runners import Event++from python.adk.adk_agent_server import ADKAgentServicer, ADKAgentServer+++class TestADKAgentServicer(unittest.IsolatedAsyncioTestCase):+ def setUp(self):+ self.mock_agent = MagicMock()+ self.mock_agent.name = "WeatherAgent"+ self.servicer = ADKAgentServicer(self.mock_agent, debug=False)++ # Mock Session Service+ self.servicer.session_service = AsyncMock()+ # Mock Runner+ self.servicer.runner = MagicMock()++ async def test_health_check(self):+ request = MagicMock()+ context = MagicMock()+ response = await self.servicer.HealthCheck(request, context)+ self.assertTrue(response.healthy)+ self.assertEqual(response.message, "ADK Agent Wrapper is healthy")++ async def test_connect_missing_start_field(self):+ # Message missing the 'start' field+ request = ax_pb2.AgentMessage(+ conversation_id="conv-123",+ exec_id="exec-456"+ )++ async def mock_iterator():+ yield request++ context = MagicMock()+ with self.assertRaises(ValueError) as ctx:+ async for _ in self.servicer.Connect(mock_iterator(), context):+ pass+ self.assertIn("Expect start message", str(ctx.exception))++ async def test_connect_empty_start_messages(self):+ # Message with 'start' field but empty messages list+ start_req = ax_pb2.AgentStart(messages=[])+ request = ax_pb2.AgentMessage(+ conversation_id="conv-123",+ exec_id="exec-456",+ start=start_req+ )++ async def mock_iterator():+ yield request++ context = MagicMock()+ with self.assertRaises(ValueError) as ctx:+ async for _ in self.servicer.Connect(mock_iterator(), context):+ pass+ self.assertIn("Empty messages in start request", str(ctx.exception))++ async def test_connect_successful_flow(self):+ # 1. Setup inputs: 1 history message, 1 active prompt message+ hist_msg = ax_pb2.Message(+ role="user",+ content=content_pb2.Content(text=content_pb2.TextContent(text="Hello history"))+ )+ active_msg = ax_pb2.Message(+ role="user",+ content=content_pb2.Content(text=content_pb2.TextContent(text="What's the weather?"))+ )+ start_req = ax_pb2.AgentStart(messages=[hist_msg, active_msg])+ request = ax_pb2.AgentMessage(+ conversation_id="conv-123",+ exec_id="exec-456",+ start=start_req+ )++ async def mock_iterator():+ yield request++ # 2. Mock Session creation+ mock_session = MagicMock()+ mock_session.id = "session-id-789"+ mock_session.user_id = "AX_USER"+ self.servicer.session_service.create_session.return_value = mock_session++ # 3. Mock Runner.run_async return sequence+ async def mock_run_async(session_id, user_id, new_message):+ # Yield event 1+ yield Event(+ invocation_id="inv-0",+ author="WeatherAgent",+ content=types.Content(role="model", parts=[types.Part(text="The weather is ")])+ )+ # Yield event 2+ yield Event(+ invocation_id="inv-1",+ author="WeatherAgent",+ content=types.Content(role="model", parts=[types.Part(text="sunny!")])+ )++ self.servicer.runner.run_async = mock_run_async++ # 4. Consume generator output+ responses = []+ context = MagicMock()+ async for response in self.servicer.Connect(mock_iterator(), context):+ responses.append(response)++ # 5. Assertions+ # Expect 3 response messages: Response Chunk 1, Response Chunk 2, and End Message+ self.assertEqual(len(responses), 3)++ # Verify Session Service calls+ self.servicer.session_service.create_session.assert_called_once()+ self.assertEqual(self.servicer.session_service.append_event.call_count, 1) # Hydrated 1 history message+ self.servicer.session_service.delete_session.assert_called_once_with(+ app_name="WeatherAgent",+ user_id="AX_USER",+ session_id="session-id-789"+ )++ # Verify first response chunk+ self.assertEqual(responses[0].conversation_id, "conv-123")+ self.assertEqual(responses[0].exec_id, "exec-456")+ self.assertEqual(responses[0].outputs.messages[0].content.text.text, "The weather is ")++ # Verify second response chunk+ self.assertEqual(responses[1].conversation_id, "conv-123")+ self.assertEqual(responses[1].exec_id, "exec-456")+ self.assertEqual(responses[1].outputs.messages[0].content.text.text, "sunny!")++ # Verify final End response message+ self.assertEqual(responses[2].conversation_id, "conv-123")+ self.assertEqual(responses[2].exec_id, "exec-456")+ self.assertTrue(responses[2].HasField("end"))++ async def test_connect_with_thought_content(self):+ # 1. Setup inputs+ active_msg = ax_pb2.Message(+ role="user",+ content=content_pb2.Content(text=content_pb2.TextContent(text="Show me your thoughts"))+ )+ start_req = ax_pb2.AgentStart(messages=[active_msg])+ request = ax_pb2.AgentMessage(+ conversation_id="conv-123",+ exec_id="exec-456",+ start=start_req+ )++ async def mock_iterator():+ yield request++ # 2. Mock Session creation+ mock_session = MagicMock()+ mock_session.id = "session-id-789"+ mock_session.user_id = "AX_USER"+ self.servicer.session_service.create_session.return_value = mock_session++ # 3. Mock Runner.run_async returning a thought part+ mock_part = MagicMock()+ mock_part.text = "Thinking..."+ mock_part.thought = True++ mock_content = MagicMock()+ mock_content.role = "model"+ mock_content.parts = [mock_part]++ mock_event = MagicMock()+ mock_event.invocation_id = "inv-0"+ mock_event.author = "WeatherAgent"+ mock_event.content = mock_content++ async def mock_run_async(session_id, user_id, new_message):+ yield mock_event++ self.servicer.runner.run_async = mock_run_async++ # 4. Consume generator output+ responses = []+ context = MagicMock()+ async for response in self.servicer.Connect(mock_iterator(), context):+ responses.append(response)++ # 5. Assertions+ # Expect 2 response messages: Thought response chunk, and End Message+ self.assertEqual(len(responses), 2)++ # Verify first response chunk contains ThoughtContent+ self.assertEqual(responses[0].conversation_id, "conv-123")+ self.assertEqual(responses[0].exec_id, "exec-456")++ message = responses[0].outputs.messages[0]+ self.assertEqual(message.role, "assistant")+ self.assertTrue(message.content.HasField("thought"))+ self.assertEqual(len(message.content.thought.summary), 1)+ self.assertEqual(message.content.thought.summary[0].text.text, "Thinking...")++ # Verify Session Service delete is called+ self.servicer.session_service.delete_session.assert_called_once_with(+ app_name="WeatherAgent",+ user_id="AX_USER",+ session_id="session-id-789"+ )+++class TestADKAgentServer(unittest.TestCase):+ def setUp(self):+ self.server = ADKAgentServer(agent_file="dummy_path.py")++ @patch("importlib.util.spec_from_file_location")+ @patch("importlib.util.module_from_spec")+ def test_load_agent_missing_root_agent(self, mock_module_from_spec, mock_spec_from_file):+ # Configure mock module to lack root_agent attribute+ mock_module = MagicMock()+ del mock_module.root_agent+ mock_module_from_spec.return_value = mock_module++ with self.assertRaises(ValueError) as ctx:+ self.server.load_agent()+ self.assertIn("No root_agent found in", str(ctx.exception))++ @patch("importlib.util.spec_from_file_location")+ @patch("importlib.util.module_from_spec")+ def test_load_agent_success(self, mock_module_from_spec, mock_spec_from_file):+ # Configure mock module with a valid root_agent attribute+ mock_agent = MagicMock()+ mock_module = MagicMock()+ mock_module.root_agent = mock_agent+ mock_module_from_spec.return_value = mock_module++ self.server.load_agent()+ self.assertEqual(self.server.agent, mock_agent)+++if __name__ == "__main__":+ unittest.main()diff --git a/python/adk/requirements.txt b/python/adk/requirements.txtnew file mode 100644index 0000000..6427790--- /dev/null+++ b/python/adk/requirements.txt@@ -0,0 +1,5 @@+grpcio+grpcio-tools+google-genai+google-adk+authlibdiff --git a/python/proto/ax_pb2.py b/python/proto/ax_pb2.pynew file mode 100644index 0000000..988e4ae--- /dev/null+++ b/python/proto/ax_pb2.py@@ -0,0 +1,103 @@+# 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.++# -*- coding: utf-8 -*-+# Generated by the protocol buffer compiler. DO NOT EDIT!+# NO CHECKED-IN PROTOBUF GENCODE+# source: proto/ax.proto+# Protobuf Python Version: 6.31.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 runtime_version as _runtime_version+from google.protobuf import symbol_database as _symbol_database+from google.protobuf.internal import builder as _builder+_runtime_version.ValidateProtobufRuntimeVersion(+ _runtime_version.Domain.PUBLIC,+ 6,+ 31,+ 1,+ '',+ 'proto/ax.proto'+)+# @@protoc_insertion_point(imports)++_sym_db = _symbol_database.Default()+++from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2+import content_pb2 as proto_dot_content__pb2+++DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eproto/ax.proto\x12\x02\x61x\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13proto/content.proto\"S\n\nAgentStart\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x02 \x01(\x0c\x12\x1d\n\x08messages\x18\x03 \x03(\x0b\x32\x0b.ax.Message\"-\n\x0c\x41gentOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"\n\n\x08\x41gentEnd\"\xa3\x01\n\x0c\x41gentMessage\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x1f\n\x05start\x18\x03 \x01(\x0b\x32\x0e.ax.AgentStartH\x00\x12#\n\x07outputs\x18\x04 \x01(\x0b\x32\x10.ax.AgentOutputsH\x00\x12\x1b\n\x03\x65nd\x18\x05 \x01(\x0b\x32\x0c.ax.AgentEndH\x00\x42\x06\n\x04type\"L\n\x07Message\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x1c\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x0b.ax.Content\x12\x15\n\rinternal_only\x18\x03 \x01(\x08\"\x83\x01\n\x11\x43onversationEvent\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0b\n\x03seq\x18\x02 \x01(\x05\x12\x0f\n\x07\x65xec_id\x18\x03 \x01(\t\x12\x1d\n\x08messages\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x05 \x01(\x0e\x32\t.ax.State\"\xcd\x01\n\x0e\x45xecutionEvent\x12\x0f\n\x07\x65xec_id\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x03 \x01(\x0c\x12\x1b\n\x06inputs\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x1c\n\x07outputs\x18\x05 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x06 \x01(\x0e\x32\t.ax.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\"}\n\x0b\x45xecRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x1b\n\x06inputs\x18\x02 \x03(\x0b\x32\x0b.ax.Message\x12\x10\n\x08last_seq\x18\x03 \x01(\x05\x12\x10\n\x08\x61gent_id\x18\x04 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x05 \x01(\x0c\"9\n\x0c\x45xecResponse\x12\x1c\n\x07outputs\x18\x01 \x03(\x0b\x32\x0b.ax.Message\x12\x0b\n\x03seq\x18\x02 \x01(\x05\"$\n\x11RemoteAgentConfig\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"\xe9\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\x38\n\x08metadata\x18\x04 \x03(\x0b\x32&.ax.RegisterAgentRequest.MetadataEntry\x12\'\n\x06remote\x18\x05 \x01(\x0b\x32\x15.ax.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\"&\n\x0bListRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"5\n\x0cListResponse\x12%\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x15.ax.ConversationEvent\"(\n\rDeleteRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"\x10\n\x0e\x44\x65leteResponse\"Y\n\x0b\x46orkRequest\x12\x1b\n\x13src_conversation_id\x18\x01 \x01(\t\x12\x0f\n\x07src_seq\x18\x02 \x01(\x05\x12\x1c\n\x14\x64\x65st_conversation_id\x18\x03 \x01(\t\"\'\n\x0c\x46orkResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t*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\x81\x01\n\x0c\x41gentService\x12\x31\n\x07\x43onnect\x12\x10.ax.AgentMessage\x1a\x10.ax.AgentMessage(\x01\x30\x01\x12>\n\x0bHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2\x86\x01\n\x11\x43ontrollerService\x12+\n\x04\x45xec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x01\x12\x44\n\rRegisterAgent\x12\x18.ax.RegisterAgentRequest\x1a\x19.ax.RegisterAgentResponse2\x98\x01\n\x0f\x45ventLogService\x12)\n\x04List\x12\x0f.ax.ListRequest\x1a\x10.ax.ListResponse\x12/\n\x06\x44\x65lete\x12\x11.ax.DeleteRequest\x1a\x12.ax.DeleteResponse\x12)\n\x04\x46ork\x12\x0f.ax.ForkRequest\x1a\x10.ax.ForkResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')++_globals = globals()+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.ax_pb2', _globals)+if not _descriptor._USE_C_DESCRIPTORS:+ _globals['DESCRIPTOR']._loaded_options = None+ _globals['DESCRIPTOR']._serialized_options = b'Z\032github.com/google/ax/proto'+ _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._loaded_options = None+ _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_options = b'8\001'+ _globals['_STATE']._serialized_start=1657+ _globals['_STATE']._serialized_end=1745+ _globals['_AGENTSTART']._serialized_start=76+ _globals['_AGENTSTART']._serialized_end=159+ _globals['_AGENTOUTPUTS']._serialized_start=161+ _globals['_AGENTOUTPUTS']._serialized_end=206+ _globals['_AGENTEND']._serialized_start=208+ _globals['_AGENTEND']._serialized_end=218+ _globals['_AGENTMESSAGE']._serialized_start=221+ _globals['_AGENTMESSAGE']._serialized_end=384+ _globals['_MESSAGE']._serialized_start=386+ _globals['_MESSAGE']._serialized_end=462+ _globals['_CONVERSATIONEVENT']._serialized_start=465+ _globals['_CONVERSATIONEVENT']._serialized_end=596+ _globals['_EXECUTIONEVENT']._serialized_start=599+ _globals['_EXECUTIONEVENT']._serialized_end=804+ _globals['_HEALTHCHECKREQUEST']._serialized_start=806+ _globals['_HEALTHCHECKREQUEST']._serialized_end=826+ _globals['_HEALTHCHECKRESPONSE']._serialized_start=828+ _globals['_HEALTHCHECKRESPONSE']._serialized_end=883+ _globals['_EXECREQUEST']._serialized_start=885+ _globals['_EXECREQUEST']._serialized_end=1010+ _globals['_EXECRESPONSE']._serialized_start=1012+ _globals['_EXECRESPONSE']._serialized_end=1069+ _globals['_REMOTEAGENTCONFIG']._serialized_start=1071+ _globals['_REMOTEAGENTCONFIG']._serialized_end=1107+ _globals['_REGISTERAGENTREQUEST']._serialized_start=1110+ _globals['_REGISTERAGENTREQUEST']._serialized_end=1343+ _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_start=1286+ _globals['_REGISTERAGENTREQUEST_METADATAENTRY']._serialized_end=1333+ _globals['_REGISTERAGENTRESPONSE']._serialized_start=1345+ _globals['_REGISTERAGENTRESPONSE']._serialized_end=1368+ _globals['_LISTREQUEST']._serialized_start=1370+ _globals['_LISTREQUEST']._serialized_end=1408+ _globals['_LISTRESPONSE']._serialized_start=1410+ _globals['_LISTRESPONSE']._serialized_end=1463+ _globals['_DELETEREQUEST']._serialized_start=1465+ _globals['_DELETEREQUEST']._serialized_end=1505+ _globals['_DELETERESPONSE']._serialized_start=1507+ _globals['_DELETERESPONSE']._serialized_end=1523+ _globals['_FORKREQUEST']._serialized_start=1525+ _globals['_FORKREQUEST']._serialized_end=1614+ _globals['_FORKRESPONSE']._serialized_start=1616+ _globals['_FORKRESPONSE']._serialized_end=1655+ _globals['_AGENTSERVICE']._serialized_start=1748+ _globals['_AGENTSERVICE']._serialized_end=1877+ _globals['_CONTROLLERSERVICE']._serialized_start=1880+ _globals['_CONTROLLERSERVICE']._serialized_end=2014+ _globals['_EVENTLOGSERVICE']._serialized_start=2017+ _globals['_EVENTLOGSERVICE']._serialized_end=2169+# @@protoc_insertion_point(module_scope)diff --git a/python/proto/ax_pb2_grpc.py b/python/proto/ax_pb2_grpc.pynew file mode 100644index 0000000..5463f20--- /dev/null+++ b/python/proto/ax_pb2_grpc.py@@ -0,0 +1,457 @@+# 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+import warnings++import ax_pb2 as proto_dot_ax__pb2++GRPC_GENERATED_VERSION = '1.80.0'+GRPC_VERSION = grpc.__version__+_version_not_supported = False++try:+ from grpc._utilities import first_version_is_lower+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)+except ImportError:+ _version_not_supported = True++if _version_not_supported:+ raise RuntimeError(+ f'The grpc package installed is at version {GRPC_VERSION},'+ + ' but the generated code in proto/ax_pb2_grpc.py depends on'+ + f' grpcio>={GRPC_GENERATED_VERSION}.'+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'+ )+++class AgentServiceStub(object):+ """AgentService defines the gRPC service for agent communication.+ This protocol enables a bidirectional communication between the+ controller and the agent. Agents can start new agentic calls via+ the controller within the same execution boundary by using the channel.++ WARNING: There will be significant changes to this protocol as+ we are solidifying resumption on the wire.+ """++ def __init__(self, channel):+ """Constructor.++ Args:+ channel: A grpc.Channel.+ """+ self.Connect = channel.stream_stream(+ '/ax.AgentService/Connect',+ request_serializer=proto_dot_ax__pb2.AgentMessage.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.AgentMessage.FromString,+ _registered_method=True)+ self.HealthCheck = channel.unary_unary(+ '/ax.AgentService/HealthCheck',+ request_serializer=proto_dot_ax__pb2.HealthCheckRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.HealthCheckResponse.FromString,+ _registered_method=True)+++class AgentServiceServicer(object):+ """AgentService defines the gRPC service for agent communication.+ This protocol enables a bidirectional communication between the+ controller and the agent. Agents can start new agentic calls via+ the controller within the same execution boundary by using the channel.++ WARNING: There will be significant changes to this protocol as+ we are solidifying resumption on the wire.+ """++ def Connect(self, request_iterator, context):+ """Connect is used by agents to connect to the controller.+ """+ 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 = {+ 'Connect': grpc.stream_stream_rpc_method_handler(+ servicer.Connect,+ request_deserializer=proto_dot_ax__pb2.AgentMessage.FromString,+ response_serializer=proto_dot_ax__pb2.AgentMessage.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(+ 'ax.AgentService', rpc_method_handlers)+ server.add_generic_rpc_handlers((generic_handler,))+ server.add_registered_method_handlers('ax.AgentService', rpc_method_handlers)+++ # This class is part of an EXPERIMENTAL API.+class AgentService(object):+ """AgentService defines the gRPC service for agent communication.+ This protocol enables a bidirectional communication between the+ controller and the agent. Agents can start new agentic calls via+ the controller within the same execution boundary by using the channel.++ WARNING: There will be significant changes to this protocol as+ we are solidifying resumption on the wire.+ """++ @staticmethod+ def Connect(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,+ '/ax.AgentService/Connect',+ proto_dot_ax__pb2.AgentMessage.SerializeToString,+ proto_dot_ax__pb2.AgentMessage.FromString,+ options,+ channel_credentials,+ insecure,+ call_credentials,+ compression,+ wait_for_ready,+ timeout,+ metadata,+ _registered_method=True)++ @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,+ '/ax.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,+ _registered_method=True)+++class ControllerServiceStub(object):+ """Missing associated documentation comment in .proto file."""++ def __init__(self, channel):+ """Constructor.++ Args:+ channel: A grpc.Channel.+ """+ self.Exec = channel.unary_stream(+ '/ax.ControllerService/Exec',+ request_serializer=proto_dot_ax__pb2.ExecRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.ExecResponse.FromString,+ _registered_method=True)+ self.RegisterAgent = channel.unary_unary(+ '/ax.ControllerService/RegisterAgent',+ request_serializer=proto_dot_ax__pb2.RegisterAgentRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.RegisterAgentResponse.FromString,+ _registered_method=True)+++class ControllerServiceServicer(object):+ """Missing associated documentation comment in .proto file."""++ def Exec(self, request, context):+ """Exec executes an agentic task or resumes an existing one with streaming responses+ If the conversation_id already exists, it will be resumed.+ """+ 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_ControllerServiceServicer_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,+ ),+ '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(+ 'ax.ControllerService', rpc_method_handlers)+ server.add_generic_rpc_handlers((generic_handler,))+ server.add_registered_method_handlers('ax.ControllerService', rpc_method_handlers)+++ # This class is part of an EXPERIMENTAL API.+class ControllerService(object):+ """Missing associated documentation comment in .proto file."""++ @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,+ '/ax.ControllerService/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,+ _registered_method=True)++ @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,+ '/ax.ControllerService/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,+ _registered_method=True)+++class EventLogServiceStub(object):+ """Missing associated documentation comment in .proto file."""++ def __init__(self, channel):+ """Constructor.++ Args:+ channel: A grpc.Channel.+ """+ self.List = channel.unary_unary(+ '/ax.EventLogService/List',+ request_serializer=proto_dot_ax__pb2.ListRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.ListResponse.FromString,+ _registered_method=True)+ self.Delete = channel.unary_unary(+ '/ax.EventLogService/Delete',+ request_serializer=proto_dot_ax__pb2.DeleteRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.DeleteResponse.FromString,+ _registered_method=True)+ self.Fork = channel.unary_unary(+ '/ax.EventLogService/Fork',+ request_serializer=proto_dot_ax__pb2.ForkRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.ForkResponse.FromString,+ _registered_method=True)+++class EventLogServiceServicer(object):+ """Missing associated documentation comment in .proto file."""++ def List(self, request, context):+ """List conversational events.+ """+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)+ context.set_details('Method not implemented!')+ raise NotImplementedError('Method not implemented!')++ def Delete(self, request, context):+ """Deletes conversational events and all event log resources+ for its children executions.+ """+ 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 conversation.+ """+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)+ context.set_details('Method not implemented!')+ raise NotImplementedError('Method not implemented!')+++def add_EventLogServiceServicer_to_server(servicer, server):+ rpc_method_handlers = {+ 'List': grpc.unary_unary_rpc_method_handler(+ servicer.List,+ request_deserializer=proto_dot_ax__pb2.ListRequest.FromString,+ response_serializer=proto_dot_ax__pb2.ListResponse.SerializeToString,+ ),+ 'Delete': grpc.unary_unary_rpc_method_handler(+ servicer.Delete,+ request_deserializer=proto_dot_ax__pb2.DeleteRequest.FromString,+ response_serializer=proto_dot_ax__pb2.DeleteResponse.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,+ ),+ }+ generic_handler = grpc.method_handlers_generic_handler(+ 'ax.EventLogService', rpc_method_handlers)+ server.add_generic_rpc_handlers((generic_handler,))+ server.add_registered_method_handlers('ax.EventLogService', rpc_method_handlers)+++ # This class is part of an EXPERIMENTAL API.+class EventLogService(object):+ """Missing associated documentation comment in .proto file."""++ @staticmethod+ def List(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,+ '/ax.EventLogService/List',+ proto_dot_ax__pb2.ListRequest.SerializeToString,+ proto_dot_ax__pb2.ListResponse.FromString,+ options,+ channel_credentials,+ insecure,+ call_credentials,+ compression,+ wait_for_ready,+ timeout,+ metadata,+ _registered_method=True)++ @staticmethod+ def Delete(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,+ '/ax.EventLogService/Delete',+ proto_dot_ax__pb2.DeleteRequest.SerializeToString,+ proto_dot_ax__pb2.DeleteResponse.FromString,+ options,+ channel_credentials,+ insecure,+ call_credentials,+ compression,+ wait_for_ready,+ timeout,+ metadata,+ _registered_method=True)++ @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,+ '/ax.EventLogService/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,+ _registered_method=True)diff --git a/python/proto/content_pb2.py b/python/proto/content_pb2.pynew file mode 100644index 0000000..dff1333--- /dev/null+++ b/python/proto/content_pb2.py@@ -0,0 +1,90 @@+# 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.++# -*- coding: utf-8 -*-+# Generated by the protocol buffer compiler. DO NOT EDIT!+# NO CHECKED-IN PROTOBUF GENCODE+# source: proto/content.proto+# Protobuf Python Version: 6.31.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 runtime_version as _runtime_version+from google.protobuf import symbol_database as _symbol_database+from google.protobuf.internal import builder as _builder+_runtime_version.ValidateProtobufRuntimeVersion(+ _runtime_version.Domain.PUBLIC,+ 6,+ 31,+ 1,+ '',+ 'proto/content.proto'+)+# @@protoc_insertion_point(imports)++_sym_db = _symbol_database.Default()+++from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2+++DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13proto/content.proto\x12\x02\x61x\x1a\x1cgoogle/protobuf/struct.proto\"-\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\"\xa3\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\x14.ax.ApprovalDecisionH\x00\x12&\n\x07\x64\x65\x63line\x18\x06 \x01(\x0b\x32\x13.ax.DeclineDecisionH\x00\x42\n\n\x08\x64\x65\x63isionJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x04type\"F\n\x15ThoughtSummaryContent\x12\x1f\n\x04text\x18\x01 \x01(\x0b\x32\x0f.ax.TextContentH\x00\x42\x06\n\x04typeJ\x04\x08\x02\x10\x03\"y\n\x0eThoughtContent\x12\x11\n\tsignature\x18\x07 \x01(\x0c\x12*\n\x07summary\x18\t \x03(\x0b\x32\x19.ax.ThoughtSummaryContentJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x08\x10\tR\x04type\"j\n\x0fToolCallContent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tsignature\x18\t \x01(\x0c\x12\x30\n\rfunction_call\x18\x02 \x01(\x0b\x32\x17.ax.FunctionCallContentH\x00\x42\x06\n\x04type\"{\n\x11ToolResultContent\x12\x0f\n\x07\x63\x61ll_id\x18\x08 \x01(\t\x12\x11\n\tsignature\x18\t \x01(\x0c\x12\x34\n\x0f\x66unction_result\x18\x02 \x01(\x0b\x32\x19.ax.FunctionResultContentH\x00\x42\x06\n\x04typeJ\x04\x08\x01\x10\x02\"[\n\x13\x46unctionCallContent\x12\x0c\n\x04name\x18\x03 \x01(\t\x12*\n\targuments\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\"n\n\x15\x46unctionResultContent\x12\x0c\n\x04name\x18\x08 \x01(\t\x12+\n\x08response\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x42\x08\n\x06resultJ\x04\x08\x01\x10\x02J\x04\x08\x04\x10\x05R\x04type\"\xbd\x02\n\x0cImageContent\x12,\n\tmime_type\x18\x01 \x01(\x0e\x32\x19.ax.ImageContent.MimeType\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x06 \x01(\tH\x00\x12\'\n\nresolution\x18\x05 \x01(\x0e\x32\x13.ax.MediaResolution\"\x9b\x01\n\x08MimeType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TYPE_PNG\x10\x01\x12\r\n\tTYPE_JPEG\x10\x02\x12\r\n\tTYPE_WEBP\x10\x03\x12\r\n\tTYPE_HEIC\x10\x04\x12\r\n\tTYPE_HEIF\x10\x05\x12\x0c\n\x08TYPE_GIF\x10\x07\x12\x0c\n\x08TYPE_BMP\x10\x08\x12\r\n\tTYPE_TIFF\x10\t\"\x04\x08\x06\x10\x06\x42\r\n\x0b\x64\x61ta_or_uriJ\x04\x08\x03\x10\x04R\x04type\"\x8b\x03\n\x0c\x41udioContent\x12,\n\tmime_type\x18\x01 \x01(\x0e\x32\x19.ax.AudioContent.MimeType\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x05 \x01(\tH\x00\x12\x10\n\x08\x63hannels\x18\x07 \x01(\x05\x12\x13\n\x0bsample_rate\x18\x08 \x01(\x05\"\xdf\x01\n\x08MimeType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TYPE_WAV\x10\x01\x12\x0c\n\x08TYPE_MP3\x10\x02\x12\r\n\tTYPE_AIFF\x10\x03\x12\x0c\n\x08TYPE_AAC\x10\x04\x12\x0c\n\x08TYPE_OGG\x10\x05\x12\r\n\tTYPE_FLAC\x10\x06\x12\r\n\tTYPE_MPEG\x10\x07\x12\x0c\n\x08TYPE_M4A\x10\x08\x12\x0c\n\x08TYPE_L16\x10\t\x12\x0e\n\nTYPE_S16LE\x10\n\x12\r\n\tTYPE_OPUS\x10\x0b\x12\r\n\tTYPE_ALAW\x10\x0c\x12\x0e\n\nTYPE_MULAW\x10\rB\r\n\x0b\x64\x61ta_or_uriJ\x04\x08\x03\x10\x04J\x04\x08\x06\x10\x07R\x04typeR\x04rate\"\xcc\x01\n\x0f\x44ocumentContent\x12/\n\tmime_type\x18\x01 \x01(\x0e\x32\x1c.ax.DocumentContent.MimeType\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x05 \x01(\tH\x00\"N\n\x08MimeType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TYPE_PDF\x10\x01\x12\r\n\tTYPE_JSON\x10\x02\x12\x0f\n\x0bTYPE_PYTHON\x10\x03\x42\r\n\x0b\x64\x61ta_or_uriJ\x04\x08\x03\x10\x04R\x04type\"\xc5\x02\n\x0cVideoContent\x12,\n\tmime_type\x18\x01 \x01(\x0e\x32\x19.ax.VideoContent.MimeType\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x06 \x01(\tH\x00\x12\'\n\nresolution\x18\x05 \x01(\x0e\x32\x13.ax.MediaResolution\"\xa3\x01\n\x08MimeType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TYPE_MP4\x10\x01\x12\r\n\tTYPE_MPEG\x10\x02\x12\x0c\n\x08TYPE_MPG\x10\x03\x12\x0c\n\x08TYPE_MOV\x10\x04\x12\x0c\n\x08TYPE_AVI\x10\x05\x12\x0e\n\nTYPE_X_FLV\x10\x06\x12\r\n\tTYPE_WEBM\x10\x07\x12\x0c\n\x08TYPE_WMV\x10\x08\x12\r\n\tTYPE_3GPP\x10\tB\r\n\x0b\x64\x61ta_or_uriJ\x04\x08\x03\x10\x04R\x04type\"\x86\x03\n\x07\x43ontent\x12%\n\x07thought\x18\x05 \x01(\x0b\x32\x12.ax.ThoughtContentH\x00\x12\x1f\n\x04text\x18\n \x01(\x0b\x32\x0f.ax.TextContentH\x00\x12!\n\x05image\x18\x0b \x01(\x0b\x32\x10.ax.ImageContentH\x00\x12!\n\x05\x61udio\x18\x0c \x01(\x0b\x32\x10.ax.AudioContentH\x00\x12\'\n\x08\x64ocument\x18\r \x01(\x0b\x32\x13.ax.DocumentContentH\x00\x12!\n\x05video\x18\x0e \x01(\x0b\x32\x10.ax.VideoContentH\x00\x12/\n\x0c\x63onfirmation\x18\x1a \x01(\x0b\x32\x17.ax.ConfirmationContentH\x00\x12(\n\ttool_call\x18\x18 \x01(\x0b\x32\x13.ax.ToolCallContentH\x00\x12,\n\x0btool_result\x18\x19 \x01(\x0b\x32\x15.ax.ToolResultContentH\x00\x42\x06\n\x04typeJ\x04\x08\x01\x10\x05J\x04\x08\x06\x10\nJ\x04\x08\x0f\x10\x18*b\n\x0fMediaResolution\x12 \n\x1cMEDIA_RESOLUTION_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0e\n\nULTRA_HIGH\x10\x04\x42\x1cZ\x1agithub.com/google/ax/protob\x06proto3')++_globals = globals()+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.content_pb2', _globals)+if not _descriptor._USE_C_DESCRIPTORS:+ _globals['DESCRIPTOR']._loaded_options = None+ _globals['DESCRIPTOR']._serialized_options = b'Z\032github.com/google/ax/proto'+ _globals['_MEDIARESOLUTION']._serialized_start=2638+ _globals['_MEDIARESOLUTION']._serialized_end=2736+ _globals['_TEXTCONTENT']._serialized_start=57+ _globals['_TEXTCONTENT']._serialized_end=102+ _globals['_APPROVALDECISION']._serialized_start=104+ _globals['_APPROVALDECISION']._serialized_end=140+ _globals['_DECLINEDECISION']._serialized_start=142+ _globals['_DECLINEDECISION']._serialized_end=191+ _globals['_CONFIRMATIONCONTENT']._serialized_start=194+ _globals['_CONFIRMATIONCONTENT']._serialized_end=357+ _globals['_THOUGHTSUMMARYCONTENT']._serialized_start=359+ _globals['_THOUGHTSUMMARYCONTENT']._serialized_end=429+ _globals['_THOUGHTCONTENT']._serialized_start=431+ _globals['_THOUGHTCONTENT']._serialized_end=552+ _globals['_TOOLCALLCONTENT']._serialized_start=554+ _globals['_TOOLCALLCONTENT']._serialized_end=660+ _globals['_TOOLRESULTCONTENT']._serialized_start=662+ _globals['_TOOLRESULTCONTENT']._serialized_end=785+ _globals['_FUNCTIONCALLCONTENT']._serialized_start=787+ _globals['_FUNCTIONCALLCONTENT']._serialized_end=878+ _globals['_FUNCTIONRESULTCONTENT']._serialized_start=880+ _globals['_FUNCTIONRESULTCONTENT']._serialized_end=990+ _globals['_IMAGECONTENT']._serialized_start=993+ _globals['_IMAGECONTENT']._serialized_end=1310+ _globals['_IMAGECONTENT_MIMETYPE']._serialized_start=1128+ _globals['_IMAGECONTENT_MIMETYPE']._serialized_end=1283+ _globals['_AUDIOCONTENT']._serialized_start=1313+ _globals['_AUDIOCONTENT']._serialized_end=1708+ _globals['_AUDIOCONTENT_MIMETYPE']._serialized_start=1446+ _globals['_AUDIOCONTENT_MIMETYPE']._serialized_end=1669+ _globals['_DOCUMENTCONTENT']._serialized_start=1711+ _globals['_DOCUMENTCONTENT']._serialized_end=1915+ _globals['_DOCUMENTCONTENT_MIMETYPE']._serialized_start=1810+ _globals['_DOCUMENTCONTENT_MIMETYPE']._serialized_end=1888+ _globals['_VIDEOCONTENT']._serialized_start=1918+ _globals['_VIDEOCONTENT']._serialized_end=2243+ _globals['_VIDEOCONTENT_MIMETYPE']._serialized_start=2053+ _globals['_VIDEOCONTENT_MIMETYPE']._serialized_end=2216+ _globals['_CONTENT']._serialized_start=2246+ _globals['_CONTENT']._serialized_end=2636+# @@protoc_insertion_point(module_scope)diff --git a/python/proto/content_pb2_grpc.py b/python/proto/content_pb2_grpc.pynew file mode 100644index 0000000..8ead1e8--- /dev/null+++ b/python/proto/content_pb2_grpc.py@@ -0,0 +1,38 @@+# 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+import warnings+++GRPC_GENERATED_VERSION = '1.80.0'+GRPC_VERSION = grpc.__version__+_version_not_supported = False++try:+ from grpc._utilities import first_version_is_lower+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)+except ImportError:+ _version_not_supported = True++if _version_not_supported:+ raise RuntimeError(+ f'The grpc package installed is at version {GRPC_VERSION},'+ + ' but the generated code in proto/content_pb2_grpc.py depends on'+ + f' grpcio>={GRPC_GENERATED_VERSION}.'+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'+ )