packages/kilo-docs/pages/automate/tools/ask-followup-question.md
The ask_followup_question tool enables interactive communication by asking specific questions to gather additional information needed to complete tasks effectively.
The tool accepts these parameters:
question (required): The specific question to ask the userfollow_up (optional): A list of 2-4 suggested answers that help guide user responses, each within <suggest> tagsThis tool creates a conversational interface between Kilo Code and the user, allowing for gathering clarification, additional details, or user preferences when facing ambiguities or decision points. Each question can include suggested responses to streamline the interaction.
<answer> tags to distinguish them from regular conversationWhen the ask_followup_question tool is invoked, it follows this process:
Parameter Validation: Validates the required question parameter and checks for optional suggestions
follow_up parameter using the fast-xml-parser libraryJSON Transformation: Converts the XML structure into a standardized JSON format for UI display
{
question: "User's question here",
suggest: [
{ answer: "Suggestion 1" },
{ answer: "Suggestion 2" }
]
}
UI Integration:
ask("followup", ...) methodResponse Collection and Processing:
<answer> tags when returning to the assistantError Handling:
The question-answer cycle follows this sequence:
<answer> tags and preserves imagesWhen a user responds to a question, the response is formatted with <answer> tags for clarity and consistency. This format helps clearly separate the user's answer from other conversation elements.
Example response format:
<answer>
Use Tailwind CSS for utility-first styling with maximum flexibility
</answer>
Key characteristics of the response format:
<answer> tagsAsking about implementation preferences:
<ask_followup_question>
<question>Which styling approach would you prefer for this web application?</question>
<follow_up>
<suggest>Use Bootstrap for rapid development with consistent components</suggest>
<suggest>Use Tailwind CSS for utility-first styling with maximum flexibility</suggest>
<suggest>Use vanilla CSS with custom styling for complete control and minimal dependencies</suggest>
</follow_up>
</ask_followup_question>
Requesting technical clarification:
<ask_followup_question>
<question>What database should this application use for storing user data?</question>
<follow_up>
<suggest>MongoDB for flexible schema and document-based storage</suggest>
<suggest>PostgreSQL for relational data with strong consistency guarantees</suggest>
<suggest>Firebase for real-time updates and simplified backend management</suggest>
<suggest>SQLite for lightweight local storage without external dependencies</suggest>
</follow_up>
</ask_followup_question>
Addressing ambiguity in requirements:
<ask_followup_question>
<question>How should the application handle user authentication?</question>
<follow_up>
<suggest>Implement email/password authentication with account verification</suggest>
<suggest>Use social login providers (Google, GitHub, etc.) for quick signup</suggest>
<suggest>Implement both email/password and social login options</suggest>
</follow_up>
</ask_followup_question>