Hi everyone,
I’m trying to enable file upload and file processing in an Agentforce Service Agent, but I’m unable to get it working.
Setup
- I have created a Service Agent using Agent Script.
- I have configured the agent based on Salesforce’s documentation for file uploads: Configure File Uploads for Agentforce
- I have also tried creating a separate sub-agent specifically for handling uploaded files, but the behavior is the same.
Issue
Whenever I upload a file during the conversation, the agent responds with:
The file upload itself appears to happen, but the Agentforce agent is not able to process or access the uploaded file.
What I have tried
- Followed the configuration described in the Salesforce documentation.
- Created a separate sub-agent to handle file processing.
- Tested with different files, but the result is the same.
- Verified that the Agentforce agent itself is working correctly for normal text-based requests.
Question
Has anyone encountered this issue with an Agentforce Service Agent built using Agent Script?
Are there any additional configurations, permissions, actions, or Agent Script settings required to allow the agent to access and process uploaded files?
I would particularly like to understand how Agentforce handles the uploaded file internally and what configuration is required for the file to become available to the agent/sub-agent.
Any guidance on troubleshooting this would be greatly appreciated.
Thanks!
#Trailhead Support #Agentforce
Uploads succeeding while the agent can't access the file content almost always comes down to the file_upload sub-block in your Agent Script's config block, not the file upload configuration in Setup. That "Configure File Uploads for Agentforce" doc you followed handles enabling uploads at the org/channel level, but Agent Script has its own separate setting that controls whether an uploaded file is actually handed to the reasoning engine.
In the config block, file_upload.mode must be set explicitly. "auto" is the default handling where uploaded files are made available to the agent automatically. "managed" gives you fine-grained control over which files reach which subagent, but it requires you to explicitly pass @system_variables.uploaded_files (optionally sliced, like @system_variables.uploaded_files[0:5]) into that subagent's action inputs; "disabled" and "error" both reject uploads outright. Since you built a separate sub-agent specifically to handle the uploaded file, this is the most likely gap: creating the sub-agent alone does not wire the file to it. If file_upload.mode is "managed" (or missing/defaulting in a way that behaves like it), the sub-agent needs an explicit input binding to @system_variables.uploaded_files or it will never see the file, even though the upload itself succeeded.
Worth checking: open your Agent Script source and look for a config.file_upload block. If it is absent, add mode: "auto" as the simplest fix so uploads are available agent-wide without extra wiring. If you specifically need per-subagent control, keep "managed" but add the explicit uploaded_files input binding on the file-handling sub-agent's action.
Docs: Agent Script Blocks, File Upload Sub-Block -
https://developer.salesforce.com/docs/ai/agentforce/guide/ascript-blocks.html#file-upload-sub-block ; Configure File Uploads for Agentforce - https://help.salesforce.com/s/articleView?id=ai.agent_file_upload_configure.htm&type=5Assumption: I don't have visibility into your actual Agent Script source, so I can't confirm which file_upload mode (or absence of the block) is currently set. This diagnosis is based on the documented behavior of the file_upload sub-block and the fact that a manually created sub-agent needs an explicit uploaded_files binding under "managed" mode.