Hi All,
I'm working on an employee agent that is being built through agentforce script.
Our org bought the Agentforce Sales Add on product from salesforce that doesn't consume flex credits as this is per user per license type based. Once a user is tagged with this license and system permission the user-context employee agent actions doesn't consume any flex credits.
https://help.salesforce.com/s/articleView?id=ai.generative_ai_usage_unmetered_considerations.htm&type=5
Now when I try to build sub agents and actions in agentforce script and test them in preview mode, this testing is consuming flex credit. Ideally it should not since the testing is being done in user-context and not system context.
Here is my analysis so far:
For an employee agent built through traditional agent method:
-No credits are being consumed when using it in UI and testing mode.
For an employee agent built through new agent script method:
-No credits are being consumed when using it in UI but credits are being consumed when using it in preview mode.
As agent force developers, we cannot pause or limit the usage of agent script testing preview mode as this is key tool to debug agent plan while building agents.
I'm looking if anyone has experienced this issue of flex credits consumption when using agent script preview mode or have any insights on how to resolve this or any documentation/known issue around this?
Thank you in advance!
#Agentforce #Salesforce Developer #Salesforcecommunity
Hi @Gowtham V,
Great analysis - what you’re seeing is expected.
The unmetered (per-user) benefit in Agentforce applies to UI/runtime usage, but Agent Script preview mode is treated as a dev/debug execution, which still consumes flex credits.
So:
• UI usage -> no credits
• Preview mode -> credits consumed
It’s not well documented, but this behavior is known. I'd suggest minimizing preview runs and raising a support case - this is a valid gap, especially since preview is essential for development.
If you find this helpful feel free to mark it as Best Answer !!!! 😊
Thanks and Regards.