Enable Agno agents to intentionally pause their own execution. While most tools are designed for action (fetching data, writing files), SleepTools is designed for timing and coordination.
Copy
Ask AI
from agno.agent import Agentfrom agno.tools.sleep import SleepTools# ---------------------------------------------------------------------------# Create Agent# ---------------------------------------------------------------------------# Example 1: Enable specific sleep functionsagent = Agent(tools=[SleepTools(enable_sleep=True)], name="Sleep Agent")# Example 2: Enable all sleep functionsagent_all = Agent(tools=[SleepTools(all=True)], name="Full Sleep Agent")# Test the agents# ---------------------------------------------------------------------------# Run Agent# ---------------------------------------------------------------------------if __name__ == "__main__": agent.print_response("Sleep for 2 seconds") agent_all.print_response("Sleep for 5 seconds")