> For the complete documentation index, see [llms.txt](https://docs.logsail.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.logsail.com/agents/deploying-reactive-agents.md).

# Deploying Reactive Agents

LogSail Reactive Agents are compiled for many UNIX flavors. These agents configure themselves with our APIs using our protocol, Perspicacity.

### Installing the Agent

{% tabs %}
{% tab title="CentOS" %}

#### Install Repo File

```bash
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://repo.logsail.com/linux/centos/logsail-ra.repo
```

#### Install Agent

<pre class="language-bash"><code class="lang-bash"><strong>sudo yum install lsagent
</strong></code></pre>

{% endtab %}

{% tab title="RedHat" %}

#### Install Repo File

```bash
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://repo.logsail.com/linux/rhel/logsail-ra.repo
```

#### Install Agent

```bash
sudo yum install lsagent
```

{% endtab %}

{% tab title="Fedora" %}

#### Install Repo File

```bash
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://repo.logsail.com/linux/fedora/logsail-ra.repo
```

#### Install Agent

```bash
sudo yum install lsagent
```

{% endtab %}

{% tab title="Debian" %}

#### Install APT Package Index

<pre class="language-bash"><code class="lang-bash"><strong>sudo apt-get update &#x26;&#x26; apt-get install ca-certificates curl gnupg lsb-release
</strong></code></pre>

#### Adding LogSail's GPG Key

<pre class="language-bash"><code class="lang-bash"><strong>curl -fsSL https://repo.logsail.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/logsail-keyring.gpg
</strong></code></pre>

#### Setup the Stable Repository

This command will detect the architecture and Debian release so the proper agent package is installed on the host.

```bash
echo \
 "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/logsail-keyring.gpg] https://repo.logsail.com/linux/debian \
 $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/logsail-ra.list > /dev/null
```

#### Install Agent

```bash
sudo apt update && apt install lsagent
```

{% endtab %}

{% tab title="OpenBSD" %}

### LogSail Reactive Agent for OpenBSD7.3

It is expected that both `curl` and `python3` be pre-installed on the target system before attempting the agent install.

#### Adding Public Key for Signature Verification

```bash
curl https://repo.logsail.com/OpenBSD/logsail-obsd73-pkg-key.pub --output /etc/signify/logsail-obsd73-pkg-key.pub
```

#### Configuring Package Path

```bash
export PKG_PATH=https://repo.logsail.com/OpenBSD/7.3/packages/amd64/
```

#### Install Agent

```bash
pkg_add lsagent
```

{% endtab %}
{% endtabs %}

### Setting Token File

Create and copy a new agent token from the LogSail console and write the token to the token file.

```bash
echo -n '<AGENT TOKEN>' > /etc/lsagentd/token.rt
```

### Start and Enable Reactive Agent for Linux

On Linux, reactive agents are managed by the `systemd` utility.

<pre class="language-bash"><code class="lang-bash"><strong>sudo systemctl enable lsagent &#x26;&#x26; systemctl start lsagent
</strong></code></pre>

### Start and Enable Reactive Agent for OpenBSD

On OpenBSD, reactive agents are managed by the `rc` utility.

```bash
rcctl start lsagentd && rcctl enable lsagentd
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.logsail.com/agents/deploying-reactive-agents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
