By Greg Nowak. Last updated 2026-11-17.
An internal AI agent changes the job when it can send a quote, update a customer record or trigger a script. Someone must decide what it may do, review exceptions and recover when an action fails halfway through.
OpenAI’s Agents SDK provides guardrails, approval pauses, saved run state and tracing. For a business owner or operations lead, the rollout question is practical: can your team trust the workflow and manage the work it creates? I would start with one process, explicit permissions and a review queue someone actually owns.
Define the actions before choosing the controls
Take a quote workflow. Searching the CRM, calculating a price, preparing a draft and sending it should be separate capabilities. Each needs its own access limits. A single broad “manage customer” tool makes it harder to control what happens.
Use this matrix as a pilot policy, then adjust it to your business.
| Action | Pilot control | Evidence to retain |
|---|---|---|
| Read internal records | Restrict access by user and client | Requester and record references |
| Prepare a quote | Validate prices; save as draft | Draft version and checks |
| Update the CRM | Review exact field changes | Before/after values and decision |
| Send a quote or export data | Review recipient, content and scope | Approved payload and delivery outcome |
| Delete records or run privileged commands | Handle manually during the pilot | Escalation and resolution |
Read access can expose sensitive information too. For agencies, enforce client separation in the integration’s access checks. A prompt telling the agent to respect client boundaries cannot enforce those permissions.
Put guardrails before the action they must stop
The SDK guardrails documentation distinguishes three checks: input guardrails inspect the initial request, output guardrails inspect the final response, and tool guardrails inspect function-tool inputs or outputs. Agent input and output checks do not inspect every intermediate action.
In TypeScript, input guardrails run alongside the agent by default. Set runInParallel: false when the check must finish before model or tool execution starts. Tool input checks can block execution; tool output checks happen afterwards and cannot undo an external change. Hosted tools use different paths, so verify coverage for each integration.
For the quote example, enforce customer access, permitted products and discount limits in application code at the tool boundary. Treat uploaded documents and CRM notes as untrusted data. They may contain text that looks like instructions, but they should never grant permission to send information or change records.
Make approval a decision someone can actually review
A review screen should show the customer, recipient, amount and proposed changes together. Assign a reviewer and backup, set an expiry rule, and decide what happens if nobody responds. I would keep expired requests blocked and route them to a manual queue.
The TypeScript human approval flow gives developers a practical sequence:
- Mark a sensitive function tool with
needsApproval: true. - Inspect
result.interruptionsfor pending decisions. - For delayed review, save
result.state.toString()in server-controlled storage. Restore it withRunState.fromString(agent, serializedState). - Apply
state.approve(interruption)orstate.reject(interruption), then resume the original root agent withrunner.run(agent, state).
In Python, the snapshot is available through result.to_state(). The results and state guide also explains why final output can be empty while approval is pending. Show “awaiting review” in your interface so staff can distinguish a paused task from a failed one.
Keep the snapshot on the server. Restoring state does not authenticate it or authorize the reviewer. Check reviewer permissions, bind the decision to the stored action and atomically consume each pending request to prevent duplicate submissions. If the price or customer record changed while waiting, require fresh review.
Plan for the timeout after a successful update
A CRM might accept an update just before your connection drops. Resuming a run does not guarantee exactly-once execution. Use an idempotency key where the destination supports it, or another duplicate-prevention mechanism. After an uncertain timeout, check the destination before retrying. Write this recovery procedure before enabling live writes.
Keep an audit record your operations team can use
The SDK tracing guide describes records of model calls, tools, handoffs and guardrails. Tracing is enabled by default in supported server runtimes, with exceptions such as test mode. Confirm that traces are exported in your deployment.
For business accountability, I would also store the workflow ID, requester, proposed action, reviewer, decision time, policy version and execution outcome. Link these to the trace ID and destination record ID. “Approved” and “successfully delivered” must be separate statuses.
Traces and saved state can contain customer data. Define access and retention, avoid secrets in persisted context, and review traceIncludeSensitiveData before using live records.
Roll out in stages, with a clear handover
- Draft only. Compare proposed actions with staff decisions on representative work.
- Reviewed writes. Test rejection, expired approval, changed records, service restarts and uncertain timeouts.
- Narrow automation. Expand only where checks and observed results justify it.
Measure review time, corrections, failed actions and running costs alongside time saved. If every quote still needs rebuilding, the pilot needs work before wider access.
Before handover, require a tool inventory, approval matrix, storage and retention plan, recovery instructions and a named exception owner. Document how to disable write access. Agencies should agree who maintains these controls when a model, integration or SDK version changes.
If you have a promising agent and need help making it operational, talk to Greg about your rollout. Bring one workflow, the systems it touches and the actions you want it to take. We can use that to define scope, approvals and a manageable first release.
Related on GrN.dk
- A Voice Agent Is Only Ready When the Human Handoff Works
- Before your AI agent starts clicking, write a browser policy
- OpenAI Computer Use: What Browser Agents Need Beyond the Demo
Need help with this kind of work?
Talk to Greg about your agent rollout Get in touch with Greg.