Why
We need anAgentTool that lets other AutoGen agents call Issue Analyzer team over gRPC.
After the sync path lands, we’ll add an async path that publishes requests to a queue and lets Issue Analyzer consume them at its own pace.
Deliverables (chronological)
-
Define protobuf
team.proto with Handle(Query) → Reply RPC and streaming support (stream Reply HandleStream(stream Query)).
-
Generate Python stubs
- Use
python -m grpc_tools.protoc ….
-
Implement sync IssueAnalyzerTool
# tools/team_a_grpc.py
import grpc
from proto.team_pb2_grpc import TeamServiceStub
from proto.team_pb2 import Query
from autogen_agentchat.tools import AgentTool
class TeamATool(AgentTool):
name = "team_a"
description = "Delegates work to Team A over gRPC"
def _run(self, prompt: str, **_) -> str:
with grpc.insecure_channel("team-a.agents.svc.cluster.local:50051") as ch:
ans = TeamServiceStub(ch).Handle(Query(prompt=prompt), timeout=30)
return ans.answer
-
Implement async IssueAnalyzerTool
...
Why
We need an
AgentToolthat lets other AutoGen agents call Issue Analyzer team over gRPC.After the sync path lands, we’ll add an async path that publishes requests to a queue and lets Issue Analyzer consume them at its own pace.
Deliverables (chronological)
Define protobuf
team.protowithHandle(Query) → ReplyRPC and streaming support (stream Reply HandleStream(stream Query)).Generate Python stubs
python -m grpc_tools.protoc ….Implement sync
IssueAnalyzerToolImplement async
IssueAnalyzerTool...