> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bezi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Mode

Agent Mode is Bezi's *actionable* setting. It directly implements changes in the Unity Editor.  **Agent Mode is automatic implementation; [Ask Mode](https://docs.bezi.com/fundamentals/ask-mode) is manual.**

Bezi does not use an MCP to connect and implement in the Unity Editor. MCP's standardized method delivers unreliable results at scale and requires ongoing maintenance by the user.

Bezi's Unity Editor integration is designed for what AI excels at; writing TypeScript, the most common language within AI training data, and provides more accurate, reliable results.

***

## Using Agent Mode

Select the **mode dropdown** in the prompt textbox and select **Agent**. Agent Mode covers direct Editor implementation of:

1. **Actions**: creating, updating, and organizing scenes, GameObjects, prefabs, and assets
2. **Scripts:** creating and modifying scripts

<Danger>
  Keep and undo Agent suggestions as you work. Letting suggestions pile up in an undecided state can lead to unintentionally keeping or erasing everything.
</Danger>

## Actions

Bezi can automatically create, update, and organize Unity editor objects on your behalf.

When you prompt Bezi in Agent Mode, actions will be auto-deployed based on intent. Multiple actions will be chained to complete complex tasks. For more control, explicitly name the action(s) you want in your prompt, e.g. *"Use Actions to create a prefab from @\[gameObject]."*

#### Scene & GameObjects

* Create, update, delete, and reparent GameObjects
* Print GameObjects, print GameObjects by path, print scene hierarchy
* Create scenes, primitives, tags
* Capture image of scene view and game view (at rest and runtime)

#### Assets & Prefabs

* Create or update assets
* Create prefabs, create prefabs from assets, instantiate prefabs
* Take prefab image (including uGUI)
* Create or update AnimatorController, materials, ScriptableObjects
* Update asset importers, print assets

#### Components & Layout

* Add, update, or remove components
* Set RectTransform layout

## Preview Agent suggestions

Agent Mode auto-implements suggestions in Unity so it's easy to test them in the game before deciding to keep them.

1. Agent makes suggestions and auto-implements in Unity
2. Click back to Unity: test the suggestions in-action
3. Return to Bezi: keep or undo undecided suggestions
4. Continue working

### Agent suggestion states

Bezi agent suggestions can exist in three states. Once you decide to keep or undo a suggestion, you cannot revert the suggestion back to an undecided state.

<AccordionGroup>
  <Accordion title="Undecided">
    Agent suggestions  haven't  been kept or rejected yet
  </Accordion>

  <Accordion title="Kept">
    When Agent suggestions are kept, the work Bezi's implemented will just remain as-is

    * **Directly**:  reviewed Agent suggestion(s) and selected `Keep` or `Keep All`
    * **Indirectly**: accepted an Agent suggestion and all prior undecided suggestions were auto-kept
  </Accordion>

  <Accordion title="Undone">
    When Agent suggestions are undone, all the Bezi related work in Unity will be removed. New additions will be deleted and edits will be reverted. 

    * Select `Undo` or `Undo All` as soon as you decide you don't want a suggestion - undecided suggestions are at higher risk of being indirectly kept
    * Rejecting an Agent suggestion in-thread will revert it to its previous undecided version
  </Accordion>
</AccordionGroup>

If you accidentally keep something you want undone, you use restore checkpoint or version history to revert back to a previous state.

## Restore Checkpoint

Restore Checkpoint reverts the project back to an earlier state, erasing all kept changes made after that point. **Restore Checkpoint does not revert suggestions to an undecided state.** It permanently erases all code additions and modifications Bezi.

To restore: hover on the Bezi response you want to revert to and select `Restore Checkpoint`

## Diffs

Diffs show exactly what Agent Mode suggestions are changing in each file:

* **Red highlights**: deletions
* **Green highlights**: additions

In chat, diffs are compressed for quick scanning. To view a diff in full context, open the script in **Canvas** (diffs will remain highlighted). Here you can compare and inspect Agent suggestions.
