# Creating a Site-Based Agent

Site-based Agents are Agents that belong to a single Site. They will only be able to access Projects that are part of the same Site in which they are located.

## Creating a Site-Based Agent

To create a new Site-based Agent, navigate to your Site and select the *Agents* tab. Click either of the *Add an Agent* buttons.

![](/files/ikDmuDaSmrozzCa5FTO9)

Fill out the *Agent Name* and *Agent Description* fields. You may want to add the PC name (or FQDN) of the Agent for later reference. Click on the *Create Agent* button.

![](/files/je9oPX9ZTyOQGoSDbNfu)

Your new Agent will be shown in a "Setting Up" status, displaying a 4-digit *Agent Code* and instructions to download the Copia Agent.

![](/files/oNhGsGmnScqmKWhneTIH)

Click on the download link and install the Copia Agent (ideally with Administrator privileges) onto the PC you plan to use for backups. If you were already signed in to Copia through your browser, Copia will recognize that connection and launch you into the Copia Agent. Otherwise, you may need to first sign in to your Copia account. Enter the 4 digit *Agent Code* from the previous step and press the *Enter Code* button to register the Agent.

![](/files/akYyzAej6BPAGc0Jiu3D)

Your Agent should show in a "Connected" state and display the *Agent Code* you just entered.

![](/files/pDGml2LwTIBFuZ4JhwjY)

{% hint style="warning" %}
When installed, a task is created in the Windows Task Scheduler to check and restart the Agent in case it is not running.  This is to prevent backups from failing.  If you would like to disable the Agent for a period of time, this task should be disabled.
{% endhint %}

If you navigate back to the Agents page in the Copia Web App and refresh the page, you should see the Agent status update as an "Active" green chip. The *Agent Code* should also display in the top right of the Agent card, followed by the Agent version underneath.

![](/files/I62p10zheaNpnKI4slmM)


---

# 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.copia.io/docs/devicelink/sitesandagents/agents/creating-a-site-based-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.
