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.
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 documentation.
The following comparison table details the primary operational limits governing Agentforce deployments:
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.
Related guides
- Custom GPT Token Limit: Instruction Limits, Context Windows, and RetrievalThe Custom GPT token limit refers to the 8,000-character constraint on configuration instructions and the dynamic...
- Ollama Max Tokens: Setting Generation Limits and Context BudgetsIn Ollama, setting generation limits requires configuring the num_predict parameter, which sets the maximum number of...
- HTTP 413 Request Entity Too Large: Causes, Server Limits & WorkaroundsAn HTTP 413 request entity too large error occurs when a client payload exceeds buffer limits configured on a web...
- ChatGPT Deep Research Limits: Plan Quotas, Reset Rules, and Workspace SolutionsChatGPT Deep Research limits restrict autonomous research tasks through plan-based quotas, rolling 30-day reset cycles,...
- OneDrive Agent: Connecting AI Agents to OneDrive File StorageAn OneDrive agent connects autonomous AI models to cloud file storage, allowing systems like Claude and Cursor to...
- Amazon SNS Message Size Limit: 256 KB Payload Caps, Protocols, and Large PayloadsThe Amazon SNS message size limit is a default quota of 256 KB (262,144 bytes) across message bodies and attributes....
More on this subject: AI Agents: General Guides (172 guides)
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:
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.
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:
- 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.
- 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.
- 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.
Bypass Agentforce limits with external enterprise knowledge workspaces
Connect your agents to Fast.io workspaces through our remote MCP server. Store, index, and retrieve enterprise documentation without hitting native Agentforce limits or CRM storage caps. Every organization starts with a 14-day free trial, which requires a credit card. Plans are Starter at $29/mo, Business at $99/mo, and Enterprise at $299/mo.
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.
In this decoupled pattern:
- Reference documents, technical specifications, legal contracts, and media assets reside in an external intelligent workspace.
- The external workspace indexes the documents automatically, handling text extraction, semantic embeddings, and hybrid retrieval.
- 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.
- 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 and developer pricing plans to inspect tool configurations, or consult agent onboarding guidelines 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). 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.
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:
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:
- 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.
- The AI Usage Data Model: For programmatic monitoring, Salesforce exposes the
AiAgentGenerativeAiUsageData 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.
Sources
References used to verify factual claims in this guide.
- 1 Salesforce Help: Considerations and Limits for Agentforce and Generative AI in Salesforce Suites Accessed
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 Data Cloud caps unstructured document files at 100 MB for vectorization, preventing larger files from being chunked for search indexes.
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.
Related Resources
Bypass Agentforce limits with external enterprise knowledge workspaces
Connect your agents to Fast.io workspaces through our remote MCP server. Store, index, and retrieve enterprise documentation without hitting native Agentforce limits or CRM storage caps. Every organization starts with a 14-day free trial, which requires a credit card. Plans are Starter at $29/mo, Business at $99/mo, and Enterprise at $299/mo.