# Agent Installation

### **Prerequisites**

Agent flag needs to be enabled in the sapor configuration (It is enabled by default; checking may not be necessary unless someone disables it.)**.**

```
kubectl edit secret oes-sapor-config -n isd-dev
The secret contains an application.yaml. Decode this.
echo xxxxxxxxxxx | base64 -d
This will have the line
  agent:
    enabled: true
```

The forwarder external host name needs to map with the agent-grpc service external ip address in ISD Namespac&#x65;**.**

<figure><img src="https://lh6.googleusercontent.com/S0cMrxmGmQHi7GwPpWzoREUIL7OYUEeyLoSppQ8C97WI6qOtv28bzr_aFpPBTr5hCPDs3YgdwS57MBLFsugV59ExvjPtv4FPhXylsqni0PyTtqQ3goPq0zyMpSPz9mz46E2wAWMS-rBVgHLzRMp06Xs" alt=""><figcaption></figcaption></figure>

```
agentHostname: controller.argo-dev.opsmx.net
remoteCommandHostname: controller.argo-dev.opsmx.net
```

{% hint style="info" %}
**Note:** The above step is only necessary **if you are creating the agent for the first time**; if it is done already, no need to do this for subsequent agent creations.
{% endhint %}

### **Apply the services.yaml**

```
$ kubectl apply -f services.yaml -n <AGENT-NAMESPACE>
```

### **Deploy agent manifest**

Apply the agent manifest

```
 $ kubectl apply -f <agent-manifest-file>.yaml -n <AGENT-NAMESPACE>
```

{% hint style="info" %}
**Note: The agent manifest name will be the same as the agent name you have given in ISD.**
{% endhint %}

Check the agent pod status; it should be in running state if it’s installed without any issues.

```
$ kubectl get pods -n <AGENT-NAMESPACE>
```


---

# 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.opsmx.com/opsmx-1/opsmx-context-engine/user-guide/opsmx-agent/agent-installation.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.
