You can give the agent a tool (or bash script) which waits for events. Agent calls it and the tool sleeps until an event happens then returns it to the agent.