# Change your agent's behavior

> Describe a new rule to the Agent Builder in plain words, check its test, answer its questions, test the change yourself and push it as a new commit.

- Source: https://www.aui.io/help/building/change-your-agents-behavior
- Section: Building with the Agent Builder
- Last updated: November 24, 2026

When your agent does something your business wants done differently, you tell the Agent Builder the new rule in plain words. The builder finds the parts of the agent's program that need to change, edits them, tests the result, and holds the edits as unsaved changes until you push them. You do not need to know how the program is written.

This page follows one change from start to finish. ACME Air decides that canceling a trip through the agent costs an extra $15 convenience fee, even when the ticket itself is free to cancel, and that the agent should tell travelers they can avoid the fee by canceling on the website or app.

[Video: Change your agent's behavior (85 seconds)](https://www.aui.iohttps://pxjl3qwxvjcixvl1.public.blob.vercel-storage.com/help/building/change-your-agents-behavior/walkthrough-ede5a5a4de12.mp4)

Video transcript:

> Here, a customer asks what happens if they cancel a trip. The agent says there is no cancellation fee.
> Open the reasoning for that reply. Under Data, you can see why: the fee the agent worked out is zero.
> Suppose the business adds a $15 convenience fee for canceling through the agent. In Build mode, describe the new rule in plain words.
> The builder finds the parts of the program that need to change, edits them, and holds the edits as unsaved changes.
> Then it tests its own work with a live conversation, and tells you what it saw.
> The edits are not committed yet, but your next message already runs against them. So ask the same question again.
> The same question now gets the new answer: the fee, and how to avoid it.
> The reasoning confirms it. Under Data, the fee the agent worked out is now 15.
> Now say yes to the cancellation. In the trace, the fee is still 15, and Actions shows the agent updated a record: the rule was applied, not just quoted.
> When you are happy, click Push. That saves the change as a new commit. Nothing goes live until you make it live.

## Before you start

- You need a role that can change the agent. See [Members and roles](https://www.aui.io/help/organization/members-and-roles).
- Check the branch pill in the top bar: your change is pushed to that branch. If several people work on the agent, consider a branch of your own; see [Work on another branch, start a draft, and compare commits](https://www.aui.io/help/branches/work-on-another-branch).
- Know whether the agent's integrations point at the sandbox database or a real system. See [Is a test conversation safe?](#is-a-test-conversation-safe)

## Spot the behavior

1. In the **Apollo-1 Runtime** pane, talk to the agent as a customer would, or open a thread from **All threads**. In the example, test caller Alex Morgan, a Gold member with booking `ABC123` on flight `AC1842` from Atlanta to Boston, asks: "What happens if I cancel my Boston trip?"
2. Read the reply. The agent says there is no cancellation fee, which was right under the old rule.
3. Click **Reasoning** under the reply to see what the agent looked up and decided, so you can describe the change precisely. See [The Reasoning pane](https://www.aui.io/help/understanding-decisions/the-reasoning-pane).

![The Playground in dark mode with the ACME Air Rebooking Agent on v0.2. The Apollo-1 Runtime pane shows a two-turn thread: the agent lists bookings ABC123 and RFD456, then the customer asks 'What happens if I cancel my Boston trip?' and the reply says the Classic ticket on AC1842 has a cancellation fee of USD 0 and USD 300 would return as travel credit. The Reasoning pane is open on that reply, Turn tab, 2 of 2. The Agent Builder pane shows its welcome text and an empty composer set to Build.](https://www.aui.io/assets/help/building/change-your-agents-behavior/spot-the-behavior.png)

*The current behavior: no fee for canceling this ticket.*

## Describe the new rule in Build mode

1. In the **Agent Builder** pane, click the mode button in the composer and choose **Build**. If you are in the middle of an unrelated session, click **New session** (**+**) first; a new session starts in Build.
2. Describe the rule. Say what applies and when, give an example with numbers, say how the customer should hear it, and say what must not change:

   ```text
   Canceling a trip through this chat always adds a $15 convenience fee, even
   when the ticket itself is free to cancel. If the ticket's cancellation fee is
   $99, the total through the agent is $114. When you quote a cancellation, show
   the ticket fee, the $15 convenience fee and the total, and tell the traveler
   that canceling on the website or app avoids the $15. Flight changes keep
   their current pricing.
   ```

3. Press <kbd>↵</kbd> or click the send button.

The builder also sees the conversation open in the middle pane, so you can refer to "this conversation" or "the last reply". To point at one specific reply, click **Reasoning** under it before you write: the builder then knows which turn you mean.

![Close crop of the Agent Builder pane in dark mode. The composer holds the request 'Add a rule: when a customer cancels a trip through this agent, charge a USD 15 convenience fee...', ending with telling the customer they can avoid it by canceling on the ACME Air website or app. The Build mode button and the Thinking switch (on) sit below it, and the send button is active.](https://www.aui.io/assets/help/building/change-your-agents-behavior/build-request.png)

*Describe the rule and what the customer should be told.*

## Watch the builder work

The builder first restates what it is going to do, for example: "I'll make agent-assisted cancellations include the $15 convenience fee, show the full total, and explain that travelers can save $15 by canceling on the website or app." If that is not what you meant, send a correction straight away.

It then works through steps shown as rows, such as "Read 9 files", "Edited 7 files", a validation step that checks the program still holds together, and **Live conversation** while it tests. Click the arrow at the end of a row to see which files it read, what it changed, or the test conversation played back. As soon as it edits anything, an **Unsaved changes** chip appears beside the **AGENT BUILDER** heading, and the session takes a name from the builder, such as "Disclose cancellation convenience fees".

Each builder session runs in its own virtual machine on AUI's side, so the builder keeps working if you refresh, close the tab or lose your connection. A question for you, a live test conversation and a re-run of a turn pause until you reopen the session. To redirect the builder while it works, type a message: it reads it at its next step. To stop it, click the square stop button or press <kbd>⌘</kbd> <kbd>.</kbd>; edits already made are kept.

If a turn ends with a block headed **Gates rejected the result**, the builder's final checks found problems its edits introduced, and it is waiting for you; see [If a turn ends with Gates rejected the result](https://www.aui.io/help/building/builder-sessions#if-a-turn-ends-with-gates-rejected-the-result).

[Clip: The builder reads, edits and tests the agent while you wait.](https://www.aui.iohttps://pxjl3qwxvjcixvl1.public.blob.vercel-storage.com/help/building/change-your-agents-behavior/builder-working-f38919c999e2.mp4)

*Dark mode, the Playground right after the fee request is sent. In the Agent Builder pane the request appears with the builder's reply restating the change, followed by a Working timer, and the session is titled New session. The composer's send button has turned into a stop button, and a banner offers to turn on notifications.*

## Review its test conversation

A live test conversation opens in the **Apollo-1 Runtime** pane as a new thread started by the Agent Builder, running against your unsaved changes. When it finishes, the row reads "Ran a test conversation" and the builder reports what it saw. In the example, the agent quoted the $15 total, explained that the website or app avoids it, and recorded the fee separately from the refund once the traveler confirmed.

Read the replies yourself and open **Reasoning** on the important ones, looking for anything the builder did not mention. Here, the agent recorded the $15 as a separate payment rather than deducting it from the refund. If your business wants it deducted, say so in your answer to the builder's question or in your next message.

![The full Playground in dark mode. The Apollo-1 Runtime pane shows the builder's test thread: the caller checks the cancellation terms for Flex booking RFD456 and the agent quotes a full refund plus a separate USD 15 convenience fee; the caller then asks to cancel Classic booking ABC123 and agrees to the fee, and the agent reads back the terms before asking for a yes. The Reasoning pane is open on that reply, 3 of 4. In the Agent Builder pane, the row Ran a test conversation is followed by the builder's summary of what the agent did.](https://www.aui.io/assets/help/building/change-your-agents-behavior/builder-test-conversation.png)

*The builder's test conversation plays in the middle pane.*

## Answer the builder's question

The builder may stop to ask you something on a card above the composer. Here it asks whether to rerun your original conversation from turn 2, where cancellation fees first came up.

- Click **Rerun from turn 2** to replay your conversation against the unsaved changes. The builder runs a copy of the thread from that turn and opens it in the middle pane; your original thread stays as it was.
- Or type an instruction in **Type your own answer...**, for example "Deduct the $15 from the refund instead of recording a separate payment", and press <kbd>↵</kbd>. The builder takes it as your answer.
- Choose **Not now** if you would rather test it yourself.

See [Answer the builder's questions](https://www.aui.io/help/building/answer-the-builders-questions).

![Close crop of the Agent Builder pane in dark mode with an Unsaved changes chip in its header. The transcript shows the fee request, the builder's note that it edited 6 files and ran a test conversation, and a question card asking whether to rerun the original conversation from turn 2 with the new rule. The options are 1 Rerun from turn 2 and 2 Not now, then a Type your own answer field and a Skip button.](https://www.aui.io/assets/help/building/change-your-agents-behavior/question-card.png)

*Pick an option, type your own answer, or skip.*

## Test it yourself

While the changes are unsaved, every conversation you have in the Playground runs against them. Customers keep getting the live commit.

1. Click **+** at the top of the **Apollo-1 Runtime** pane to start a new thread.
2. Pick a test caller, such as Alex Morgan, from **Pick a test caller…**.
3. Try the cases that matter to you, not only the one the builder tested. For this rule: a refundable trip, a ticket with a $99 cancellation fee (the total should be $114), a flight change (no convenience fee), and a traveler who says they will cancel on the website instead.
4. Click **Reasoning** under each reply to confirm the fee comes from the new rule.

To replay an existing conversation instead, hover one of your messages and click **Regenerate**, or edit it and re-run it. See [Edit and re-run a message](https://www.aui.io/help/testing/edit-and-rerun).

For wider coverage, ask the builder, for example "Run the regression to check nothing else broke" or "Generate 10 conversations that target the cancellation fee in different variations". After a change to an existing agent, the builder runs these broader checks only when you ask. See [Run a regression or an evaluation](https://www.aui.io/help/evaluations/run-a-regression-or-evaluation).

![The Playground in dark mode with an Unsaved changes chip in the Agent Builder header. The builder's closing summary says it added a separate USD 15 convenience fee, and a Commit message bar with a Push button sits above the composer. The conversation shows the earlier thread, whose latest reply now mentions the USD 15 convenience fee for canceling through the agent, with the Reasoning pane open on it.](https://www.aui.io/assets/help/building/change-your-agents-behavior/your-own-test.png)

*The conversation after the change; test your own cases before you push.*

### Is a test conversation safe?

> [!WARNING]
> A Playground conversation is not automatically sandboxed. It uses the agent's own integrations. If an integration points at the sandbox database, any cancellation or booking change stays there. If it points at a real booking system, confirming a cancellation in a test cancels it for real. Check the Agent panel's **Integrations** tab before testing actions that change data. See [The sandbox database](https://www.aui.io/help/integrations/sandbox-database).

## Push the change

When the builder has finished and you are happy with the result:

1. Look above the builder's composer for the **Commit message** field. The builder's suggested message is shown under it in quotes; hover it to read it all.
2. Leave the field empty to use the suggestion, or type your own message, for example `Add $15 convenience fee to cancellations made through the agent`.
3. Click **Push**, or press <kbd>↵</kbd> in the field.

**Push** is unavailable while the builder is still working. When the push succeeds, the bar turns green and reads **Pushed** with the new commit's tag, with a note that it is on its branch and not live. The session stays open, so you can keep refining and push again. For locked branches, conflicts with a teammate's push and other cases, see [Unsaved changes and Push](https://www.aui.io/help/building/unsaved-changes-and-push).

![Close crop of the Agent Builder pane in dark mode with an Unsaved changes chip. The transcript ends with the builder's summary: a separate USD 15 convenience fee for cancellations through the agent, disclosed in quotes and confirmation terms, with refunds and credits unchanged. Above the composer, a notification banner sits over the push bar, which shows a commit icon, the Commit message field with the suggested message in quotes, and a Push button.](https://www.aui.io/assets/help/building/change-your-agents-behavior/push-bar.png)

*Use the suggested commit message or write your own.*

[Clip: Push saves the change as a new commit. Nothing goes live.](https://www.aui.iohttps://pxjl3qwxvjcixvl1.public.blob.vercel-storage.com/help/building/change-your-agents-behavior/push-and-receipt-70f7b8c182d8.mp4)

*Dark mode, the Playground after a push. In the Agent Builder pane a green bar reads 'Pushed v0.3', then that it is on its branch and not live. The branch pill in the top bar shows v0.3, and the builder's summary of the fee change is above the bar.*

## Make it live

Pushing does not change what customers get. When the change is ready, open the **Branches** window from the branch pill, find the new commit and choose **Make live**. Customers then get exactly that commit until someone makes another one live. See [Make a commit live, lock a branch, and roll back](https://www.aui.io/help/branches/make-a-commit-live).
