> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/administrator-docs/agent-setup/agent-overview.md).

# Agent overview

The OCS Inventory Agent is the client component that collects inventory data from devices and sends it to the OCS Inventory server (or writes it locally, depending on configuration).&#x20;

The agent performs three main tasks:

* Collects device information (basic information, see [Base and Template Inventory](/quickstart-guides/for-users/base-and-template-inventory.md#base-inventory), but also extended information through [Inventory and Templates](/user-docs/asset-management/inventory-and-templates.md#template-inventory)).
* Formats results into an inventory payload.
* Sends the payload to the server or writes it to a local file, depending on configuration.

### Requirements and compatibility

For agent compatibility, please refer to [System Requirements](/administrator-docs/system-requirements.md#agent).

### Workflow

{% stepper %}
{% step %}
Install the agent on the target device.

See [#installation](#installation "mention").
{% endstep %}

{% step %}
Run it either:

* as a **service** on a schedule
* as a **one-time command**
  {% endstep %}

{% step %}
On each run, the agent gathers device inventory and optional template data.
{% endstep %}

{% step %}
Then it either:

* **syncs configuration** with the server and **uploads inventory**
* **writes an inventory file locally** for offline workflows
  {% endstep %}

{% step %}
**If deployment is enabled, the agent can also process packages after the inventory upload step.**
{% endstep %}
{% endstepper %}

### Installation

Two installation modes are made available and will depend on the host OS:

* [Linux installation](/administrator-docs/agent-setup/installation-methods/using-official-repositories-linux.md)
* [Broken mention](broken://pages/SiTrag0UkaPa3evFi2Ny)

### Usage

The agent can run:

* On a schedule (most common)
* On demand (useful for testing and troubleshooting). You will require terminal access and sufficient privileges:
  * **Linux/macOS**: `sudo ocsinventory-cli`&#x20;
  * **Windows**: `"C:\Program Files\OCS Inventory Agent\ocsinventory-agent.exe"`


---

# 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://documentation.ocsinventory-ng.org/administrator-docs/agent-setup/agent-overview.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.
