AI Development
Task-focused AI agents wired cleanly into your ticketing, CRM and operations tools—built with strict tool allowlists, step limits, human approval gates and full action logs.
Method, permissions and replayable evals. No autonomous black boxes.
Keeping tool-using agents inside clear operational boundaries
Unconstrained agents impress audiences during controlled demos and turn into liabilities in live company operations. Commissioning AI agent development across UAE teams only succeeds when multi-step triage, cross-system lookups and draft replies run inside strict permission boundaries. Operations directors, CTOs and product leads bring us four recurring failure patterns:
- Support and operations staff copy data across four tabs per enquiry. Before anyone drafts a reply, someone looks up order history, warranty rules, supplier trackers and past correspondence manually.
- Simple scripts break on messy customer prose or mixed Arabic and English. Fixed keyword triggers fail on nuanced phrasing, while single-turn chat cannot query live ERP or ticketing systems.
- Leadership refuses to let an open-ended bot mutate customer records. One hallucinated credit note or wrong vendor reply damages trust far faster than manual triage costs.
- Prototype agent loops spin through expensive retries. Without hard step ceilings and per-run budgets, confused tool calls quietly drain API credits and stall work queues.
Constrained state machines instead of blank-cheque prompts
Rather than handing a language model unrestricted API credentials, we structure agents as deterministic state machines around narrow read tools, draft-first stages and mandatory confirmation gates on state changes:
- Narrow read tools: retrieve only the caller’s authorised records under explicit per-run call caps.
- Draft-first outputs: stage candidate replies, claim checks or categorisations for human verification before external commits.
- Explicit write gates: lock destructive or financial mutations behind server validation and human confirmation clicks.
Code example: separating read tools from guarded writes
Tool registries declare permissions, call limits and confirmation requirements explicitly in typed server code.
src/agent/tool-policy.ts
export const AGENT_TOOLS = {
lookupOrder: { mode: 'read', requiresApproval: false, maxCallsPerRun: 3 },
fetchReturnPolicy: { mode: 'read', requiresApproval: false, maxCallsPerRun: 2 },
stageDraftReply: { mode: 'write_draft', requiresApproval: false, maxCallsPerRun: 1 },
issueCreditNote: { mode: 'mutate', requiresApproval: true, maxCallsPerRun: 1 },
} as const;
How guardrail testing catches bad agent behaviour
Client workflows remain confidential and we invent no labour-saving figures. Reliability comes from treating agent orchestration as strict systems engineering: typed tool contracts, explicit write gates and replayable trajectory evaluations. Below is an illustrative example of the adversarial tests run before any release:
Untrusted email body tricks triage agent into invoking refund tool
Fail- Where
- Customer Triage Agent test suite, adversarial prompt-injection test #07.
- Evidence
- An incoming support message containing hidden override text caused the model to request issueCreditNote without matching return verification.
- Why it matters
- Models cannot reliably separate system policy from untrusted customer text if write tools accept unguarded calls directly.
- Fix
- Remove direct refund execution from the autonomous loop; restrict agent output to stageCreditRequest (pending human review) and enforce policy verification in deterministic server code.
- Owner and size
- AI platform engineer. Medium.
- Verification
- Re-run adversarial suite across 25 injection variants; assert zero unapproved mutations occur and all staged actions require explicit operator confirmation.
Sample agent security check written for this page. Illustrates how we test prompt-injection boundaries in our engineering method, not a client system report.
Fixed automation, single-turn LLM or multi-step AI agent
Agentic loops add latency, cost and non-determinism compared with deterministic automation or a single structured LLM step. Only reach for an agent when resolving a task genuinely requires conditional lookups across multiple tools.
| Pattern | Best when | Latency & predictability | Wrong choice when |
|---|---|---|---|
| Fixed workflow automation | Trigger, rules and destination fields are fully known ahead of time. | Instant, completely repeatable, minimal ongoing compute cost. | Staff must read unstructured emails, scans or ambiguous requests. |
| Single-turn LLM workflow | One clear prompt turns messy input into structured fields, tags or summaries. | Fast single round-trip; straightforward unit-style schema checks. | The task requires checking two or three external systems dynamically mid-task. |
| Bounded AI agent | Resolving one task requires conditional tool lookups, policy checking and staged draft actions. | Multi-second execution; requires replay evals, step limits and approval UI. | A fixed script already solves the workflow or high-stakes actions need zero model discretion. |
Deliverables for a production AI agent
Scoped tool wrapper library
Typed wrappers exposing only the exact fields and read/write endpoints the task needs—never raw admin credentials.
Human-in-the-loop approval UI
Side-by-side review cards showing gathered facts, reasoning trace and drafted actions before a person clicks send or approve.
Step, timeout & spend ceilings
Hard per-run budgets preventing infinite tool loops, excessive token consumption or runaway parallel executions.
Replayable evaluation suite
Recorded real-world trajectories re-run automatically whenever prompts, tool schemas or underlying models change.
Immutable action audit log
Every prompt context, tool call, argument payload, response and human approval stored cleanly for compliance review.
Prompt-injection defences
Strict separation between trusted system instructions and untrusted external text arriving inside emails, PDFs or web forms.
How we design, test and govern agents
-
Job decomposition and risk grading
We map one bounded workflow end to end and grade every system action as read-only, draft-only or irreversible mutation.
- Agent runtime does
- Nothing yet. Tool permissions come from human risk assessment.
- Engineers & operators decide
- Operations owners sign off on what the agent may read, draft or never trigger alone.
-
Typed tool contracts and sandboxing
Each backend integration wraps strict argument validation, tenant scopes and dry-run staging flags before the model sees it.
- Agent runtime does
- Generates initial JSON Schema definitions for existing endpoints.
- Engineers & operators decide
- Engineers build hard validation walls so malformed model arguments fail safely.
-
Deterministic orchestration & fallbacks
Whenever sequence order is known ahead of time, we keep routing deterministic in code and invoke the model strictly for reasoning steps.
- Agent runtime does
- Selects between allowed read tools inside bounded step budgets.
- Engineers & operators decide
- Engineers write state transitions, retry rules and safe timeout exits.
-
Adversarial & trajectory evaluation
We test tricky inputs: conflicting order dates, mixed English/Arabic enquiries, missing fields and prompt-injection strings hidden inside user messages.
- Agent runtime does
- Runs automated trajectory assertions across dozens of logged scenarios.
- Engineers & operators decide
- Analysts inspect tool-selection errors and tighten schemas or system instructions.
-
Shadow launch and review sampling
Agents begin by drafting actions for human staff to verify, building documented accuracy before narrow low-risk automation rules expand.
- Agent runtime does
- Logs execution timings, refusal frequency and cost per ticket.
- Engineers & operators decide
- Team leads audit overrides and refine approval thresholds weekly.
Technologies and industries
Agent orchestration and evaluation suites typically run in Python or TypeScript and JavaScript with Node.js worker queues, storing conversation states, audit logs and retrieval indices in PostgreSQL and Redis hosted on AWS. Where workflows call for straight data extraction without multi-step tool planning, LLM integration keeps latency lower; where steps never require unstructured reasoning, deterministic business process automation is cleaner.
Retail and e-commerce
Returns-triage assistants that inspect order status, courier tracking and policy dates before staging a draft agent resolution.
FMCG and consumer goods
Distributor claim-verification helpers matching attached invoices against agreed promotional terms for finance sign-off.
Food and beverage
Supplier onboarding and spec-sheet intake helpers flagging missing certificates or allergen fields before procurement review.
Engagement options and cost drivers
Single-workflow agent pilot
Take one repetitive triage or research task, wrap two or three read tools safely and prove trajectory accuracy on real historical cases.
Governed agent & review UI
Build tool adapters, human approval dashboards, audit logging and CI trajectory checks integrated with your core software.
Guardrail & cost review
Harden an existing brittle agent script with permission scoping, injection tests, fallback logic and token ceilings.
We do not quote fixed prices. Agent engineering cost depends on the number and cleanliness of external tool APIs, whether actions stay draft-only or need multi-tier approval dashboards, bilingual Arabic evaluation coverage, latency requirements and the volume of historical edge cases needing regression tests. Wrapping existing APIs defensively usually takes more care than writing the agent prompt itself.
Questions technical and operations leaders ask
- Can an AI agent take autonomous actions without human review?
- Read-only lookups and staging drafts can safely run automatically. Any action that spends money, deletes records or emails external customers should require human confirmation until long-term accuracy is proven on low-risk slices.
- How do you stop agents getting tricked by text inside customer emails or PDFs?
- We never trust model obedience alone against prompt injection: permissions stay enforced in server code, sensitive write tools sit behind deterministic checks or human sign-off, and untrusted inputs are delimited and tested against injection suites.
- What happens if one of our integrated APIs slows down or goes offline?
- Tool wrappers enforce explicit timeouts, bounded retries for safe reads and clean failure messages so agents exit deterministically instead of looping indefinitely.
- How do we verify the agent is still accurate months after launch?
- Every production override by staff feeds back into the offline trajectory dataset, and scheduled evaluation runs confirm accuracy before model or prompt changes promote.
- Where can we read more about retrieval and AI engineering practices?
- Explore the AI development hub, compare workflows in Engineer or browse our technical articles in Insights.
Return to the AI development hub, compare fixed workflows under business process automation, inspect single-call patterns in LLM integration, or read technical guides in Insights.
Scope a governed AI agent
Tell us the multi-step task slowing your team down, which tools hold the facts, and where humans must stay in control. We will propose a safe, testable agent build.