Add documentation and TODOs for xlang (#4926)

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
This commit is contained in:
peterychang
2025-01-08 09:16:43 -05:00
committed by GitHub
parent 7b10f0ad1b
commit d610d481cd
2 changed files with 28 additions and 0 deletions

View File

@@ -189,6 +189,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Cross-Language Runtimes\n",
"The process described above is largely the same, however all message types MUST use shared protobuf schemas for all cross-agent message types.\n",
"\n",
"# Next Steps\n",
"To see complete examples of using distributed runtime, please take a look at the following samples:\n",
"\n",

View File

@@ -178,7 +178,32 @@ class HostConnection:
return await self._recv_queue.get()
# TODO: Lots of types need to have protobuf equivalents:
# Core:
# - FunctionCall, CodeResult, possibly CodeBlock
# - All the types in https://github.com/microsoft/autogen/blob/main/python/packages/autogen-core/src/autogen_core/models/_types.py
#
# Agentchat:
# - All the types in https://github.com/microsoft/autogen/blob/main/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py to protobufs.
#
# Ext --
# CodeExecutor:
# - CommandLineCodeResult
class GrpcWorkerAgentRuntime(AgentRuntime):
"""An agent runtime for running remote or cross-language agents.
Agent messaging uses protobufs from `agent_worker.proto`_ and ``CloudEvent`` from `cloudevent.proto`_.
Cross-language agents will additionally require all agents use shared protobuf schemas for any message types that are sent between agents.
.. _agent_worker.proto: https://github.com/microsoft/autogen/blob/main/protos/agent_worker.proto
.. _cloudevent.proto: https://github.com/microsoft/autogen/blob/main/protos/cloudevent.proto
"""
# TODO: Needs to handle agent close() call
def __init__(
self,