> For the complete documentation index, see [llms.txt](https://docs.qyrus.com/device-farm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qyrus.com/device-farm/ai-session/understand-agent-execution.md).

# Understand Agent Execution

This page will explain agent instructions, milestones, verifications, the Steps and Map tabs, orientation changes, stopping behavior, blocked sessions, and inactivity timeouts.

## Submit an Instruction

When the device displays **Ready to begin**, enter an instruction in the AI input field and send it. While the agent is executing:

* The submitted instruction appears in the conversation.
* The status changes to **Working...**.
* The input field is disabled until the current action finishes.
* **Stop current action** becomes available.

## Use Milestones for Multi-Phase Objectives

For a longer objective that contains several distinct phases, ask the agent to create milestones before it begins interacting with the device. Milestone creation depends on the agent recognizing the multi-phase objective and creating a milestone plan; adding the word “milestone” alone does not guarantee that a plan will be created.

When a plan is created, the session displays an **Objective milestones** control with the current progress, such as **1/8**. Select the control to expand the milestone record. The expanded panel shows:

* The number of completed milestones, such as **1 of 3 complete** while the first milestone is still running.
* The current milestone and its instruction text.
* The remaining milestones in sequence.
* The current execution state, such as **Loading**, **Nudging...**, or **Working...**.

For example, a generated plan may contain milestones for allowing pop-ups, changing the environment, updating and relaunching the app, logging in, searching, selecting an item, verifying a result, and closing the flow. The agent advances through the plan as each milestone's actions and verification are completed.

![Milestone plan](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-d23e513fe878096afba7350fc0e1b368f2bf68c2%2Fmilestone-plan.png?alt=media)

## Stop the Current Turn

To stop the action currently being performed by the agent, select the square **Stop current action** button on the right side of the chat input area. This stops the current turn while keeping the session available for further input.

![Stop current action](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-d23e513fe878096afba7350fc0e1b368f2bf68c2%2Fstop-current-action.png?alt=media)

## Stop the Device Session

To close the entire device session, select the red square stop button near the top-right of the live device screen. This is different from **Stop current action**: the chat control stops only the active turn, while the red device control ends the live session.

![Stop session](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-d23e513fe878096afba7350fc0e1b368f2bf68c2%2Fstop-session.png?alt=media)

## Respond When the Agent Is Waiting

If the agent becomes blocked and needs guidance, it returns to a waiting state and the user can describe the next action or provide instructions in the chat. Review the live device before replying so the guidance matches the current screen.

When the agent finishes the requested objective, the chat reports **Objective complete**. If no new message is entered for three minutes after the agent is waiting for input or has completed the objective, the session closes automatically because of inactivity.

![Waiting or objective complete](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-0c7840f9c8babcd264ad5eaebd143abbe69d15c8%2Fwaiting-or-complete.png?alt=media)

## Review a Completed Session

After the objective is complete, the workspace displays the executed actions and verification results. Successful actions are marked with green check indicators, and the chat includes an objective-complete message.

The workspace provides these tabs:

* **Chat** — shows the instruction, actions, notes, verifications, and completion message.
* **Steps** — shows each action, target, input value, success state, and execution timing. Expand a step for additional details.
* **Map** — shows the test flow as connected interaction nodes.

The Map tab provides **Transitions**, **Interactions**, **Show All**, and **Reset** controls, along with zoom and fit-view controls. **Show All** displays all transitions and interactions, including interaction screenshots, tap/click crosshair markers, normalized coordinates, and timing where available.

![Working session and stop control](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-d23e513fe878096afba7350fc0e1b368f2bf68c2%2Fstop-current-action.png?alt=media)

![Steps tab](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-86c5f9e19c78c0501da1bb95bd2fabc9cd413810%2Fsteps-tab.png?alt=media)

![Map with Show All](https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-170ae6b0122b77f9564b0b11db8ebc251626ade4%2Fmap-show-all.png?alt=media)
