> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qxlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scopes and permissions

> How agent access is scoped and which actions run without asking, from connected apps down to individual tools and vaults down to folders and files.

Everything an agent can reach is scoped: its [connected apps](https://docs.qxlabs.com/agents/apps-and-knowledge.md) down to individual tools and the account it acts as, and its knowledge vaults down to folders or files. Untick a tool and that action is out of reach entirely. Permissions then decide which of the remaining actions run without asking and which wait for your [approval](https://docs.qxlabs.com/agents/approvals.md).

## You stay in control

An agent chooses only the proper scopes for the job, the [builder](https://docs.qxlabs.com/agents/create-an-agent/build-with-ai.md) connects the exact tools it needs, never the whole app. You can always change this while editing the agent, in its **Connected apps** and **Knowledge** sections, and you can change it while chatting too, just tell the agent. Every choice stays visible in the editor, so nothing is ever hidden from you.

![Adjusting an agent's app tools and knowledge scope in the editor](https://mintcdn.com/qx-labs/jWuB4YCOb71J-Xxg/images/agents/scopes-and-permissions/scope-editor-light.png?fit=max\&auto=format\&n=jWuB4YCOb71J-Xxg\&q=85\&s=c55d31939fe6f3af65eb296e87482d47)

## Set permissions for a connected app

Each app you connect has its own permissions, which apply to every agent that uses it. Each action is set to **Always allow**, **Needs approval**, or **Blocked**, see [Approvals](https://docs.qxlabs.com/agents/approvals.md) for what each one means.

**1. Open the app's permissions**

Go to [**Connected Apps**](https://app.qxlabs.com/credentials) and click **Permissions** on the app's row.

![A Gmail connection on the Connected Apps page with its Permissions button](https://mintcdn.com/qx-labs/p2bMdM90Z8LdmLFA/images/agents/scopes-and-permissions/permissions-button-light.png?fit=max\&auto=format\&n=p2bMdM90Z8LdmLFA\&q=85\&s=7e5f240c524375d40115dfbd8cb5b40d)

**2. Choose a setting**

Actions are split into **Read actions** and **Write actions**. Pick a setting for a whole group, or expand it and choose **Allow**, **Ask**, or **Block** for a single action. **Default** keeps QX's choice, which lets reading run and asks before writing, or your [admin's setting](#set-app-permissions-for-your-organization) if they've chosen one.

![The Permissions sheet for Gmail with quick buttons and per-action Allow, Ask, and Block controls](https://mintcdn.com/qx-labs/p2bMdM90Z8LdmLFA/images/agents/scopes-and-permissions/permissions-sheet-light.png?fit=max\&auto=format\&n=p2bMdM90Z8LdmLFA\&q=85\&s=1d5574e02975e1fbde0f672ef30fb995)

Gmail here is set to ask before fetching emails

**3. Save**

Click **Save**. The new settings apply to every agent that uses this app.

The buttons at the top of the sheet set whole groups in one click, like **Ask for all write** or **Block all write**, and **Reset to QX defaults** puts everything back. Actions marked **Irreversible**, like permanently deleting messages, can't be undone once they run.

Only the person who connected the app can change its permissions. If the app is [shared](https://docs.qxlabs.com/connected-apps/overview.md#sharing) with you, you can open its permissions to see what's set, and you can still approve actions in your own chats when an agent asks.

## Set permissions for one agent

An agent can also have its own setting for each tool. In the agent editor's **Connected apps** section, click the tools button on an app's row.

![An app row in the agent editor's Connected apps section with its tools button](https://mintcdn.com/qx-labs/p2bMdM90Z8LdmLFA/images/agents/scopes-and-permissions/agent-tools-button-light.png?fit=max\&auto=format\&n=p2bMdM90Z8LdmLFA\&q=85\&s=bf69bf7efa5eaa2bf87631d9db0a83bd)

Next to each tool, choose **Inherit** to keep the app's setting, or pick **Always allow** or **Needs approval** for this agent only. The dropdown at the top of each group changes every ticked tool at once. Click **Done**, then **Save changes**.

![The agent editor's tool list for Google Calendar with the Inherit, Always allow, and Needs approval options open](https://mintcdn.com/qx-labs/p2bMdM90Z8LdmLFA/images/agents/scopes-and-permissions/agent-tool-permissions-light.png?fit=max\&auto=format\&n=p2bMdM90Z8LdmLFA\&q=85\&s=5cced7f1099084c4c4cf91e0e21a6f81)

Google Calendar here is set to ask before reading

**Always allow** is offered only when you own both the agent and the app's connection, and your admin hasn't limited the tool. An agent can't lift a block either, a tool that's Blocked on the app shows **Blocked** here, or **Blocked by admin** if your admin blocked it.

## Set app permissions for your organization

Owners and admins can set limits for everyone in the organization under [**Settings → App Permissions**](https://app.qxlabs.com/settings/app-permissions). Your settings replace QX's defaults for every app, and nobody can loosen them. People can still make their own apps and agents stricter.

![Settings, App Permissions, with All apps set so read actions need approval and a Gmail entry under Specific apps](https://mintcdn.com/qx-labs/ekA_8w0s94JojVja/images/agents/scopes-and-permissions/app-permissions-page-light.png?fit=max\&auto=format\&n=ekA_8w0s94JojVja\&q=85\&s=90bd59087aa1b3b8346e36c3ca71c240)

Read actions here need approval in every app, and Gmail has its own setting

**1. Choose a setting for all apps**

Under **All apps**, pick a setting for **Read actions** and for **Write actions**. **Not set** keeps QX's default, which lets reading run and asks before writing. Each change saves straight away.

**2. Give one app its own setting**

Under **Specific apps**, click **Add app** and pick the app, even one nobody has connected yet. Its **Permissions** sheet opens, where you choose a setting for its **Read actions** and **Write actions**, or **Allow**, **Ask**, or **Block** for a single action. **Not set** follows **All apps**, and **Save** applies it.

![The Permissions sheet for Gmail's own setting, with Write actions set to Blocked and Send Email set to Ask](https://mintcdn.com/qx-labs/ekA_8w0s94JojVja/images/agents/scopes-and-permissions/app-permissions-app-sheet-light.png?fit=max\&auto=format\&n=ekA_8w0s94JojVja\&q=85\&s=34e6afe3c9ca93139817e5c669cd0912)

Gmail's write actions are blocked, except Send Email, which asks first

**3. Change or remove an app's setting**

Click **Edit** on the app's row to change it. The delete button removes it, and the app follows **All apps** again.

Everyone sees your limits in an app's **Permissions** sheet and in the agent editor. Choices looser than your limit are greyed out and marked **locked by admin**, and actions you blocked show **Blocked by admin**. If someone had already chosen something looser, your limit applies instead, and their choice comes back if you remove the limit.

![A member's Gmail Permissions sheet with Read actions limited by the admin, Always allow locked by admin in the dropdown, and write actions blocked](https://mintcdn.com/qx-labs/ekA_8w0s94JojVja/images/agents/scopes-and-permissions/admin-locked-connection-light.png?fit=max\&auto=format\&n=ekA_8w0s94JojVja\&q=85\&s=df55b30d2b56b3e12ffcc6c86249007e)

What a member sees on their Gmail connection, Always allow is locked for reading and writing is blocked

Your limits cover QX's built-in apps, like DataForSEO, too. They don't change the **Actions** of an [external WhatsApp agent](https://docs.qxlabs.com/agents/external-whatsapp-agents.md).

> [!NOTE]
>
> **Needs approval** means the agent asks the person it's working for. Where nobody is asked, like a chat with **Auto** on, email, scheduled tasks, and **Run an Agent** in flows and grids, those actions run without asking, see [When the agent asks](https://docs.qxlabs.com/agents/approvals.md#when-the-agent-asks). To stop an action everywhere, set it to **Blocked**.

## When settings disagree

An app's settings and an agent's settings can both apply to the same tool. The stricter one wins, so a teammate's agent can never stop asking on your account. The one exception is your own agent on an app you connected, where the agent's setting comes first, so you can let one agent run an action without asking while every other agent still asks. Your [admin's limits](#set-app-permissions-for-your-organization) sit above all of these, so nothing can be looser than them. **Blocked** always wins, whoever set it.

## Scope a vault to folders or files

A vault you attach in the agent editor's **Knowledge** section starts fully open, its row reads **Entire vault** and the agent can search everything in it. To narrow it, click **Configure scope** on the vault's row. The vault's contents appear as a tree of checkboxes, tick the folders or files you want the agent to use. Ticking a folder includes everything inside it, and you can untick individual files within to leave just those out. Click **Save** to apply. The **Entire vault** button clears your picks and restores full access, and leaving everything unticked means full access too, so an untouched vault never locks the agent out.

![The vault scope picker with a folder and individual files ticked](https://mintcdn.com/qx-labs/tFwKBYEYIRMDA7bs/images/agents/scopes-and-permissions/vault-scope-picker-light.png?fit=max\&auto=format\&n=tFwKBYEYIRMDA7bs\&q=85\&s=5f4d936c063fcbe0ef9bef552b644989)

Tick the folders and files the agent may search

![The Knowledge section listing a vault narrowed to selected folders and files](https://mintcdn.com/qx-labs/tFwKBYEYIRMDA7bs/images/agents/scopes-and-permissions/vault-scope-summary-light.png?fit=max\&auto=format\&n=tFwKBYEYIRMDA7bs\&q=85\&s=501f80f336ceb07e7be8115e30e520f1)

The attached vault shows what's in scope

Once saved, the vault's row shows a short summary of what you picked, and that selection is all the agent gets. It searches and cites only the folders and files in scope, the rest of the vault is invisible to it.

## Scope a single conversation

You can also change what an agent may use for one chat, without editing the agent. In the [chat](https://docs.qxlabs.com/agents/chat.md) composer, open the capabilities, connected apps, or knowledge popover and toggle what you want. Vaults go further than on and off, hover one in the knowledge popover and click **Configure scope** to open the same folder and file picker as the editor. Either way the change applies to that conversation only, and the saved agent stays exactly as it was. These toggles change what the agent can use, not whether it asks, approvals still follow the app's and the agent's permissions.

![The chat composer's connected apps popover with the Gmail tools button highlighted](https://mintcdn.com/qx-labs/jWuB4YCOb71J-Xxg/images/agents/scopes-and-permissions/scope-chat-apps-light.png?fit=max\&auto=format\&n=jWuB4YCOb71J-Xxg\&q=85\&s=e4383da4db9eed4d1685685adce03cb0)

Open the apps popover in the composer and click the tools icon on Gmail

![Choosing the Gmail tools the agent can call in this chat](https://mintcdn.com/qx-labs/jWuB4YCOb71J-Xxg/images/agents/scopes-and-permissions/scope-chat-gmail-tools-light.png?fit=max\&auto=format\&n=jWuB4YCOb71J-Xxg\&q=85\&s=5737ea14584420ed9fb48c873759b29a)

Pick which Gmail tools this chat may use

## What scoping means in practice

When an agent runs, only the tools you see in its editor exist for it. An agent that can read an inbox but not send from it cannot send, no matter how it is asked, and a vault scoped to one folder keeps every other document out of view. When an app has more than one account connected, the agent acts as one specific account, and you choose which.

> [!TIP]
>
> Keep scopes minimal. An agent with just the tools its job needs picks the right one more reliably, runs faster, and can't touch anything you didn't intend.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.