Spaces:
Paused
Paused
| multiply_agent = create_agent(chat_llm, [multiply], "You multiply numbers") | |
| multiply_node = functools.partial(agent_node, agent=multiply_agent, name="Multiplier") | |
| nodes = [ | |
| { "name": "supervisor", "instance": supervisor.get_chain() }, | |
| { "name": "ProductHelp", "instance": help_node }, | |
| { "name": "ProjectHelp", "instance": project_node }, | |
| { "name": "Multiplier", "instance": multiply_node } | |
| ] | |
| agent_system = AgentSystem(nodes, supervisor.get_members()) | |
| graph = agent_system.compile() | |
| for s in graph.stream( | |
| { | |
| "messages": [ | |
| HumanMessage(content="How many robots are currently set up in the project?") | |
| ] | |
| } | |
| ): | |
| if "__end__" not in s: | |
| print(s) | |
| print("----") |