The following agent will use the sleep tool to pause execution for a given number of seconds.
cookbook/tools/sleep_tools.py
Copy
Ask AI
from agno.agent import Agentfrom agno.tools.sleep import SleepTools# Create an Agent with the Sleep toolagent = Agent(tools=[SleepTools()], name="Sleep Agent")# Example 1: Sleep for 2 secondsagent.print_response("Sleep for 2 seconds")# Example 2: Sleep for a longer durationagent.print_response("Sleep for 5 seconds")