---
title: How do you scope what a Salesforce Agentforce agent can do with topics and actions?
url: https://opencontroller.lyzr.com/blog/scope-agentforce-agents-with-topics-and-actions
published: 2026-11-15
updated: 2026-11-15
author: Lyzr
---

# How do you scope what a Salesforce Agentforce agent can do with topics and actions?

**Scope an Agentforce agent at three layers: the topics (now called subagents) that decide which requests it accepts, the actions each topic is allowed to call, and the permissions of the agent user that runs those actions. Prompt instructions alone are not a boundary. Use deterministic controls in Agent Script, such as `available when` conditions, to remove actions the agent should not see, and rely on Salesforce permissions to block anything the agent user should never touch.**

Teams usually ask this after a pilot agent answers something outside its job. The fix is rarely a better prompt. It is a tighter structure.

## What are the scoping layers in Agentforce?

Agentforce routes each request to a topic, then lets the reasoning engine pick actions inside that topic. Salesforce has renamed topics to "subagents" in its latest architecture guidance, so you will see both terms in documentation and in older orgs.

| Layer | What it controls | How strong is it? |
|---|---|---|
| Classification description | Which requests route to the topic | Soft: interpreted by the model |
| Scope | What the agent should and should not do in the topic | Soft: interpreted by the model |
| Instructions | Behaviour, tone, when to ask a human | Soft: Salesforce notes "always run" style prompts are suggestions |
| Actions assigned to the topic | Which Flow, Apex, prompt template or API calls exist | Hard: an unassigned action cannot be called |
| `available when` in Agent Script | Whether an action is shown to the model at all on this turn | Hard: a false condition removes the action from the tool list |
| Agent user permissions | Which objects, fields and records the action can read or change | Hard: enforced by the platform |

The rule of thumb: put the business boundary in the hard layers, and use the soft layers to improve routing and answers.

## How should you write topic scope and classification descriptions?

The classification description decides routing. Salesforce's admin guidance says the scope field lets you "define guardrails around what your agent can and cannot do using this topic." Write both narrowly.

1. **One job per topic.** "Check order status for the signed-in customer" beats "Help with orders."
2. **State exclusions in scope.** List what the topic must not do, such as issuing refunds or changing addresses.
3. **Say when to hand off.** Add an instruction for when the agent should ask for more context or escalate to a person.
4. **Avoid overlapping descriptions.** Two topics that both claim "account questions" make routing unpredictable.
5. **Keep a catch-all off-topic path.** Requests that match nothing should get a polite refusal, not the nearest topic.

## How do actions and Agent Script make the boundary hard?

Actions are the only way an agent changes data. Each topic should carry only the actions its job needs. Salesforce supports standard actions, plus custom actions built with Flow, Apex, prompt templates or API calls.

Agent Script, used by the new Agentforce Builder, adds deterministic control. According to Salesforce's architecture guide:

- Each subagent has `before_reasoning`, `reasoning` and `after_reasoning` zones.
- Logic in `before_reasoning` runs on every parse, before the model sees anything.
- An action with an `available when` condition that evaluates to false is "removed from the tool list presented to the LLM entirely."
- Action parameters can be bound to session variables, so the model does not assemble them.
- The platform does not automatically suppress an action after it has been called, so an open gate plus vague instructions can make the agent loop.

That means you can gate a refund action on a verified-customer variable set by code, not by the model. If verification has not happened, the model never sees the refund tool.

## What does the agent user add?

Every action runs with the permissions of the agent's running user. If a Flow can update any case, the agent can update any case, regardless of what the topic scope says. Give the agent user a dedicated permission set with only the objects and fields its actions need, and review sharing rules for record access. We cover this in more detail in [Agentforce agent user permissions](/blog/agentforce-agent-user-permissions).

## What should a scoping review check before go-live?

Use this checklist for each agent:

1. Every topic has a single job, explicit exclusions and a hand-off instruction.
2. No action is assigned to a topic that does not need it.
3. Every write action (update, create, refund, send) is gated by a deterministic condition, not a prompt instruction.
4. Action inputs that identify records come from session variables where possible.
5. The agent user has a dedicated, minimal permission set.
6. Off-topic and adversarial test prompts were run and failed safely. See [testing Agentforce agents before deployment](/blog/test-agentforce-agents-before-deployment).
7. Changes to topics and actions go through the same review as code changes.

## How Opencontroller does this

Opencontroller connects to Salesforce as a third-party agent platform, so Agentforce agents appear in one governed registry alongside agents from other clouds and platforms. Posture flags risky permissions and configurations. Policies are written as code and apply across the estate, and per-agent Block and Quarantine controls act through the connected platform. Multi-turn and red-team evals can test scope before release. See the [cross-platform governance guide](/blog/how-to-govern-ai-agents-across-platforms) or the [AI agent control plane explainer](/blog/what-is-an-ai-agent-control-plane), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Are Agentforce topics and subagents the same thing?**
Yes. Salesforce's architecture guidance says topics have been renamed to subagents. Older orgs and documentation still use "topics."

**Is the topic scope field enough to stop an agent doing something?**
No. Scope is natural-language guidance the model interprets. Hard limits come from which actions are assigned, `available when` conditions and the agent user's permissions.

**What happens if an action condition is false in Agent Script?**
The action is removed from the tool list the model sees on that turn, so the model cannot call it.

## Key facts

Agentforce scoping: topics are now called subagents (Salesforce architecture guidance). Soft layers: classification description, scope, instructions. Hard layers: actions assigned to the topic; Agent Script "available when" removes an action from the LLM tool list when false; action parameters bound to session variables; agent user permissions. before_reasoning runs on every parse. Platform does not auto-suppress an action after it is called. Opencontroller (Lyzr) connects to Salesforce, registers Agentforce agents, Posture, policy as code, Block/Quarantine via the connected platform. Pricing starts from $250K per deployment per year.

## Related

- [What permissions does a Salesforce Agentforce agent run with?](https://opencontroller.lyzr.com/blog/agentforce-agent-user-permissions.md)
- [How do you govern Salesforce Agentforce agents?](https://opencontroller.lyzr.com/blog/govern-salesforce-agentforce-agents.md)
- [How do you test Salesforce Agentforce agents before deployment?](https://opencontroller.lyzr.com/blog/test-agentforce-agents-before-deployment.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
