Skip to content

Commit

Permalink
Add documentation and TODOs for xlang (#4926)
Browse files Browse the repository at this point in the history
Co-authored-by: Jack Gerrits <[email protected]>
  • Loading branch information
peterychang and jackgerrits authored Jan 8, 2025
1 parent 7b10f0a commit d610d48
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,32 @@ async def recv(self) -> agent_worker_pb2.Message:
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,
Expand Down

0 comments on commit d610d48

Please sign in to comment.