LLM workflow orchestration should let a model propose a suitable next action while application code enforces what may actually happen. Function calling does not establish permission or prove that an action succeeded. Design the business process around verified states and explicit boundaries.
Map the process before exposing tools
Take one workflow, such as preparing a customer support update. Separate reading a record, drafting a response, changing a case and sending a message. Each action needs a defined user permission, allowed input, expected result and failure response.
Anthropic's tool-use documentation distinguishes structured client-tool calls from the application code that executes them. That separation is useful for function calling safeguards: a proposed call must still pass deterministic validation and authorization.
Prefer narrowly defined operations to a general tool that can edit any record or call any destination. Tool permission boundaries should be meaningful even if the model misunderstands a request or reads malicious instructions in external content.
Put approval at consequential steps
Identify actions that communicate externally, create commitments or change important records. Prepare a reviewable draft or change summary first, then obtain the required business authorization before execution.
OWASP's Excessive Agency guidance identifies excessive functionality, permissions and autonomy as causes of harmful actions, and recommends human approval for high-impact steps. A conversational request to summarize a ticket should not silently authorize closing it.
For each tool, test:
- Required fields are missing or refer to an unauthorized record.
- An input contains instructions unrelated to the requested task.
- The tool times out after accepting the operation.
- A response claims success without the expected result identifier.
- The user cancels before a consequential action begins.
Resume from evidence
Keep a run record with the request, authorized scope, completed steps, stable operation identifiers and verified outcomes. Distinguish attempted, accepted, completed and failed states. When a workflow resumes, inspect what already happened before retrying.
Business process automation needs a duplicate-safe strategy. A repeated read may be harmless; a repeated refund or outbound message may not be. Use operation identifiers and downstream state checks where appropriate, and route ambiguous outcomes to a person.
Measure completion and correction
Track successful authorized outcomes, incorrect tool selections, rejected calls, human corrections and unresolved partial runs. Review the content passed between tools so unnecessary sensitive information does not accumulate.
Use event driven application design for durable state transitions and AI voice bot integration when a conversation initiates the workflow.
Give every tool a narrow business contract
Document each tool in terms an operations owner can review. State which records it may access, which fields it accepts, what it may change and which result confirms completion. A tool named "manage account" hides too many decisions. Separate finding an account, preparing an update and applying an authorized change so their permissions can be examined independently.
| Workflow step | Application control | Evidence required to continue |
|---|---|---|
| Read a support case | Verify user access and allowed fields | Retrieved case reference and current revision |
| Prepare a proposed update | Validate required values without applying them | A reviewable before-and-after summary |
| Approve a consequential change | Bind the decision to the specific proposal | Authorized reviewer and approved proposal revision |
| Apply the change | Recheck permission and current state | Confirmed operation reference and saved result |
| Recover an uncertain operation | Look up the original attempt before retrying | Downstream status or a documented manual resolution |
These controls belong in the surrounding application and connected systems. A detailed tool description can help the model select the appropriate operation, but it should not be the only restriction preventing unauthorized changes. Check identifiers, enumerated values and access on the server handling the action.
Make approval specific and durable
An approval request should display the actual recipient, affected record, proposed values and material consequences. Bind approval to that version of the proposal. If the content or destination changes afterward, obtain review under the agreed policy instead of reusing an earlier decision for a different action.
Define what happens when approval is rejected, expires or receives no response. A waiting workflow should remain visibly waiting. It must not interpret elapsed time as authorization or repeatedly prompt until someone approves by mistake. Give reviewers a way to return the proposal with a correction and preserve the distinction between edited, approved and executed versions.
Check the business state again after a long wait. A support case might already be resolved, an order might be cancelled or another operator might have corrected the record. The workflow needs to identify that conflict before applying a previously reasonable action. A valid approval does not make outdated inputs current.
Hypothetical example: a support update times out
Imagine a workflow has permission to add an internal case note after a reviewer approves its contents. The note-writing service accepts the request, but the response is lost. The model sees a timeout. Repeating the write immediately could create two identical notes.
A duplicate-safe orchestrator retains the operation reference and checks whether the first note exists. If it can confirm completion, it records the result and continues. If the state remains unknown, it routes the case to an operator with the original request details. This hypothetical example describes recovery behavior; it does not imply that every connected service offers the same lookup or idempotency mechanism.
Test partial completion and cancellation
Evaluate the transitions between steps, not only the final generated message. Use cases where a read succeeds but approval fails, where approval succeeds but the record changes, and where the tool accepts a request before becoming unavailable. Include a user cancellation during waiting and an external document containing instructions to expand the task.
The workflow should distinguish source content from authority. A sentence inside an email or retrieved document should not grant additional tool permissions. Limit the information passed between steps to what the next action needs, and avoid placing unrestricted credentials or unrelated customer data in model context.
Define a stop mechanism that prevents new actions and preserves enough state for investigation. Some completed operations cannot be undone automatically. Where reversal requires a business decision, create a review task describing the completed change and available remedies rather than claiming rollback succeeded.
Start with one workflow and a written acceptance checklist shared by engineering and the process owner. Review the operation ledger against the actual system state and inspect every unresolved partial run. Expand the permitted actions only after the team can demonstrate authorization, completion checks and recovery for the existing scope. That is how custom LLM function calling becomes dependable business process automation rather than a sequence of plausible tool suggestions.
Review workflow approval steps with SBS, bringing one process and the permissions each action requires.
India
UAE
KSA
USA
UK
Canada
Oman
Kuwait
Australia
Thailand