> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/c++-agent/agent-configuration-parameters.md).

# Agent Configuration Parameters

The C++ Agent supports various configuration parameters that control its behavior in different usage modes. This page summarizes the different approaches you can use to apply configuration parameters and adds context to the detailed parameter reference table, found: **C++ Agent Parameter Reference Table**

### Usage Mode-Specific Parameters

The C++ Agent operates in two distinct usage modes, and many configuration parameters apply only to specific modes:

* **Coverage Listener Mode** - Parameters used when instrumenting applications to collect coverage data.
* **Test Runner Mode** - Parameters used when instrumenting test frameworks to collect test execution details
* **Both modes** - Parameters used in either agent operating mode.

The **C++ Agent Parameter Reference Table** indicates which usage mode each parameter applies to, helping you focus on the relevant settings for your specific implementation.

### Ways to Configure Agent Parameters

The C++ Agent supports three different ways to set configuration parameters:

* **Environment Variables** - Set via shell environment (e.g., `SL_TOKEN=your-token`)
* **CLI Flags** - Provided as command-line arguments (e.g., `--token=your-token`)
* **Configuration File** - Specified in a JSON file (default: `settings.json`)

Not all parameters can be set using all three methods. The [reference table](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/c++-agent/agent-configuration-parameters/go-agent-parameter-reference-table.md) shows exactly which methods are available for each parameter, with empty cells indicating that method is not supported for that parameter.

#### When Using a Configuration File

The agent automatically loads configuration from `settings.json` if this file exists in the directory where you run agent commands. To use a different configuration file name, specify it with the `--config` flag as part of the `SL.Agent.Cpp config` command:

```bash
./SL.Agent.Cpp config --config=custom-config.yaml --token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... "
```

When the same parameter is set using multiple methods, the following precedence order applies (highest to lowest priority):

1. **Environment Variables** (highest priority)
2. **CLI Flags** (medium priority)
3. **Configuration File** (lowest priority)
4. **Default Values** (used only when parameter is not set by any other method)

### Default Values

Many parameters have built-in default values that are used when the parameter is not explicitly configured. If a default value exists for a parameter, it will be shown in the reference table.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/c++-agent/agent-configuration-parameters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
