From c0963605f593a8166adc93a6116b1b7bca2a9dba Mon Sep 17 00:00:00 2001 From: Ling-Sen Peng Date: Wed, 12 Aug 2026 13:44:26 -0700 Subject: [PATCH] Fix 13_hierarchical_agents: restore the demo, stop blocking on serve() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The runtime.run(...) demo was commented out and runtime.serve(ceo) left uncommented, so the example printed a header and then blocked forever in the worker loop — it never demonstrated the hierarchy. Every sibling example keeps serve() commented under "Production pattern". Uncommented the run, commented serve(), and reflowed the prompt off a single 200-character line. Verified: COMPLETED in 25 tasks, both branches delegated — ceo -> engineering_lead, ceo -> marketing_lead. --- examples/agents/13_hierarchical_agents.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/agents/13_hierarchical_agents.py b/examples/agents/13_hierarchical_agents.py index 3ee8aa79..b0d5a8bb 100644 --- a/examples/agents/13_hierarchical_agents.py +++ b/examples/agents/13_hierarchical_agents.py @@ -110,9 +110,12 @@ if __name__ == "__main__": with AgentRuntime() as runtime: print("--- Technical question (CEO -> Engineering -> Backend) ---") - # result = runtime.run(ceo, "Design a REST API for a user management system with authentication " - # "and then ask marketing team to come up with a marketing campaign for the system with details on how to run these campaign") - # result.print_result() + result = runtime.run( + ceo, + "Design a REST API for a user management system with authentication, " + "then ask the marketing team for a campaign to promote it.", + ) + result.print_result() # Production pattern: # 1. Deploy once during CI/CD: @@ -121,4 +124,4 @@ # runtime.deploy(ceo) # # 2. In a separate long-lived worker process: - runtime.serve(ceo) + # runtime.serve(ceo)