Skip to main content
Clarify enables agents to pause mid-task and ask focused questions instead of guessing, improving decision accuracy and user control.
The user gives a vague request; the agent uses clarify before acting.

Quick Start

1

Enable Clarify

2

With Custom Handler


How It Works


Channel Integration

CLI Usage

Bot Usage

Custom Context Handler


Handler Resolution

The tool uses this priority order for handling questions:
  1. Context Handler: kwargs["ctx"]["clarify_handler"] (highest priority)
  2. Tool Handler: self.handler (default ClarifyHandler())
  3. Fallback: Returns guidance message when no interactive channel available

Configuration Options

Tool Schema

Bot Auto-Approval

The clarify tool is included in the bot’s default auto-approve list, so it won’t require manual approval in bot environments.

Common Patterns

Progressive Clarification

Context-Aware Questions

Fallback Behavior


Best Practices

Only call clarify when you genuinely cannot proceed without user input. Don’t ask for preferences that have reasonable defaults.Good: “Which API endpoint format?” when building an API Bad: “Should I use descriptive variable names?” (obvious default)
When possible, offer specific choices rather than open-ended questions.Good: choices=["fastapi", "flask", "django"] Bad: "What Python web framework should I use?" (no choices)
Always check if the response indicates no interactive channel and proceed with sensible defaults.
Frame questions with enough context for users to make informed decisions.Good: “Which authentication method for your user API?” Bad: “Which auth?” (unclear context)

Ask Conversation

Ask another chat (not the current user) and wait for its reply

Tools Overview

Core tool system and custom tools

Agent Configuration

Agent setup and tool integration