Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Use harness service in antigravity implementation. (#71)
Junjie Wangc6d3496e256c
diff --git a/internal/harness/antigravity.go b/internal/harness/antigravity.goindex 15158de..f1d03a8 100644--- a/internal/harness/antigravity.go+++ b/internal/harness/antigravity.go@@ -107,23 +107,30 @@ func (e *antigravityExecution) Run(ctx context.Context, handler Handler) error {}defer conn.Close()- // 2. Create AgentService client- client := proto.NewAgentServiceClient(conn)+ // 2. Create HarnessService client.+ client := proto.NewHarnessServiceClient(conn)- // 3. Build standard AgentRequest- req := &proto.AgentRequest{+ // 3. Build standard HarnessRequest.+ start := &proto.HarnessRequest{ConversationId: e.conversationID,- ExecId: e.id,- Start: &proto.AgentStart{- AgentId: "antigravity",- Messages: inputs,+ HarnessId: "antigravity",+ Type: &proto.HarnessRequest_Start{+ Start: &proto.HarnessStart{+ Messages: inputs,+ },},}// 4. Call Connect to start bidirectional streaming- stream, err := client.Connect(ctx, req)+ stream, err := client.Connect(ctx)if err != nil {- return fmt.Errorf("failed to call gRPC AgentService.Connect: %w", err)+ return fmt.Errorf("failed to call gRPC HarnessService.Connect: %w", err)+ }+ if err := stream.Send(start); err != nil {+ return fmt.Errorf("failed to send harness start: %w", err)+ }+ if err := stream.CloseSend(); err != nil {+ return fmt.Errorf("failed to close stream send direction: %w", err)}// 5. Stream responses and trigger callbacks@@ -137,14 +144,16 @@ func (e *antigravityExecution) Run(ctx context.Context, handler Handler) error {}switch payload := resp.Type.(type) {- case *proto.AgentResponse_Outputs:+ case *proto.HarnessResponse_Outputs:for _, outMsg := range payload.Outputs.Messages {if err := handler.OnMessage(ctx, e.id, outMsg); err != nil {return fmt.Errorf("failed to dispatch streamed output: %w", err)}}- case *proto.AgentResponse_End:- // Standard turn complete callback+ case *proto.HarnessResponse_End:+ if payload.End.GetState() == proto.State_STATE_FAILED {+ return fmt.Errorf("harness failed: %s", payload.End.GetErrorMessage())+ }return handler.OnComplete(ctx, e.id)}}diff --git a/internal/harness/antigravity_test.go b/internal/harness/antigravity_test.goindex 18d23b9..ca7392f 100644--- a/internal/harness/antigravity_test.go+++ b/internal/harness/antigravity_test.go@@ -49,19 +49,25 @@ func (h *mockHandler) OnComplete(ctx context.Context, execID string) error {return nil}-// mockAgentServer implements proto.AgentServiceServer for testing.-type mockAgentServer struct {- proto.UnimplementedAgentServiceServer+// mockHarnessServer implements proto.HarnessServiceServer for testing.+type mockHarnessServer struct {+ proto.UnimplementedHarnessServiceServerfailConnect bool}-func (s *mockAgentServer) Connect(req *proto.AgentRequest, stream proto.AgentService_ConnectServer) error {+func (s *mockHarnessServer) Connect(stream proto.HarnessService_ConnectServer) error {if s.failConnect {return status.Error(codes.Internal, "internal mock server crash")}+ // Read the initiating HarnessRequest{start}.+ req, err := stream.Recv()+ if err != nil {+ return err+ }+// 1. Verify conversation details- if req.ConversationId != "conv-test" {+ if req.GetConversationId() != "conv-test" {return status.Error(codes.InvalidArgument, "invalid conversation_id")}@@ -82,14 +88,12 @@ func (s *mockAgentServer) Connect(req *proto.AgentRequest, stream proto.AgentSer},},}- err := stream.Send(&proto.AgentResponse{- ConversationId: req.ConversationId,- ExecId: req.ExecId,- Type: &proto.AgentResponse_Outputs{- Outputs: &proto.AgentOutputs{Messages: []*proto.Message{tMsg}},+ if err := stream.Send(&proto.HarnessResponse{+ ConversationId: req.GetConversationId(),+ Type: &proto.HarnessResponse_Outputs{+ Outputs: &proto.HarnessOutputs{Messages: []*proto.Message{tMsg}},},- })- if err != nil {+ }); err != nil {return err}@@ -102,23 +106,20 @@ func (s *mockAgentServer) Connect(req *proto.AgentRequest, stream proto.AgentSer},},}- err = stream.Send(&proto.AgentResponse{- ConversationId: req.ConversationId,- ExecId: req.ExecId,- Type: &proto.AgentResponse_Outputs{- Outputs: &proto.AgentOutputs{Messages: []*proto.Message{txtMsg}},+ if err := stream.Send(&proto.HarnessResponse{+ ConversationId: req.GetConversationId(),+ Type: &proto.HarnessResponse_Outputs{+ Outputs: &proto.HarnessOutputs{Messages: []*proto.Message{txtMsg}},},- })- if err != nil {+ }); err != nil {return err}// 4. Stream end frame- return stream.Send(&proto.AgentResponse{- ConversationId: req.ConversationId,- ExecId: req.ExecId,- Type: &proto.AgentResponse_End{- End: &proto.AgentEnd{},+ return stream.Send(&proto.HarnessResponse{+ ConversationId: req.GetConversationId(),+ Type: &proto.HarnessResponse_End{+ End: &proto.HarnessEnd{State: proto.State_STATE_COMPLETED},},})}@@ -133,8 +134,8 @@ func TestAntigravityHarness_Run_Success(t *testing.T) {// Initialize and start local gRPC servergrpcServer := grpc.NewServer()- mockServer := &mockAgentServer{}- proto.RegisterAgentServiceServer(grpcServer, mockServer)+ mockServer := &mockHarnessServer{}+ proto.RegisterHarnessServiceServer(grpcServer, mockServer)go func() {if err := grpcServer.Serve(lis); err != nil && err != grpc.ErrServerStopped {@@ -191,8 +192,8 @@ func TestAntigravityHarness_Run_ErrorFrame(t *testing.T) {defer lis.Close()grpcServer := grpc.NewServer()- mockServer := &mockAgentServer{failConnect: true}- proto.RegisterAgentServiceServer(grpcServer, mockServer)+ mockServer := &mockHarnessServer{failConnect: true}+ proto.RegisterHarnessServiceServer(grpcServer, mockServer)go func() {_ = grpcServer.Serve(lis)diff --git a/python/antigravity/harness_server.py b/python/antigravity/harness_server.pyindex 04f65f6..ae34a7b 100644--- a/python/antigravity/harness_server.py+++ b/python/antigravity/harness_server.py@@ -15,7 +15,7 @@# NOTE ON ARCHITECTURE:# This is a generic, reusable gRPC server that does not define tools or personas.# Instead, it dynamically imports any agent configuration file (defaulting to examples/antigravity_agent/agent.py)-# passed via the --agent_file CLI argument, then hosts it over the AX AgentService protocol.+# passed via the --agent_file CLI argument, then hosts it over the AX HarnessService protocol.import argparse@@ -93,33 +93,48 @@ def hydrate_ax_history_to_steps(historical_messages) -> list[Step]:steps.append(step)return steps-class AntigravityAgentServiceServicer(ax_pb2_grpc.AgentServiceServicer):- """Implements the standard ax.AgentService protocol over gRPC."""+class AntigravityHarnessServiceServicer(ax_pb2_grpc.HarnessServiceServicer):+ """Implements the ax.HarnessService protocol over gRPC."""- async def Connect(self, request: ax_pb2.AgentRequest, context):- print(f"[gRPC] Connect turn requested. conv_id={request.conversation_id}, exec_id={request.exec_id}")+ async def Connect(self, request_iterator, context):+ # Each HarnessRequest{start} drives one stateless turn; the stream stays+ # open across turns until the client half-closes.+ async for request in request_iterator:+ if request.WhichOneof("type") != "start":+ continue # cancel frames not handled yet+ async for response in self._run_turn(request):+ yield response++ async def _run_turn(self, request):+ print(f"[gRPC] Connect turn requested. conv_id={request.conversation_id}")# 1. Retrieve and check messagesax_messages = request.start.messagesif not ax_messages:- context.set_code(grpc.StatusCode.INVALID_ARGUMENT)- context.set_details("No messages found in start payload")+ yield ax_pb2.HarnessResponse(+ conversation_id=request.conversation_id,+ end=ax_pb2.HarnessEnd(state=ax_pb2.STATE_FAILED, error_message="No messages found in start payload")+ )returnhistorical_messages = ax_messages[:-1]latest_message = ax_messages[-1]if latest_message.content.WhichOneof('type') != 'text':- context.set_code(grpc.StatusCode.INVALID_ARGUMENT)- context.set_details("Latest message must contain text content")+ yield ax_pb2.HarnessResponse(+ conversation_id=request.conversation_id,+ end=ax_pb2.HarnessEnd(state=ax_pb2.STATE_FAILED, error_message="Latest message must contain text content")+ )returnlatest_query_text = latest_message.content.text.text# 2. Initialize the Antigravity Agent sessionglobal loaded_configif not loaded_config:- context.set_code(grpc.StatusCode.INTERNAL)- context.set_details("Agent config is not loaded on the server")+ yield ax_pb2.HarnessResponse(+ conversation_id=request.conversation_id,+ end=ax_pb2.HarnessEnd(state=ax_pb2.STATE_FAILED, error_message="Agent config is not loaded on the server")+ )returntry:@@ -141,10 +156,9 @@ class AntigravityAgentServiceServicer(ax_pb2_grpc.AgentServiceServicer):role="assistant",content=content_pb2.Content(text=content_pb2.TextContent(text=chunk.text)))- yield ax_pb2.AgentResponse(+ yield ax_pb2.HarnessResponse(conversation_id=request.conversation_id,- exec_id=request.exec_id,- outputs=ax_pb2.AgentOutputs(messages=[msg])+ outputs=ax_pb2.HarnessOutputs(messages=[msg]))elif isinstance(chunk, Thought):summary = [@@ -154,10 +168,9 @@ class AntigravityAgentServiceServicer(ax_pb2_grpc.AgentServiceServicer):role="model",content=content_pb2.Content(thought=content_pb2.ThoughtContent(summary=summary)))- yield ax_pb2.AgentResponse(+ yield ax_pb2.HarnessResponse(conversation_id=request.conversation_id,- exec_id=request.exec_id,- outputs=ax_pb2.AgentOutputs(messages=[msg])+ outputs=ax_pb2.HarnessOutputs(messages=[msg]))elif isinstance(chunk, ToolCall):struct_args = Struct()@@ -174,33 +187,29 @@ class AntigravityAgentServiceServicer(ax_pb2_grpc.AgentServiceServicer):function_call=func_call)))- yield ax_pb2.AgentResponse(+ yield ax_pb2.HarnessResponse(conversation_id=request.conversation_id,- exec_id=request.exec_id,- outputs=ax_pb2.AgentOutputs(messages=[msg])+ outputs=ax_pb2.HarnessOutputs(messages=[msg]))# Yield completion end frame- yield ax_pb2.AgentResponse(+ yield ax_pb2.HarnessResponse(conversation_id=request.conversation_id,- exec_id=request.exec_id,- end=ax_pb2.AgentEnd()+ end=ax_pb2.HarnessEnd(state=ax_pb2.STATE_COMPLETED))print("[gRPC] Turn completed successfully.")except Exception as e:logging.exception("Error inside Connect servicer execution")- context.set_code(grpc.StatusCode.INTERNAL)- context.set_details(f"Agent execution terminated due to error. ({str(e)})")+ yield ax_pb2.HarnessResponse(+ conversation_id=request.conversation_id,+ end=ax_pb2.HarnessEnd(state=ax_pb2.STATE_FAILED, error_message=f"Agent execution terminated due to error. ({str(e)})")+ )return- async def HealthCheck(self, request: ax_pb2.HealthCheckRequest, context):- """Simple health-probe responder."""- return ax_pb2.HealthCheckResponse(healthy=True, message="Antigravity gRPC harness active")-async def serve(host: str, port: int):server = grpc.aio.server()- ax_pb2_grpc.add_AgentServiceServicer_to_server(AntigravityAgentServiceServicer(), server)+ ax_pb2_grpc.add_HarnessServiceServicer_to_server(AntigravityHarnessServiceServicer(), server)listen_addr = f"{host}:{port}"server.add_insecure_port(listen_addr)diff --git a/python/antigravity/harness_server_test.py b/python/antigravity/harness_server_test.pyindex fbff32a..8b4baf3 100644--- a/python/antigravity/harness_server_test.py+++ b/python/antigravity/harness_server_test.py@@ -16,7 +16,7 @@ import asyncioimport pytestimport grpcfrom python.proto import ax_pb2, ax_pb2_grpc, content_pb2-from python.antigravity.harness_server import AntigravityAgentServiceServicer, loaded_config+from python.antigravity.harness_server import AntigravityHarnessServiceServicer, loaded_configfrom google.antigravity import LocalAgentConfig@pytest.fixture@@ -30,15 +30,15 @@ def test_grpc_connect_success(mock_config, monkeypatch):async def _run():# 1. Start temporary local gRPC server on random open portserver = grpc.aio.server()- servicer = AntigravityAgentServiceServicer()- ax_pb2_grpc.add_AgentServiceServicer_to_server(servicer, server)+ servicer = AntigravityHarnessServiceServicer()+ ax_pb2_grpc.add_HarnessServiceServicer_to_server(servicer, server)port = server.add_insecure_port("localhost:0")await server.start()# 2. Connect async stub channeladdr = f"localhost:{port}"async with grpc.aio.insecure_channel(addr) as channel:- stub = ax_pb2_grpc.AgentServiceStub(channel)+ stub = ax_pb2_grpc.HarnessServiceStub(channel)# Mock the underlying Antigravity SDK class callsclass MockConversation:@@ -64,21 +64,23 @@ def test_grpc_connect_success(mock_config, monkeypatch):monkeypatch.setattr("python.antigravity.harness_server.Agent", MockAgent)- # 3. Construct and fire standard AgentRequest- start_payload = ax_pb2.AgentStart(- agent_id="test",+ # 3. Construct and fire a HarnessRequest{start} over the bidi stream+ start_payload = ax_pb2.HarnessStart(messages=[ax_pb2.Message(role="user", content=content_pb2.Content(text=content_pb2.TextContent(text="Hi")))])- req = ax_pb2.AgentRequest(+ req = ax_pb2.HarnessRequest(conversation_id="conv-test",- exec_id="exec-test",+ harness_id="antigravity",start=start_payload)+ async def request_iter():+ yield req+responses = []- async for resp in stub.Connect(req):+ async for resp in stub.Connect(request_iter()):responses.append(resp)# 4. Assert outputs are correctly mapped and completed@@ -86,6 +88,7 @@ def test_grpc_connect_success(mock_config, monkeypatch):assert responses[0].outputs.messages[0].content.thought.summary[0].text.text == "Thinking details"assert responses[1].outputs.messages[0].content.text.text == "Hello human"assert responses[2].WhichOneof('type') == 'end'+ assert responses[2].end.state == ax_pb2.STATE_COMPLETEDawait server.stop(0)diff --git a/python/proto/ax_pb2.py b/python/proto/ax_pb2.pyindex 9c62f51..2e4ede0 100644--- a/python/proto/ax_pb2.py+++ b/python/proto/ax_pb2.py@@ -40,7 +40,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__from proto 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\"W\n\x0c\x41gentRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x1d\n\x05start\x18\x03 \x01(\x0b\x32\x0e.ax.AgentStart\"\x83\x01\n\rAgentResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12#\n\x07outputs\x18\x03 \x01(\x0b\x32\x10.ax.AgentOutputsH\x00\x12\x1b\n\x03\x65nd\x18\x04 \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\x0eHarnessMessage\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"}\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\"4\n\x19\x44\x65leteConversationRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"\x1c\n\x1a\x44\x65leteConversationResponse\"e\n\x17\x46orkConversationRequest\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\"3\n\x18\x46orkConversationResponse\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\x80\x01\n\x0c\x41gentService\x12\x30\n\x07\x43onnect\x12\x10.ax.AgentRequest\x1a\x11.ax.AgentResponse0\x01\x12>\n\x0bHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2G\n\x0eHarnessService\x12\x35\n\x07\x43onnect\x12\x12.ax.HarnessMessage\x1a\x12.ax.HarnessMessage(\x01\x30\x01\x32@\n\x11\x43ontrollerService\x12+\n\x04\x45xec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x01\x32\xb9\x01\n\x13\x43onversationService\x12S\n\x12\x44\x65leteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponse\x12M\n\x10\x46orkConversation\x12\x1b.ax.ForkConversationRequest\x1a\x1c.ax.ForkConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')+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\"W\n\x0c\x41gentRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x1d\n\x05start\x18\x03 \x01(\x0b\x32\x0e.ax.AgentStart\"\x83\x01\n\rAgentResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12#\n\x07outputs\x18\x03 \x01(\x0b\x32\x10.ax.AgentOutputsH\x00\x12\x1b\n\x03\x65nd\x18\x04 \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\"E\n\x0cHarnessStart\x12\x16\n\x0eharness_config\x18\x01 \x01(\x0c\x12\x1d\n\x08messages\x18\x02 \x03(\x0b\x32\x0b.ax.Message\"1\n\rHarnessCancel\x12 \n\x06reason\x18\x01 \x01(\x0e\x32\x10.ax.CancelReason\"\x8d\x01\n\x0eHarnessRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x12\n\nharness_id\x18\x02 \x01(\t\x12!\n\x05start\x18\x03 \x01(\x0b\x32\x10.ax.HarnessStartH\x00\x12#\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x11.ax.HarnessCancelH\x00\x42\x06\n\x04type\"/\n\x0eHarnessOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"=\n\nHarnessEnd\x12\x18\n\x05state\x18\x01 \x01(\x0e\x32\t.ax.State\x12\x15\n\rerror_message\x18\x02 \x01(\t\"x\n\x0fHarnessResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12%\n\x07outputs\x18\x02 \x01(\x0b\x32\x12.ax.HarnessOutputsH\x00\x12\x1d\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x0e.ax.HarnessEndH\x00\x42\x06\n\x04type\"}\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\"4\n\x19\x44\x65leteConversationRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"\x1c\n\x1a\x44\x65leteConversationResponse\"e\n\x17\x46orkConversationRequest\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\"3\n\x18\x46orkConversationResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t*l\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\x12\x12\n\x0eSTATE_CANCELED\x10\x04*\x8c\x01\n\x0c\x43\x61ncelReason\x12\x1d\n\x19\x43\x41NCEL_REASON_UNSPECIFIED\x10\x00\x12 \n\x1c\x43\x41NCEL_REASON_USER_REQUESTED\x10\x01\x12\x19\n\x15\x43\x41NCEL_REASON_TIMEOUT\x10\x02\x12 \n\x1c\x43\x41NCEL_REASON_INTERNAL_ERROR\x10\x03\x32\x80\x01\n\x0c\x41gentService\x12\x30\n\x07\x43onnect\x12\x10.ax.AgentRequest\x1a\x11.ax.AgentResponse0\x01\x12>\n\x0bHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2H\n\x0eHarnessService\x12\x36\n\x07\x43onnect\x12\x12.ax.HarnessRequest\x1a\x13.ax.HarnessResponse(\x01\x30\x01\x32@\n\x11\x43ontrollerService\x12+\n\x04\x45xec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x01\x32\xb9\x01\n\x13\x43onversationService\x12S\n\x12\x44\x65leteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponse\x12M\n\x10\x46orkConversation\x12\x1b.ax.ForkConversationRequest\x1a\x1c.ax.ForkConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')_globals = globals()_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)@@ -48,8 +48,10 @@ _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['_STATE']._serialized_start=1417- _globals['_STATE']._serialized_end=1505+ _globals['_STATE']._serialized_start=1868+ _globals['_STATE']._serialized_end=1976+ _globals['_CANCELREASON']._serialized_start=1979+ _globals['_CANCELREASON']._serialized_end=2119_globals['_AGENTSTART']._serialized_start=76_globals['_AGENTSTART']._serialized_end=159_globals['_AGENTOUTPUTS']._serialized_start=161@@ -70,26 +72,36 @@ if not _descriptor._USE_C_DESCRIPTORS:_globals['_HEALTHCHECKREQUEST']._serialized_end=883_globals['_HEALTHCHECKRESPONSE']._serialized_start=885_globals['_HEALTHCHECKRESPONSE']._serialized_end=940- _globals['_HARNESSMESSAGE']._serialized_start=942- _globals['_HARNESSMESSAGE']._serialized_end=989- _globals['_EXECREQUEST']._serialized_start=991- _globals['_EXECREQUEST']._serialized_end=1116- _globals['_EXECRESPONSE']._serialized_start=1118- _globals['_EXECRESPONSE']._serialized_end=1175- _globals['_DELETECONVERSATIONREQUEST']._serialized_start=1177- _globals['_DELETECONVERSATIONREQUEST']._serialized_end=1229- _globals['_DELETECONVERSATIONRESPONSE']._serialized_start=1231- _globals['_DELETECONVERSATIONRESPONSE']._serialized_end=1259- _globals['_FORKCONVERSATIONREQUEST']._serialized_start=1261- _globals['_FORKCONVERSATIONREQUEST']._serialized_end=1362- _globals['_FORKCONVERSATIONRESPONSE']._serialized_start=1364- _globals['_FORKCONVERSATIONRESPONSE']._serialized_end=1415- _globals['_AGENTSERVICE']._serialized_start=1508- _globals['_AGENTSERVICE']._serialized_end=1636- _globals['_HARNESSSERVICE']._serialized_start=1638- _globals['_HARNESSSERVICE']._serialized_end=1709- _globals['_CONTROLLERSERVICE']._serialized_start=1711- _globals['_CONTROLLERSERVICE']._serialized_end=1775- _globals['_CONVERSATIONSERVICE']._serialized_start=1778- _globals['_CONVERSATIONSERVICE']._serialized_end=1963+ _globals['_HARNESSSTART']._serialized_start=942+ _globals['_HARNESSSTART']._serialized_end=1011+ _globals['_HARNESSCANCEL']._serialized_start=1013+ _globals['_HARNESSCANCEL']._serialized_end=1062+ _globals['_HARNESSREQUEST']._serialized_start=1065+ _globals['_HARNESSREQUEST']._serialized_end=1206+ _globals['_HARNESSOUTPUTS']._serialized_start=1208+ _globals['_HARNESSOUTPUTS']._serialized_end=1255+ _globals['_HARNESSEND']._serialized_start=1257+ _globals['_HARNESSEND']._serialized_end=1318+ _globals['_HARNESSRESPONSE']._serialized_start=1320+ _globals['_HARNESSRESPONSE']._serialized_end=1440+ _globals['_EXECREQUEST']._serialized_start=1442+ _globals['_EXECREQUEST']._serialized_end=1567+ _globals['_EXECRESPONSE']._serialized_start=1569+ _globals['_EXECRESPONSE']._serialized_end=1626+ _globals['_DELETECONVERSATIONREQUEST']._serialized_start=1628+ _globals['_DELETECONVERSATIONREQUEST']._serialized_end=1680+ _globals['_DELETECONVERSATIONRESPONSE']._serialized_start=1682+ _globals['_DELETECONVERSATIONRESPONSE']._serialized_end=1710+ _globals['_FORKCONVERSATIONREQUEST']._serialized_start=1712+ _globals['_FORKCONVERSATIONREQUEST']._serialized_end=1813+ _globals['_FORKCONVERSATIONRESPONSE']._serialized_start=1815+ _globals['_FORKCONVERSATIONRESPONSE']._serialized_end=1866+ _globals['_AGENTSERVICE']._serialized_start=2122+ _globals['_AGENTSERVICE']._serialized_end=2250+ _globals['_HARNESSSERVICE']._serialized_start=2252+ _globals['_HARNESSSERVICE']._serialized_end=2324+ _globals['_CONTROLLERSERVICE']._serialized_start=2326+ _globals['_CONTROLLERSERVICE']._serialized_end=2390+ _globals['_CONVERSATIONSERVICE']._serialized_start=2393+ _globals['_CONVERSATIONSERVICE']._serialized_end=2578# @@protoc_insertion_point(module_scope)diff --git a/python/proto/ax_pb2_grpc.py b/python/proto/ax_pb2_grpc.pyindex 48b9ebd..bb7516d 100644--- a/python/proto/ax_pb2_grpc.py+++ b/python/proto/ax_pb2_grpc.py@@ -188,8 +188,8 @@ class HarnessServiceStub(object):"""self.Connect = channel.stream_stream('/ax.HarnessService/Connect',- request_serializer=proto_dot_ax__pb2.HarnessMessage.SerializeToString,- response_deserializer=proto_dot_ax__pb2.HarnessMessage.FromString,+ request_serializer=proto_dot_ax__pb2.HarnessRequest.SerializeToString,+ response_deserializer=proto_dot_ax__pb2.HarnessResponse.FromString,_registered_method=True)@@ -197,7 +197,11 @@ class HarnessServiceServicer(object):"""Missing associated documentation comment in .proto file."""def Connect(self, request_iterator, context):- """Missing associated documentation comment in .proto file."""+ """Connect drives one harness execution. The client sends+ HarnessRequest{start} (and may send one HarnessRequest{cancel}+ mid-stream), and the server streams zero or more HarnessResponse{outputs}+ frames terminated by exactly one HarnessResponse{end}.+ """context.set_code(grpc.StatusCode.UNIMPLEMENTED)context.set_details('Method not implemented!')raise NotImplementedError('Method not implemented!')@@ -207,8 +211,8 @@ def add_HarnessServiceServicer_to_server(servicer, server):rpc_method_handlers = {'Connect': grpc.stream_stream_rpc_method_handler(servicer.Connect,- request_deserializer=proto_dot_ax__pb2.HarnessMessage.FromString,- response_serializer=proto_dot_ax__pb2.HarnessMessage.SerializeToString,+ request_deserializer=proto_dot_ax__pb2.HarnessRequest.FromString,+ response_serializer=proto_dot_ax__pb2.HarnessResponse.SerializeToString,),}generic_handler = grpc.method_handlers_generic_handler(@@ -236,8 +240,8 @@ class HarnessService(object):request_iterator,target,'/ax.HarnessService/Connect',- proto_dot_ax__pb2.HarnessMessage.SerializeToString,- proto_dot_ax__pb2.HarnessMessage.FromString,+ proto_dot_ax__pb2.HarnessRequest.SerializeToString,+ proto_dot_ax__pb2.HarnessResponse.FromString,options,channel_credentials,insecure,