---
version: "2026.1.0"
language: "en"
---
# Get Agent Session

The **Get Agent Session** building block fetches details about the current flow execution (for example when running from a run list), so the values can be used at runtime for decisions or alternative flow paths.  
![image-20260207-140617.png](https://docs.leapwork.com/__attachments/a_871e7f85782119caa40b181dd867862ccd9fa9b7e852c92cba628ead5094ccef/image-20260207-140617.png?cb=da3d274270b013442a4752cb97c08619)

**Note:** The screenshot on this page uses the **Elegance Design** , introduced in **2025.3**. If you are using an earlier version, your layout may look different.

## Quick-start

1. Drag **Get Agent Session** onto the canvas.

2. Connect the block in the flow. Use the output values (for example **Flow name** , **Run List name** , or **Agent \> Type**) in later blocks for logging or branching.

3. Run the flow when it's ready.

## Building block parameters

Parameters  
* **Block header** : The block title ("Get Agent Session") can be renamed by double-clicking it and typing in a new title.

* **Flow name** : Contains the name of the flow at the time of execution.

* **Flow version** : Contains the version of the running flow at the time of execution.

* **Run List name** : Contains the name of the run list that executes the flow containing the block.

* **Schedule name** : Contains the name of the schedule that executes the flow containing the block.

* **Step name** : Contains the name of the specific step inside the run list that executes the flow containing the block.

* **Agent** : Contains information about the agent environment the flow is executed on, and can be expanded into sub-properties such as **Name** , **Type** , **Host** , and **Port** .

  * **Name** : The agent name as defined in the agent configuration.

  * **Type** : The agent type (for example Remote Agent, Selenium Grid, Sauce Labs, Browser Stack, or Gridlastic).

  * **Host** : The agent host name as defined in the agent configuration.

  * **Port** : The agent port number as defined in the agent configuration.

  * **Username** : Contains the name of the user under which the flow is executed.

  * **Machine name** : Contains the name of the machine on which the flow is executed.

  * **Resolution**: Contains the screen resolution at the time of execution.

## Resources

|                                                **Topic**                                                |                                                  **Description**                                                  |
|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [Flows FAQ](https://docs.leapwork.com/faq/latest/leapwork-flow-faq/flows-faq.md)                                                 | Common questions about creating, running, and managing flows in Leapwork.                                         |
| [Flows Troubleshooting](https://docs.leapwork.com/troubleshooting/latest/leapwork-flow-troubleshooting/flows-troubleshooting.md) | Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |