> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Local agents

Local agents are used for on-premise connectors that cannot be accessed through the cloud.
Chift has developed a local agent that can be run on on-premise connectors' servers and that acts as a proxy between your server and Chift's infrastructure. This makes it possible to expose an API on top of those connectors.\
This is typically used for connectors like Winbooks, Sage 100, Sage 50, etc.

## How it works

<Note>
  The local agent does not require any specific network configuration. It connects to Chift's cloud infrastructure and does not expose any port to the internet.
</Note>

## Setting up a local agent

Typically the process to set up a local agent is the following:

1. The consumer visits the public connection page of a connector and clicks on "Connect".
2. The consumer can download a zip file or send a link to this zip file to another person (useful when the installation needs to be done by a third-party)
   <img src="https://mintcdn.com/chift/aWq5vbrf-53qII-A/assets/docs/local-agent/setup.png?fit=max&auto=format&n=aWq5vbrf-53qII-A&q=85&s=4f71a24b2f3abe7e83b82381fd137fb2" alt="Setup local agent" width="898" height="566" data-path="assets/docs/local-agent/setup.png" />
3. At this moment the consumer has a connection which is not yet operational.
   <img src="https://mintcdn.com/chift/aWq5vbrf-53qII-A/assets/docs/local-agent/offline.png?fit=max&auto=format&n=aWq5vbrf-53qII-A&q=85&s=52bd2a4a838e23d2bacc9a538715772f" alt="Local agent not operational" width="1204" height="1042" data-path="assets/docs/local-agent/offline.png" />
4. The consumer or their technical contact extracts the zip file and installs the `Setup.exe` file (alongside a settings.json file containing the information related to this specific connection).
   This installs a Windows service on the server on which the connector is running that acts as a bridge with Chift.
5. Once the service is installed, the connection becomes green on the consumer's dashboard and you can execute requests.
6. At any time, you can see the status of the local agent and its latest heartbeat. You can also configure webhooks to be notified of the local agent's status.

<Info>
  For every connector, you will find specific documentation in the connector's documentation and as well in the end-user connector's documentation to ease the process of installation.
</Info>

## Monitoring a local agent

Through the Chift dashboard, you can see the status of the local agent and its latest heartbeat (sent every 15-20 minutes).\
On a consumer's page, you can see whether the agent is:

* Online and operational: green
* Offline: orange (it's installed but not running currently)
* Offline: red (the service is not installed)

<Info>
  Because a local agent might be down, we recommend using a retry mechanism or implementing webhooks.
</Info>

## Cockpit

You can use the **Chift Cockpit** to configure your connections running on an on-premise server (or computer).

You can find more information on how it works [here](https://help.chift.app/articles/4765527643-local-agent-cockpit-user-guide?lang=en)

<img src="https://mintcdn.com/chift/csR5ZfKVRHI5FCw3/assets/docs/local-agent/cockpit.png?fit=max&auto=format&n=csR5ZfKVRHI5FCw3&q=85&s=8eb3524352d5e378bff022346fb85e24" alt="Setup cockpit" width="1385" height="844" data-path="assets/docs/local-agent/cockpit.png" />
