# Data Rules

{% hint style="info" %}
**Configures:**

* Which scenario to use?
* Which policy to use for a particular [Stoobly mode](/core-concepts/agent/intercept-modes.md)?
  {% endhint %}

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

## Source or Destination

{% hint style="info" %}
Answers: Where to record/mock requests?
{% endhint %}

For recording, this setting controls which scenario the request will be saved to. For all other modes, this setting controls which scenario the request will be searched from.

## Policy

{% hint style="info" %}
Answers: Which requests to record/mock?
{% endhint %}

### Record Policy

Record policy settings controls what to do with requests received by the agent. By default, the agent will record `all` requests intercepted.

To configure the record policy, go to the Proxy Settings by clicking on the cog next to the Run button. Below is similar to what you will see.

<div align="left"><img src="/files/fmtbTeNcVQJ6b3wnxYuc" alt="Figure 1. Record policy settings"></div>

The following describes the behaviour of each record policy:

<table><thead><tr><th width="201.71124589450892">Policy</th><th>Description</th></tr></thead><tbody><tr><td>all</td><td>All requests will be recorded</td></tr><tr><td>not_found</td><td>Only requests not previously recorded will be recorded</td></tr><tr><td>overwrite</td><td>Active scenario will be overwritten with record requests</td></tr></tbody></table>

### Mock Policy

Mock policy settings controls what to do with requests received by the agent.

By default, the agent will only mock `found` requests.

<div align="left"><img src="/files/nSSW6MnLlJ9PKz55Rkjb" alt="Figure 2. Mock policy settings"></div>

The following describes the behaviour of each mock policy:

<table><thead><tr><th width="210.6632398448366">Policy</th><th>Description</th></tr></thead><tbody><tr><td>all</td><td>All requests will be mocked</td></tr><tr><td>found</td><td>Only requests that have been recorded will be mocked</td></tr></tbody></table>


---

# 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.stoobly.com/core-concepts/agent/proxy-settings/data-rules.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.
