When the Agent Builder edits your agent in Build mode, the edits are not saved to the branch straight away. They are held in the session as unsaved changes, so you can test them first. Push saves them to the branch as a new commit. Making a commit live for customers is a separate step.
#See that there are unsaved changes
- An Unsaved changes chip appears beside the AGENT BUILDER heading.
- In All sessions, the session shows the Unsaved changes status.
- If the builder pane is hidden, the Open Builder item in the side rail says that staged edits are waiting.
- In the Program files view (
</>in the builder header), the header counts the unsaved changes and each changed file is marked as new, modified or deleted. See Read the program files.
#Test against unsaved changes
While changes are unsaved, every conversation you have in the Playground runs against the changed agent: new threads, messages you re-run, the builder's own test conversations and simulated callers. Customers keep getting the live commit, because nothing has been saved or made live.
#Push your changes
The push bar appears above the builder's composer whenever the session has something to push.
- Read the builder's suggested message, shown in quotes under the Commit message field. Hover it to see all of it.
- To use it, leave the field empty. To write your own, type in the field; your text replaces the whole suggestion. A good message says what changed and why, for example
Add $15 convenience fee to cancellations made through the agent. - Click Push, or press ↵ in the field.
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. Close the note with ×. The session carries on, and the next edits you ask for can be pushed again.
Push is unavailable while the builder is working: the field says it is waiting for the current turn to finish. The bar is also hidden while a builder question is waiting for your answer.
#What Push does and does not do
| Push does | Push does not |
|---|---|
| Save the session's changes as a new commit on the branch you have open, with your message | Make anything live. Customers keep getting the live commit. |
| Give the commit the next tag on that branch | End the session |
| Make the commit available to everyone on the agent, in the Branches window and to the Apollo CLI | Run a regression or an evaluation |
To give customers the new commit, open the Branches window from the branch pill and choose Make live. See Make a commit live, lock a branch, and roll back.
#When Push takes a different path
The branch is locked. The push bar says the branch is locked and that pushing creates a new draft. Pushing then starts a new draft branch with your changes, and the session follows it. The locked branch is not touched.
Someone pushed first. If a teammate pushed to the branch after your session started, the push is refused and the bar names who pushed which commit. Nothing is overwritten. Choose one:
- Bring in, followed by the teammate's commit tag: the builder brings their commit into your session. Check the result, then push again.
- Push as a new branch: your changes go to a new draft branch cut from the commit you started on, so both lines of work are kept.
What's the diff? explains the two options.
The program has problems. If the changed program does not pass its checks, the push is refused and a red line under the bar shows the first problem and how many there are. Click View error for the details, or Copy the full error. Ask the builder in Build mode to fix them, then push again.
#Discard unsaved changes
To undo part of a change, ask the builder in Build mode, for example "Undo the fee change but keep the new wording." It edits the program back and the result stays unsaved until you push.
To drop all of the unsaved changes:
- Click New session (+) in the builder header.
- A note above the composer shows how many unsaved changes are on the branch, and explains that a new session starts from the last commit and does not see them.
- Click Discard to drop them. The working copy goes back to the last commit, and the builder confirms how many files it discarded.
Click See changes instead to reopen the session that made them.