It seems this tool was refactored, but now causes issues because the location is not provided (whereas the description says it does): The agents don't know where to go, and often get stuck in "waiting for events" mode.
def consult_directory(
tool_context: ToolContext,
agent_input: str = None,
):
"""Shows a list of all agents and their current locations"""
# first, craft the event object
agents = tool_context.context.agents
directory = ""
for index, agent in enumerate(agents):
if agent["id"] == tool_context.agent_id:
continue
directory += (
f"{agent['full_name']}\n"
f"---------------------\n"
f"Bio: {agent['public_bio']}\n"
f"---------------------\n\n"
)
return directory