> For the complete documentation index, see [llms.txt](https://docs.agenticflow.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agenticflow.ai/workflows/workflow-inputs/checkbox.md).

# Checkbox

A **Checkbox** is a simple input control that allows a user to provide a boolean (true/false) value. It's a straightforward way to capture a binary "yes/no" or "on/off" decision.

## When to Use

Use a Checkbox control for any input that has only two states:

* Enabling or disabling a feature (e.g., "Include summary?").
* Agreeing to terms and conditions.
* Confirming an action (e.g., "Are you sure?").

## How to Add

1. From your workflow's **Build** page, click on **+ Add Input**.
2. Select **Checkbox** from the list of available controls.

## Configuration

* **Title:** The main label for the checkbox.
* **Description:** Optional helper text to provide more context about what the checkbox controls.
* **Variable Name:** The name used to access the `true` or `false` value.
* **Optional/Required:** A toggle to specify if the user must interact with the checkbox.

## Setting a Default Value

You can set the default state of the checkbox to be either checked or unchecked:

1. Click the checkbox in the control to set your desired default state (checked for `true`, unchecked for `false`).
2. Click the settings icon (⚙️) at the bottom right of the control.
3. Select **Set Current Value as Default**.

## Accessing the Value

The Checkbox control outputs either `true` (if checked) or `false` (if unchecked). You can access this value using its variable name. This is most powerful when used with an **If/Else Node** to control the workflow's path.

### Example

**Goal:** Allow a user to optionally request an executive summary when generating a report.

1. **Add a Checkbox Control:**
   * Title: "Include Executive Summary"
   * Variable Name: `include_summary`
   * Default Value: `false` (unchecked)
2. **Add a Long Text Input:**
   * Title: "Source Data"
   * Variable Name: `source_data`
   * Content: `[...some long report data...]`
3. **Add an If/Else Node:**
   * **Condition:** `{{include_summary}} == true`
   * This will check if the user ticked the box.
4. **On the "True" Branch:**
   * **Add an OpenAI MCP Node:**
     * **Action:** `Chat`
     * **Prompt:** `Create a full report and a one-paragraph executive summary from the following data: {{source_data}}`
5. **On the "False" Branch:**
   * **Add an OpenAI MCP Node:**
     * **Action:** `Chat`
     * **Prompt:** `Create a full report from the following data: {{source_data}}`

This workflow now dynamically changes its behavior based on the simple check of a box.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agenticflow.ai/workflows/workflow-inputs/checkbox.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
