Skip to main content
Stephen BELL が「#Agentforce」で質問

Hi everyone,

I'm encountering an issue where an Employee Service Agent fails during session initialization in Live Preview, but only after committing a version that includes an Apex Invocable Action.

Here is the exact setup and breakdown of the behavior:

Context & Setup

  • Agent Type: AgentforceEmployeeAgent (running under System Admin context).
  • Action: @InvocableMethod Apex Class (also tested with a minimal dummy Apex Class).

Steps to Reproduce

  1. Create agent backbone with 0 actions. Commit version and test in Live Preview -> Works fine (200 OK).
  2. Add an Invocable Apex Action to a Subagent. Test in Draft Live Preview -> Works fine.
  3. Commit the version (Popup confirms successful commit).
  4. Refresh/re-open Live Preview on the Committed Version -> Session fails to initialize with a generic UI error "Something went wrong".

Error Log (Network Tab): The request to https://api.salesforce.com/einstein/ai-agent/v1/agents/{AgentId}/sessions returns a 500 Internal Server Error, containing the root exception:

{    "status": 500,    "path": "v6.0.0/agents/{AgentId}/sessions",    "mode": "preview",    "requestId": "7c375608-b352-48d1-8895-dd65dbcb1874",    "error": "AgentApiException",    "message": "Internal Server Error: org.springframework.web.reactive.function.client.WebClientResponseException$UnprocessableEntity: 422 Unprocessable Entity from POST https://api.salesforce.com:9443/einstein/copilot/v1/planner/{PlannerId}/sessions",    "timestamp": 1785923824404,    "expected": false,    "details": null}

Key Isolation Observations

  • Scratch Org Test: Deployed the same Apex class and Agent metadata to a Scratch Org -> It works 100% fine on Committed versions.
  • Org-Specific Issue: On the affected Org, creating a brand new dummy Apex Action and a brand new Agent still reproduces the 422 error as soon as any action is attached to a committed version.
  • Permissions: Running as System Admin with API Enabled and Agentforce User permissions.

Has anyone encountered this issue where the GenAiPlanner fails to resolve action schemas specifically on Committed versions for a particular Org? Is there a way to flush/force-sync the Einstein Planner Engine cache?

Thanks for any insights!

 

  

 

#Agentforce

5 件の回答
  1. 8月31日 13:18

    Did you get any update from Salesforce Support?  

    I'm getting the same error when trying to commit an agent with a single Web Search Action 

     

     { 

        "status": 500, 

        "path": "v6.0.0/agents/0Xxdh0000005Zd3CAE/sessions", 

        "mode": "preview", 

        "requestId": "8a527383-34b9-493d-ab28-1386c0620471", 

        "error": "AgentApiException", 

        "message": "Internal Server Error: org.springframework.web.reactive.function.client.WebClientResponseException$UnprocessableEntity: 422 Unprocessable Entity from POST

    https://api.salesforce.com:9443/einstein/copilot/v1/planner/16jdh000000MKo5/sessions

    ", 

        "timestamp": 1788181840163, 

        "expected": false, 

        "details": null 

     

     

0/9000