# Salesforce Agentforce Limits: Tokens, Context Windows, and Grounding File Caps

Agentforce limits establish operational boundaries for autonomous AI across Salesforce, including a 1.5 million hourly token threshold in Salesforce Suites, a single action token cap, and a 100 MB document ceiling for Data Cloud vectorization. When knowledge bases exceed these native context and file limits, responses pause and storage costs rise. Learn how to monitor usage and design resilient architectures using external workspaces.

Source: https://fast.io/resources/agentforce-limits/
Author: [Derek Labian](https://fast.io/authors/derek-labian/)
Last reviewed: 2026-09-27

## What Are Salesforce Agentforce Limits? Tokens, Rates, and Sessions

As of September 2026, Salesforce limits generative AI in Salesforce Suites to 1.5 million tokens per hour and 27 million tokens per month, pausing agent responses until the next cycle if exceeded.

Agentforce limits are the operational thresholds set by Salesforce covering prompt token lengths, action execution rates, concurrent bot sessions, and Data Cloud grounding document uploads.

Deploying autonomous agents within an enterprise customer relationship management system introduces resource governance challenges that traditional database transactions never faced. In standard relational workflows, execution boundaries revolve around database query rows, CPU timeout limits, and memory heap ceilings. Generative agent architectures alter this equation. When an agent plans multi-step actions, evaluates user intent, invokes Apex logic, and retrieves unstructured documentation to ground its responses, it draws upon shared computational pipelines and third-party large language models. Without strict operational boundaries, an unconstrained agent reasoning loop could consume millions of tokens in minutes, run up enormous infrastructure bills, or degrade platform responsiveness for neighboring tenant organizations.

Salesforce enforces multi-tenant boundaries through the Einstein Trust Layer and the Agentforce runtime engine. These boundaries operate at four distinct tiers: hourly and monthly organizational token allowances, individual action payload caps, API call request rates, and Data Cloud unstructured storage limits. The complete rules are detailed in the official [Salesforce Generative AI Considerations](https://help.salesforce.com/s/articleView?id=xcloud.suites_agentforce_considerations.htm&language=en_US&type=5) documentation.

The following comparison table details the primary operational limits governing Agentforce deployments:

| Constraint Category | Baseline Operational Limit | Architecture Layer | Scope and Impact |
| :--- | :--- | :--- | :--- |
| **Salesforce Suites Hourly Token Cap** | 1.5 million tokens per hour | LLM Gateway | Responses pause when reached; auto-resumes next hour |
| **Salesforce Suites Monthly Token Cap** | 27 million tokens per month | LLM Gateway | Responses pause when reached; auto-resumes next month |
| **Single Action Prompt Payload** | 10,000 tokens per action | Agentforce Runtime | Prompts exceeding 10,000 tokens meter as multiple actions |
| **Prompt Builder Token Chunking** | 2,000 tokens per unit | Billing & Metering | Usage rounds up in 2,000-token increments |
| **Models API Generation Rate** | 2,000 requests per minute | REST API / Apex | Org-wide ceiling across production endpoints |
| **Models API Embeddings Rate** | 1,000 requests per minute | REST API / Apex | Org-wide ceiling for vector generation |
| **Apex Sandbox Execution** | 500 requests per hour | Sandbox Environment | Lower threshold for testing non-production Apex agents |
| **Data Cloud Document Vectorization** | 100 MB per file | Data Cloud Ingestion | Files over 100 MB are not chunked or vectorized |
| **Data Cloud Plain Text Vectorization** | 4 MB per file | Data Cloud Ingestion | Files over 4 MB are not chunked or vectorized |
| **Enriched Index Daily Ingestion** | 3 GB per day | Search Index Pipeline | Maximum volume of unstructured data processed daily |

Understanding how these layers intersect prevents production outages. When an organization exceeds its token allocation in Salesforce Suites, the system does not silently bill overages by default; it halts agent conversational output until the next hourly or monthly reset window opens. For mission-critical customer support or sales routing, hitting an unmonitored threshold translates directly into stalled customer conversations.

## Why Prompt Builder Token Caps Constrain Agent Actions

Within the Agentforce execution lifecycle, Prompt Builder serves as the template engine that constructs inputs for the underlying model. Prompt templates combine static system directives, dynamic CRM field values, conversation history, and retrieved grounding data into a single payload. While modern foundation models support context windows exceeding one hundred thousand tokens, Salesforce imposes strict constraints on prompt template size and execution parameters.

### The Single Action Token Ceiling

The most critical execution constraint in Agentforce is the token limit enforced on each individual agent action. When an agent decides to invoke an action, whether that action is an Apex method, an autolaunched Flow, or a secondary prompt template, the input and output payload must fit within this boundary.

If an agent action attempts to process a payload that exceeds the single action token ceiling, the Agentforce runtime splits or re-meters the invocation across multiple discrete actions. In configurations where actions incur consumption fees, this behavior causes credit consumption to multiply unexpectedly. In rigid template execution contexts, exceeding the token ceiling produces a runtime error, terminating the agent step prematurely.

### Token Metering and Rounding Increments

Salesforce meters generative AI consumption in distinct token blocks. Token usage does not scale on a strictly linear per-token tariff. Instead, input context tokens and output completion tokens are combined and rounded up to the nearest block boundary.

Prompts that expand beyond a single metering increment round up to the next block boundary, incurring multiple billed prompt units for a single run. Because every additional boundary crossing incurs an additional unit of consumption, inefficient prompt design rapidly depletes organizational allowances.

### Flex Credits and Consumption Billing

Beyond base suite allowances, enterprise Agentforce deployments use Flex Credits to meter custom actions and autonomous conversations. Standard conversational agents typically consume credits per conversation session, while autonomous background actions consume credits based on operational complexity.

When planning Agentforce architectures, developers must track not only the total token count of the underlying foundation model, but also the ancillary overhead introduced by the Einstein Trust Layer. Before a prompt reaches the model, the Trust Layer runs masking algorithms to detect and replace Personally Identifiable Information (PII) such as Social Security numbers, credit card details, and email addresses. The pseudonymization tokens inserted by the Trust Layer often carry longer character lengths than the original raw values, expanding prompt token volume. When a prompt sits close to the action boundary, PII masking expansion can trigger a prompt size limit exception.

### Programmatic Error Handling for Models API

When developers invoke foundation models directly from Apex or custom integration pipelines, they must handle rate limits programmatically. In production organizations, the Models API enforces a fixed requests-per-minute ceiling on generation endpoints, returning an HTTP 429 status code when client applications transmit requests too quickly.

The following Apex implementation demonstrates how to handle Models API callouts with payload truncation and exponential backoff:

```java
public class AgentforceModelClient {
    private static final Integer MAX_ACTION_TOKENS = 10000;
    private static final Integer MAX_RETRIES = 3;
    private static final Integer INITIAL_BACKOFF_MS = 1000;
    // Enforce defensive payload boundary before network dispatch
    public static String invokeModelWithBackoff(String promptPayload) {
        String sanitizedPayload = enforceTokenSafetyMargin(promptPayload, MAX_ACTION_TOKENS);
        Integer attempts = 0;
        Integer backoffMs = INITIAL_BACKOFF_MS;
        while (attempts < MAX_RETRIES) {
            try {
                HttpRequest req = new HttpRequest();
                req.setEndpoint('callout:Salesforce_Models_API/v1/generations');
                req.setMethod('POST');
                req.setHeader('Content-Type', 'application/json');
                req.setBody(JSON.serialize(new Map<String, Object>{
                    'prompt' => sanitizedPayload,
                    'temperature' => 0.2
                }));
                Http http = new Http();
                HttpResponse res = http.send(req);
                if (res.getStatusCode() == 200) {
                    return res.getBody();
                } else if (res.getStatusCode() == 429) {
                    attempts++;
                    if (attempts >= MAX_RETRIES) {
                        throw new CalloutException('Agentforce Models API rate limit exceeded after retries.');
                    }
                    sleep(backoffMs);
                    backoffMs *= 2;
                } else {
                    throw new CalloutException('Models API returned HTTP error: ' + res.getStatusCode() + ' ' + res.getBody());
                }
            } catch (System.LimitException le) {
                throw new AuraHandledException('Apex governor limit reached during model invocation: ' + le.getMessage());
            }
        }
        return null;
    }
    // Heuristic approximation: 1 token roughly equals 4 characters in English text
    private static String enforceTokenSafetyMargin(String input, Integer maxTokens) {
        Integer maxCharacters = maxTokens * 4;
        if (input != null && input.length() > maxCharacters) {
            return input.substring(0, maxCharacters);
        }
        return input;
    }
    // Spin-wait loop simulating delay for Apex callout retry orchestration
    private static void sleep(Integer milliseconds) {
        Long startTime = DateTime.now().getTime();
        while (DateTime.now().getTime() - startTime < milliseconds) {
        }
    }
}
```

## How Data Cloud Enforces Grounding File Upload Limits

Grounding is the process of supplying enterprise knowledge to an AI model so its responses reflect company-specific data rather than generic web training. Within Salesforce, grounding occurs primarily through Data Cloud (formerly Customer 360). Data Cloud ingests unstructured documents, parses their textual contents, breaks them into semantic chunks, and creates vector embeddings stored in search indexes. Architectural boundaries for this pipeline are documented in Salesforce's [Data Cloud Limits and Guidelines](https://help.salesforce.com/s/articleView?language=en_US&id=sf.c360_a_limits_and_guidelines.htm).

While this pipeline enables Agentforce to answer questions based on product manuals, policy guides, and knowledge articles, it operates under strict file size and throughput ceilings.

### Unstructured File Caps for Vectorization

Salesforce Data Cloud caps unstructured document files at 100 MB for vectorization, preventing larger files from being chunked for search indexes.

When administrators upload files into Data Cloud through Amazon S3 connectors, Google Cloud Storage, Microsoft Azure blobs, or direct Salesforce File links, the ingestion engine categorizes them into Unstructured Data Lake Objects (UDLOs) and Unstructured Data Model Objects (UDMOs). However, ingestion does not equate to AI usability.

The platform enforces strict ceilings based on file format:

- **Document Formats (PDF, DOCX, PPTX, XLSX, RTF, CSV, XML, Email):** The vectorization ceiling stops processing for oversized files. Documents exceeding the platform threshold successfully land in the raw data lake, but the vector indexing pipeline completely skips them. They are not chunked, vectorized, or surfaced in vector search indexes.
- **Plain Text and HTML Formats (TXT, HTML):** Plain text and HTML documents face a lower size threshold, preventing large raw markup pages from being vectorized. Text documents exceeding the platform threshold are omitted from index generation.
- **Audio and Video Files:** Audio and video assets face media size limits and duration caps that restrict lengthy recordings from direct processing.
- **Image Files:** Visual documents processed through optical character recognition face strict resolution and storage boundaries.

These caps create immediate roadblocks for enterprise knowledge bases. Comprehensive technical manuals, architectural engineering packages, clinical trial dossiers, and archived financial reports routinely exceed native vectorization boundaries. When an administrator uploads an oversized technical catalog, Data Cloud indicates successful ingestion into the storage object, yet Agentforce fails to recall any facts from that document because the vectorizer silently bypassed it.

### Search Index Throughput and Ingestion Ceilings

In addition to per-file size boundaries, Data Cloud restricts the volume of data that can be processed into an enriched vector search index:

1. **Daily Ingestion Limit:** Data Cloud restricts the daily volume of unstructured data processed into an enriched index. For enterprises migrating legacy file shares into Data Cloud, daily ingestion limits require a staggered rollout spanning multiple business days.
2. **Processing Latency:** Enriched vector indexing requires up to a full day to complete for standard datasets. Smaller datasets generally process within a couple of hours, but indexing is never instantaneous.
3. **Search Query Caps:** When Agentforce queries a search index during an interaction, vector search queries and hybrid search queries enforce strict caps on total returned records.

### The Financial Cost of Native Grounding Storage

Beyond technical size boundaries, storing massive document libraries natively within Salesforce introduces steep financial overhead. In standard Salesforce CRM, expanding file storage beyond baseline allocations requires purchasing additional storage capacity, which costs hundreds of dollars per gigabyte annually.

In Data Cloud, processing unstructured documents consumes "Unstructured Data Processed" usage credits based on the byte volume ingested. Crucially, rebuilding a search index to adjust chunking parameters or update vector configurations reprocesses all existing files, consuming usage credits a second time. Maintaining an evolving multi-terabyte document library directly inside Data Cloud becomes an expensive recurring commitment.

## How to Design Architectures Around Agentforce Limits

To avoid hitting token ceilings, vectorization caps, and escalating CRM storage fees, enterprise architects separate transactional CRM records from unstructured document intelligence.

Rather than forcing multi-gigabyte document corpora directly into Data Cloud, high-volume implementations use an external retrieval repository accessible to AI agents via open protocols.

### The External Knowledge Repository Pattern via MCP

The Model Context Protocol (MCP) provides an open standard for connecting AI agents to external tools and data sources. Instead of attempting to cram large enterprise documents into Salesforce Prompt Builder templates or paying Data Cloud ingestion tariffs on hundreds of gigabytes of reference manuals, architects connect their agents to an external workspace layer like [Fast.io for agents](/storage-for-agents/).

In this decoupled pattern:
1. Reference documents, technical specifications, legal contracts, and media assets reside in an external intelligent workspace.
2. The external workspace indexes the documents automatically, handling text extraction, semantic embeddings, and hybrid retrieval.
3. When an Agentforce agent or orchestration layer requires grounding context, it queries the workspace through an MCP server rather than loading entire raw files into prompt context.
4. Only the precise, relevant paragraphs and cited passages return to the agent, keeping the prompt well below the single action token limit.

Developers can review [Fast.io storage for agents](/storage-for-agents/) and [developer pricing plans](/pricing/) to inspect tool configurations, or consult [agent onboarding guidelines](https://fast.io/llms.txt) for programmatic discovery.

### How Fast.io Solves Large-Scale Enterprise Grounding

Fast.io serves as an intelligent cloud workspace platform purpose-built for human teams and AI agents. It addresses the exact technical pain points that make native Salesforce document grounding difficult.

First, Fast.io handles massive files and deep folder hierarchies without the vectorization caps imposed by Data Cloud. Workspaces support chunked uploads for large technical manuals, high-resolution media, and extensive document archives without per-file chunking penalties.

Second, Fast.io includes native Intelligence Mode. When Intelligence is enabled on a workspace, incoming files are automatically parsed and indexed for hybrid search, which blends full-text search, semantic vector retrieval, and structured metadata matching. There is no need to configure separate vector databases, manage embedding models, or pay ingestion penalties when updating content. When an agent queries a workspace, the system returns targeted semantic passages accompanied by exact document citations.

Third, Fast.io provides a remote Model Context Protocol server operating over Streamable HTTP at `https://mcp.fast.io/mcp/tools`. Agents authenticate using a scoped API key passed via standard headers. The MCP server exposes a consolidated toolset that allows agents to search workspaces, read specific file excerpts, list folder structures, acquire advisory file locks, and transfer file outputs.

Fourth, Fast.io includes Metadata Views (accessible at [Metadata Views](/product/document-data-extraction/)). Metadata Views convert unstructured documents into queryable, typed spreadsheets using natural language schema definitions. AI automatically extracts dates, counterparty names, totals, and classification tags from PDFs, Word documents, scanned pages, and images without manual template rules. Agents can query these structured views directly via MCP, eliminating the need to parse raw files inside Prompt Builder.

Fifth, Fast.io simplifies cloud data consolidation. With URL Import, teams pull files directly from Google Drive, Dropbox, Box, and OneDrive into a workspace without local bandwidth consumption. Furthermore, Cloud Sync provides scheduled or on-demand one-way and two-way synchronization for Google Drive, Dropbox, Box, and OneDrive (including SharePoint libraries via the OneDrive connector), ensuring an agent's grounding corpus stays aligned with company drives. Review available subscription options on the [Fast.io pricing page](/pricing/).

### Comparing Native Salesforce Ingestion Against External MCP Workspaces

The following architectural comparison highlights the operational tradeoffs between relying exclusively on native Salesforce Data Cloud versus integrating an external Fast.io workspace layer:

| Evaluation Dimension | Native Salesforce Data Cloud | External Fast.io Workspace via MCP |
| :--- | :--- | :--- |
| **Maximum Vectorized File Size** | 100 MB (PDF/Office), 4 MB (TXT/HTML) | Full workspace capacity; no 100 MB chunking ceiling |
| **Daily Ingestion Ceilings** | 3 GB per day for enriched indexes | No daily ingestion throttle on standard uploads |
| **Search Index Rebuild Cost** | Reprocesses all files; consumes usage credits | Re-indexing included in workspace intelligence |
| **Agent Connectivity Standard** | Proprietary Salesforce Data Cloud Connectors | Open Model Context Protocol (Streamable HTTP /mcp) |
| **Structured Field Extraction** | Requires custom flows and data transforms | Built-in Metadata Views for automatic schema extraction |
| **Multi-Agent Interoperability** | Restricted to Salesforce ecosystem agents | Accessible by Salesforce, Claude, GPT, or custom LLMs |
| **File Versioning & Audit Logs** | Separate ContentVersion records and storage tiers | Per-file version history and append-only audit trail |

By decoupling knowledge storage from Salesforce execution, organizations keep their CRM lightweight and fast while granting Agentforce agents access to a searchable corporate library.

## How to Monitor Consumption and Handle Rate Limit Errors in Production

Maintaining operational stability with Agentforce requires proactive monitoring and resilient error recovery patterns. Because token limits and API request throttles apply at the organization level, an unmonitored surge in activity can pause customer-facing agents during peak business hours.

### Real-Time Tracking with Digital Wallet and Usage DMOs

Salesforce provides two primary mechanisms for observing AI consumption:

1. **Salesforce Digital Wallet:** Administrators can access the Digital Wallet interface within Salesforce Setup to review near real-time consumption trends across active contracts. The Digital Wallet tracks token usage, Flex Credit consumption, and Data Cloud processing metrics, allowing teams to identify consumption spikes before monthly limits expire.
2. **The AI Usage Data Model:** For programmatic monitoring, Salesforce exposes the `AiAgentGenerativeAiUsage` Data Model Object (DMO). System administrators can build custom CRM reports, Tableau dashboards, or automated flow alerts that query this object daily. By tracking token consumption per agent, per user, and per action, engineering teams can pinpoint inefficient prompt templates and optimize them before they cause rate limit pauses.

### Graceful Degradation and Circuit Breakers

When designing customer-facing Agentforce agents, architects should implement circuit breakers to handle token exhaustion gracefully. If an organization reaches its hourly token threshold in Salesforce Suites, the platform temporarily suspends agent responses until the next hour begins.

A resilient architecture anticipates this scenario:
- **Channel Fallback:** When the Agentforce runtime signals a limit pause, routing logic should immediately divert incoming web chat or messaging traffic to human support queues or interactive voice response (IVR) flows rather than leaving customer inquiries unacknowledged.
- **Cached Summary Responses:** For common queries, integration layers can serve pre-computed answers from an external cache or workspace rather than triggering a live LLM generation call.
- **Payload Budgeting:** Developers should implement defensive limits in Apex controllers, restricting grounding text retrieval to concise summary excerpts per call. Capping input tokens ensures that unexpected conversation depth does not prematurely exhaust hourly budgets.

### Pre-Deployment Architecture Checklist

Before promoting an Agentforce agent from a sandbox environment to production, verify the following configuration points:

- [ ] Confirm all action payloads stay well below the single action token ceiling, accounting for potential PII masking character expansion.
- [ ] Audit all grounding documents intended for Data Cloud to ensure no PDF or Office document exceeds the 100 MB vectorization threshold.
- [ ] Configure rate limit retries with exponential backoff on all custom Apex callouts to the Models API.
- [ ] Set up threshold notifications in the Salesforce Digital Wallet to alert administrators when token usage reaches high capacity thresholds.
- [ ] Establish an external workspace via MCP for enterprise documentation libraries that exceed Data Cloud daily ingestion limits or budget constraints.

Following this architectural framework ensures that your autonomous agents remain responsive, grounded in accurate corporate knowledge, and cost-effective across enterprise production workloads.

## Frequently asked questions

### What are the primary limits of Salesforce Agentforce?

Salesforce Agentforce enforces operational limits across tokens, execution rates, and grounding storage. In Salesforce Suites, generative AI features are capped at 1.5 million tokens per hour and 27 million tokens per month. Individual agent actions are limited to 10,000 tokens per payload, while the Models API enforces a production rate limit of 2,000 requests per minute per org. Grounding in Data Cloud restricts vectorization to document files under 100 MB and plain text files under 4 MB.

### How does Agentforce meter token usage and prompt sizes?

Agentforce meters prompt usage in 2,000-token blocks. Both input context tokens and output completion tokens are combined and rounded up to the nearest 2,000-token increment. For example, a total prompt payload of 4,200 tokens is metered as 6,000 tokens, which counts as three discrete prompt units. Individual actions that exceed 10,000 tokens are split or metered as multiple actions, consuming additional Flex Credits.

### What happens when an agent hits the hourly or monthly token limits?

When an organization reaches either the 1.5 million hourly token cap or the 27 million monthly token cap in Salesforce Suites, agent responses temporarily pause. Conversational generation automatically resumes at the beginning of the next hourly or monthly billing cycle. Organizations requiring higher operational throughput must contact their Salesforce account executive to request an allocation increase.

### What is the file upload limit for grounding Agentforce in Data Cloud?

In Salesforce Data Cloud, document formats such as PDF, Word, Excel, and PowerPoint have a maximum file size limit of 100 MB for vectorization, preventing larger files from being chunked for search indexes. Files exceeding this ceiling remain in raw storage objects without being indexed. Plain text and HTML files face an even smaller size threshold, while daily ingestion into enriched indexes is strictly governed.

### How can architects ground Agentforce agents in documents without hitting Salesforce file limits?

Architects can decouple large document storage from Salesforce by maintaining reference knowledge in an external intelligent workspace like Fast.io. Documents in the workspace are automatically indexed for hybrid search and queried on demand via the Model Context Protocol (MCP). Agents retrieve only relevant excerpts rather than loading entire raw files, bypassing Data Cloud's 100 MB file cap and staying safely under Prompt Builder's 10,000-token action ceiling.

## Sources

- [Salesforce Help: Considerations and Limits for Agentforce and Generative AI in Salesforce Suites](https://help.salesforce.com/s/articleView?id=xcloud.suites_agentforce_considerations.htm&language=en_US&type=5): Salesforce limits generative AI in Salesforce Suites to 1.5 million tokens per hour and 27 million tokens per month, pausing agent responses until the next cycle if exceeded.
- [Salesforce Help: Data 360 Limits and Guidelines](https://help.salesforce.com/s/articleView?language=en_US&id=sf.c360_a_limits_and_guidelines.htm): Salesforce Data Cloud caps unstructured document files at 100 MB for vectorization, preventing larger files from being chunked for search indexes.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli. MCP setup is at https://mcp.fast.io/docs: Claude and most MCP clients connect to https://mcp.fast.io/mcp/tools, ChatGPT to https://mcp.fast.io/mcp/operations, and coding agents to https://mcp.fast.io/mcp/code.
