# Enabling from the UI

{% stepper %}
{% step %}
**Visit UI**

Visit <http://localhost:4200>
{% endstep %}

{% step %}
**Configure Intercept Mode**

First change the agent mode to Mock. On the top left of the UI, expand the dropdown and choose Mock.

<figure><img src="/files/meQwMvhbWqkRuq2efYo2" alt="" width="369"><figcaption><p>Figure 1. Changing agent mode</p></figcaption></figure>
{% endstep %}

{% step %}
**Configure Policy**

Similar to recording requests, click the cog icon button on the right in the navigation menu.

<div align="center"><img src="/files/oVxxlgRKIgu8JvKc6eqX" alt="Figure 2. Agent UI navigation menu" width="375"></div>

This will take you to the **Proxy Settings** page. Optionally set which **Scenario** to mock from, otherwise all requests ever recorded will be eligible for mocking.

{% hint style="info" %}
While not required, we recommend specifying a scenario to mock requests from
{% endhint %}

<div align="left"><img src="/files/kVWjl67RDahbG6nz7Cw2" alt="Figure 3. Mock General Settings"></div>
{% endstep %}

{% step %}
**Enable Intercept**

Click the **Run button** in Figure 2. to start mocking.

<div align="center"><img src="/files/IfpyCtjbYQHUl1T4bRXR" alt="Figure 4. Agent set to mock requests" width="375"></div>
{% endstep %}

{% step %}
**Test**

Sending any request that was previously recorded will now return the recorded response. If the request was not recorded, a "Request not found" message will be returned. To learn more on how a request is matched, visit here.
{% endstep %}
{% endstepper %}


---

# 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/guides/how-to-mock-apis/how-to-enable-mocking/enabling-from-the-ui.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.
