diff --git a/README.md b/README.md index 559f5ef1..b4afec95 100644 --- a/README.md +++ b/README.md @@ -139,10 +139,15 @@ async def main(): print(await chat("test")) # ❌ Blocked except ControlViolationError as e: print(f"❌ Blocked: {e.control_name}") + finally: + await agent_control.ashutdown() -asyncio.run(main()) +if __name__ == "__main__": + asyncio.run(main()) ``` +Use `agent_control.shutdown()` or `await agent_control.ashutdown()` before process exit so short-lived scripts flush pending observability events cleanly. + Next, create a control in Step 4, then run the setup and agent scripts in order to see blocking in action.