MCPcopy Create free account
hub / github.com/microsoft/TypeChat / register_agent

Method register_agent

python/examples/multiSchema/router.py:27–29  ·  view source on GitHub ↗
(self, name: str, description: str, handler: Callable[[str], Awaitable[Any]])

Source from the content-addressed store, hash-verified

25 self._current_agents = {}
26
27 def register_agent(self, name: str, description: str, handler: Callable[[str], Awaitable[Any]]):
28 agent = AgentInfo(name=name, description=description, handler=handler)
29 self._current_agents[name] = agent
30
31 async def route_request(self, line: str):
32 classes_str = json.dumps(self._current_agents, indent=2, default=lambda o: None, allow_nan=False)

Callers 1

mainFunction · 0.95

Calls 1

AgentInfoClass · 0.85

Tested by

no test coverage detected