Flow run context within agent action execution
Key Takeaway
The agent's execution context sets the running user, which is the user a flow runs as. The flow's run context decides how much of that user's access the flow enforces. Most Service agent conversations run as the agent user, not the customer.
When an Agentforce agent action runs a flow, two security settings work together to decide what data the flow can see and change: the agent's execution context and the flow's run context. Getting both right keeps actions working and keeps customers away from records that aren't theirs.
Who the flow runs as
The agent's execution context sets the running user, and the running user depends on the agent type.
| Running user | |
|---|---|
| Employee agents | The logged-in employee |
| Lead Nurturing agents | The EinsteinSDRAgent User. Agent setup creates this user and gives it system-level permissions. |
| Service agents without credential-based user verification | The agent user (EinsteinServiceAgent User) |
| Service agents with credential-based user verification turned on | The logged-in site user |
Credential-based user verification is available only for Service agents deployed to Experience Cloud sites through Enhanced Chat, so most Service agent conversations run as the agent user.