# Installing Gateway Agent

1. Tailent Gateway Agent installation kit (zip) - <https://tailent-share.s3.eu-central-1.amazonaws.com/Orch/TailentGatewayAgent_1.3.3.0.zip>
2. TAP Bundle (TAP Studio + TAP Assistant) builds with TGA functionality enabled
3. Dedicated Windows User account belonging to the Administrators group (we'll assume it's called **TGAUser** for this exercise)
4. Microsoft Terminal Services / Remote Desktop installed and configured for all target users
5. Microsoft Visual C++ Redistributable 2013 (64 bit) must be installed on the Windows host environment. This can be obtained at <https://www.microsoft.com/en-us/download/details.aspx?id=40784>

The following steps must be followed in order:

1. The installation kit needs to be unzipped in a location where the user mentioned at #1 above has full read/write privileges (for reference, we'll assume that we'll be installing Tailent Gateway Agent to &#x43;**:\Tailent\TGA** for this exercise)
2. Open a **Command Prompt** (as Administrator) and type the following command:\
   \
   **sc create "TAP Gateway Agent" binPath= "C:\Tailent\TGA\TailentGatewayAgent.exe"**\
   \
   The following message should be displayed, signaling the Windows service has been successfully created and is ready to be configured.<br>

   <figure><img src="/files/zUlTcpi00rYW3mECgPdy" alt=""><figcaption></figcaption></figure>
3. Next, run **services.msc** from the Start Menu -> Run command and you should be able to see the recently created service listed:\ <br>

   <figure><img src="/files/QVzAvXeiro0jPJwl8Vqu" alt=""><figcaption></figcaption></figure>
4. This service needs to be configured to run automatically:

<figure><img src="/files/eE3GlKFHtwBcGZ2lMZie" alt=""><figcaption></figcaption></figure>

5. Aditionally, in order for TGA to be able to create Windows user session for unattended use, it also needs to be configured to run under the dedicated Windows user:<br>

<figure><img src="/files/wCu3yHsUmANBBmKyLf4F" alt=""><figcaption></figcaption></figure>

6. Before starting this service, certain configuration parameters need to be set. This can be done by editing the configuration file found under the TGA folder, called **appsettings.json**. It should look something like this:\ <br>

   <figure><img src="/files/l778i10NxA665Ruaoi9Y" alt=""><figcaption></figcaption></figure>

**AllowedHosts -** controls which addresses the TGA service will accept incoming requests. \
**ListenPort** - controls the port under which the TGA service will accept incoming requests.\
**Token** - represent a security token that must be used under all operational requests with TGA. Failure to provide this security token will lead to 403 Forbidden responses. This is a secret and should be changed to a randomly generated and secure string. For this setup exercise, we'll be leaving this token unaltered.\
**Timeout** - the timeout, in seconds, over which operational requests will fail. The default value of 120 seconds is a very safe setting and can usually be left unaltered.     &#x20;

7. After reviewing all the above steps, start the service so incoming requests can be accepted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tailent.com/getting-started/tailent-gateway-agent/installing-gateway-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
