Skip to main content

Overview

The WaitTool pauses execution for a given number of seconds. It exists because agents that kick off long-running work — a sandbox build, a deployment, a batch import, an async API job — otherwise have no way to let time pass. Without it, an agent either polls in a tight loop or gives up before the work finishes. The tool takes no API key and has no dependencies beyond the standard library.

When to Use It

The tool’s description tells the model to reach for it when out-of-band work needs real time to progress:
  • A sandbox build, test run, or script that is still executing
  • A deployment or provisioning step that is still rolling out
  • A batch import, export, or training job
  • An async API that returned a job id to poll later
  • A rate limit or backoff that has to cool down before retrying
The pattern the model is steered toward is: start the job, wait, check status, wait again if it is still running. The description also tells it not to wait to pace a conversation or when the information it needs is already available — waiting only lets clock time pass, it does not advance or check the job.

Installation

The tool ships with crewai-tools:

Example

Code

Arguments

Initialization Parameters

Capping Long Waits

A single call waits at most max_seconds. If an agent asks for more, the tool waits the maximum and says so in its result, so the agent can call it again rather than fail:
Code
Raise the cap when a workflow genuinely needs longer single pauses:
Code

Async Support

The tool implements both sync and async execution, so it does not block the event loop when awaited:
Code