Example
The following agent will use thesleep tool to pause execution for a given number of seconds.
cookbook/tools/sleep_tools.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
sleep tool to pause execution for a given number of seconds.
from agno.agent import Agent
from agno.tools.sleep import SleepTools
# Create an Agent with the Sleep tool
agent = Agent(tools=[SleepTools()], name="Sleep Agent")
# Example 1: Sleep for 2 seconds
agent.print_response("Sleep for 2 seconds")
# Example 2: Sleep for a longer duration
agent.print_response("Sleep for 5 seconds")
| Parameter | Type | Default | Description |
|---|---|---|---|
name | str | "sleep" | The name of the tool |
| Function | Description |
|---|---|
sleep | Pauses execution for a specified number of seconds |
Was this page helpful?