> For the complete documentation index, see [llms.txt](https://docs.protoboard.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.protoboard.xyz/tutorials/design-with-protobot.md).

# Design with ProtoBot

Ask ProtoBot to plan a change in Plan mode, accept the plan and watch it add and wire an IR sensor array to the line-following robot

## Goal

Use ProtoBot to add an IR line sensor array to the **Main controller** board from [Build a line-following robot](https://docs.protoboard.xyz/tutorials/line-following-robot.md). You'll ask for a plan first, review it, accept it and watch ProtoBot carry it out, then check the result yourself.

{% hint style="info" %}
**Time:** about 10 minutes, most of it watching. **You need:** a signed-in account with ProtoBot Energy left (the battery in the ProtoBot panel). A run like this one uses a few percent of a Free day.
{% endhint %}

## Steps

{% stepper %}
{% step %}

### Open ProtoBot

1. Open the Main controller board and make sure the status pill says **Editing**. If it says **Viewing**, open it and click **Start editing**.
2. Click the robot icon at the top of the left rail. The **Agents** panel opens on the **ProtoBot** tab.
3. Click **New chat session** (**+**) to start a fresh conversation for this board.

<figure><picture><source srcset="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-f4142c469ce91f2e97ef04709172490df62a2628%2Fprotobot-panel-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-babc8b3dadde6e32246841a009e5754b7c8a945c%2Fprotobot-panel-light.png?alt=media" alt="The Agents panel on the ProtoBot tab, with the welcome message, the composer and the model, reasoning effort and mode controls under it"></picture><figcaption><p>The ProtoBot panel.</p></figcaption></figure>
{% endstep %}

{% step %}

### Choose a model, effort and mode

The controls sit under the message box, left to right:

1. **Model**: keep the default, or pick another model from the list. Models marked **Pro** need a Pro plan.
2. **Reasoning effort**: **Medium** is a good balance. **Off** and **Low** are faster and cheaper; **High** thinks longest.
3. **Mode**: choose **Plan** ("Design first, no board edits").

See [Modes](https://docs.protoboard.xyz/protobot/modes.md) and [Models and reasoning effort](https://docs.protoboard.xyz/protobot/models-and-reasoning.md).
{% endstep %}

{% step %}

### Ask for the plan

{% embed url="<https://cdn.protoboard.ai/docs/clip/protobot-plan?title=Ask+ProtoBot+for+a+plan>" %}
Ask ProtoBot for a plan
{% endembed %}

[Animated GIF](https://cdn.protoboard.ai/docs/clips/protobot-plan-light.gif) · Steps:

1. Type: `Add an IR line sensor array the Nano can read, and wire it up.`
2. Press **Enter** (or click **Send message**).
3. Wait for the **Proposed plan** card. ProtoBot reads the board, may search the library, and writes the plan without changing anything.
   {% endstep %}

{% step %}

### Review and accept

{% embed url="<https://cdn.protoboard.ai/docs/clip/protobot-approve?title=Accept+a+ProtoBot+plan>" %}
Accept a ProtoBot plan
{% endembed %}

[Animated GIF](https://cdn.protoboard.ai/docs/clips/protobot-approve-light.gif) · Steps:

1. Read the plan: which sensor, how it's powered, which Nano pins it uses.
2. If you want changes, type them in **Reject with reason** and click **Submit rejection**. ProtoBot revises the plan.
3. When it looks right, click **Accept**. The mode switches to **Integrate** and ProtoBot starts work.

While it works, the message box reads "Streaming, Esc to stop". Each tool call appears as a card you can expand to see what changed. Press **Esc** or click **Stop generating** to stop at any point.
{% endstep %}

{% step %}

### Approve or decline a part request

If the sensor isn't in the library, ProtoBot can model it as a custom part on your board and ask the ProtoPart team to add it properly. It asks first:

1. A card titled **File a part request?** appears, marked **Needs your OK**, with the details it would send.
2. Click **File it** to send the request, or **Don't file** to skip it. ProtoBot continues either way.

Requests are public on the ProtoPart GitHub repository. Your name and email aren't included. See [Request or fix a part](https://docs.protoboard.xyz/parts/request-or-fix-a-part.md).

<figure><picture><source srcset="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-a8c6c7559966bfc7985db5eb3066b75c2e5ffb77%2Fprotobot-file-confirm-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-1daa35c5493451f85f4770ad0a3b62bfd880b2ea%2Fprotobot-file-confirm-light.png?alt=media" alt="A ProtoBot tool card marked Needs your OK, showing the File a part request? card with the part details and the buttons Don&#x27;t file and File it"></picture><figcaption><p>ProtoBot asks before it files a part request.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check the result

1. Read ProtoBot's summary. It lists what it added, the wiring and any open DRC items.
2. Open **Board Review** and confirm there's nothing under **BLOCKED**.
3. Click the new harnesses and check the pins in **Function Links** against the sensor's datasheet.

<figure><picture><source srcset="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-1b3154f87a2b18f9402b870aa6828b1d6c1e7b67%2Fprotobot-result-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3535233690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHc6ZGiGpKHrs578383AS%2Fuploads%2Fgit-blob-607f934d0fc3de50a0344927114ac2dc393b3c51%2Fprotobot-result-light.png?alt=media" alt="The canvas after the run: an IR line sensor array connected to the Arduino Nano by a 5 V supply harness and five signal harnesses"></picture><figcaption><p>The board after ProtoBot added the sensor.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Result

The board has a line sensor wired to the Nano, and the chat session keeps a record of how it got there. You can undo any of ProtoBot's changes with **Ctrl+Z**, and earlier versions are in [version history](https://docs.protoboard.xyz/organize/boards.md#version-history).

{% hint style="warning" %}
ProtoBot works from part definitions and datasheets, but you're the engineer. Check pin choices and power ratings before you order parts.
{% endhint %}

## Common failures

<details>

<summary>The message box says "Respond to the plan above to continue"</summary>

A plan is waiting. Click **Accept**, or reject it with a reason.

</details>

<details>

<summary>"You've hit your daily usage limit"</summary>

Your daily Energy is used up. See [Plans, limits and Energy](https://docs.protoboard.xyz/start-here/plans-limits-and-energy.md).

</details>

<details>

<summary>ProtoBot changed nothing</summary>

You're still in **Plan** mode, which never edits the board, or the board is in **Viewing** mode. Accept the plan, or switch the mode to **Concept** or **Integrate**, and make sure you hold editing control.

</details>

## Related pages

* [ProtoBot overview](https://docs.protoboard.xyz/protobot/overview.md): what ProtoBot is for
* [Plans, approvals and sessions](https://docs.protoboard.xyz/protobot/plans-approvals-and-sessions.md): the plan card and session history
* [What ProtoBot can change](https://docs.protoboard.xyz/protobot/what-protobot-can-change.md): its tools and limits
* [Prompt patterns](https://docs.protoboard.xyz/protobot/prompt-patterns.md): prompts that get better results
