diff --git a/examples/agent_patterns/routing.py b/examples/agent_patterns/routing.py index 3dcaefa98..55ad5f0e4 100644 --- a/examples/agent_patterns/routing.py +++ b/examples/agent_patterns/routing.py @@ -63,8 +63,11 @@ async def main(): user_msg = input("Enter a message: ") inputs.append({"content": user_msg, "role": "user"}) + if user_msg.lower().strip() == "exit": + print("") + break agent = result.current_agent -if __name__ == "__main__": - asyncio.run(main()) + +asyncio.run(main())