Too much context
Reduce HistoryTurnLimit__c, review context provider size, and keep prompts tighter.
When the framework behaves unexpectedly, the fastest path is usually not “inspect the prompt more.” It is to debug in the same order the runtime itself works.
Most issues fall into one of these buckets:
When a request fails or behaves strangely, ask these questions in order:
This order matters because it avoids blaming the model for failures that happened before the model ever had a chance to behave.
Check these first:
LLMConfiguration__c record is active and points to the expected adapter.AIAgentDefinition__c record is active and bound to that configuration.If nothing reaches the provider, the issue is almost never prompt quality. It is usually deployment, credentials, activation state, or entrypoint configuration.
Symptoms usually include missing fields, empty results, or explicit permission-denied errors.
Check:
These failures often look like “the AI gave a weak answer,” when the real problem is that the runtime could not legally see or change the data it needed.
The most common causes are configuration quality, not model instability.
Make sure the capability description says:
Validate that:
If the wrong tool is selected repeatedly, inspect the capability design before rewriting prompts. Most tool-choice issues are caused by overlap, vague descriptions, or loose schemas.
If updates, emails, or external callouts happen without the expected review:
HITLMode__c on the capability.ConfirmationThenApproval, verify the capability is not asynchronous and the agent is conversational.This is why ExecutionStep__c matters so much. It tells you whether the runtime skipped the control,
whether the wrong capability fired, or whether the configuration never actually expressed the control
you thought it did.
Too much context
Reduce HistoryTurnLimit__c, review context provider size, and keep prompts tighter.
Too many capabilities
Narrow the tool set. Broad tool menus make model selection slower and less predictable.
Illegal callout path
Custom code that performs DML before callout can break runtime assumptions. Review custom actions and service-user routing.
Async routing issues
Review dispatch settings and whether a heavy tool should be asynchronous instead of inline.
Slow behavior is often cumulative rather than singular. A runtime may become sluggish because it is carrying too much history, exposing too many tools, and doing too much in one transaction at the same time.
If the agent appears to forget prior turns:
MemoryStrategy__c and HistoryTurnLimit__cInteractionSession__c is being reused where expectedExecutionStep__c rows to confirm user and assistant steps are being writtenIf continuity is broken only on one entry surface, the problem is often in route resolution, message persistence, or caller-supplied session context rather than in the LLM prompt itself.
That distinction matters. A bad answer and a broken session are not the same failure, even if the user experiences both as “the agent forgot.”
| Record or metadata | Why it helps |
|---|---|
AgentExecution__c | Status, channel, strategy, and top-level execution state |
ExecutionStep__c | Detailed trace of prompts, tool calls, results, and failures |
InteractionSession__c | Durable continuity anchor across turns |
InteractionMessage__c | Transport-level message history |
AgentCapability__c | Tool description, schema, HITL mode, and exposure |
If you need a repeatable workflow, use this:
AgentExecution__c to confirm the request reached the expected runtime path.ExecutionStep__c to see whether the model replied directly, called a tool, or failed mid-turn.Gather:
AgentExecution__c and ExecutionStep__c recordsThe more you can describe the failure as a runtime path rather than a vague symptom, the faster it can be diagnosed.