# Running the Agent

Zirkul Agent can be used for several tasks including:

* **Stand alone tool:** for security tasks such as manually running scans or commands taking advantage fo the plugins available.
* **Webhook Trigger**: for starting CICD jobs.
* **Service mode**: for running as a system service within your infrastructure for executing Jobs created for CICD pipelines.

### Stand alone

Zirkul Agent was initially designed as a command line tool for security automation, you can simply run zirkul from terminal for starting the interactive command line interface:

```bash
zirkul
```

<figure><img src="/files/sQnsZsS70gFThDFGx2iI" alt=""><figcaption></figcaption></figure>

See more in [Command Line Interface](/zirkul-agent/running-the-agent/command-line-interface.md)

### Webhook Trigger

You can use the Agent for calling webhooks used for starting Jobs in Zirkul Server:

```sh
zirkul --apikey "<api_key>" --webhook "<token>" --agent "<agent_key>" --wait
```

Where:

* \<api\_key> is the API Key created in Zirkul Server.
* \<token> is the webhook token id assigned to the Job you want to run. see [Creating Jobs](/devsecops/creating-jobs.md)
* \<agent\_key> is the Agent name or key you want to assign.

Note:

* \--server is optional, the default value is '<https://app.zirkul.com>'
* \--webhook is required for calling a web hook.
* \--apikey is required for calling a web hook.
* \--agent is required for calling a web hook.
* \--wait is optional, use this if you want the agent to wait until the Job is completed.

### Service Mode

Service mode is used for running the agent as system service that will continue running continuously waiting for Jobs to be executed.

```sh
zirkul --server "https://app.zirkul.com" --service --agent "<agent_key>" --apikey "<api_key>"
```

Where:

* \<api\_key> is the API Key created in Zirkul Server.
* \<agent\_key> is the Agent name or key you want to assign.

Note:

* \--server is optional, the default value is '<https://app.zirkul.com>'
* \--service is required for running in service mode.
* \--apikey is required for running in service mode.
* \--agent is required for running in service mode.


---

# 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.zirkul.com/zirkul-agent/running-the-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.
