بيئات تشغيل الوكلاء المحلية مع إثبات بُعدي: كيف تتخلص المؤسسات من قيود متجر التطبيقات
هندسة عملية لتشغيل وكلاء محليين مع إثبات بُعدي تبقي الذكاء الاصطناعي خارج المنصات، قابلاً للتدقيق، وتحت سيطرة تكاليف المؤسسة.
The Door Is Closing — Build Your Own Exit
Platform gates are getting taller just as AI workloads explode. Enterprises that tie agentic systems to app stores and SaaS endpoints will wear the handcuffs of someone else’s roadmap, billing policy, and incident timeline.
There is a better pattern, and it does not require heroics. Native, sandboxed agent runtimes that speak hardware-backed remote attestation and enforce cryptographic skill provenance let you run rich agentic workflows off‑platform, keep auditors calm, and avoid runaway bills. Think of it as pulling the brains of your automation back into environments you actually control — laptops, VDI fleets, edge nodes, and your own cloud — while still retaining the coordination benefits of managed services. This is an argument for an immediately practical architecture and migration path, not a manifesto for perfect sovereignty.
What Lock‑In Looks Like When Agents Run Your Business
Lock‑in is not an abstract fear; it shows up in calendar invites, budget escalations, and outage retros. As agentic tooling matures, the posture of major gatekeepers has shifted toward verified‑developer rules, stricter distribution policies, and usage plans that trip over invisible thresholds. The agent that helps reconcile invoices, triage customer tickets, or push code through a merge queue is no longer a sidecar utility. It is a production system. If a platform revokes an integration key, changes a permissions model, or modifies review timelines, that system stalls.
Two concrete pain points repeat across enterprises:
- Policy drift that halts delivery. A “trusted developer” badge gets pulled because a product toggled an API scope. Publication queues freeze. Security teams wake up to unblock a release through a support portal.
- Pricing shocks that move goalposts. AI usage is spiky, and SaaS metering is aligned with the vendor’s margin, not your workload profile. Budgets approved on one token price meet a very different invoice a quarter later. “One more integration” becomes a tax multiplier.
Reasonable pushback says: the convenience is worth it. Platforms provide monitoring, abuse prevention, security updates, and compliance narratives. All true. But the more agents you run — the more those agents stitch into critical paths — the more those benefits outweigh the loss of control only until the day they don’t. Enterprises in regulated, multi‑entity environments feel this acutely. In the Gulf, where cross‑border data flows and free‑zone entities interlock with public services, a vendor’s policy change is not just a nuisance; it can break a compliance mapping that took months to align.
You cannot refuse platforms entirely. You can refuse to let them be the only place your agents can run.
Define the Target: A Native, Sandboxed Agent Runtime
Start with a picture that’s clear enough to drive procurement and design reviews.
A native agent runtime is a host application — on a laptop, a VDI image, an edge server, or your private cloud — that:
- Executes agent loops and plans.
- Loads skills as signed modules with a narrow ABI and declared permissions.
- Mediates all IO (files, network, clipboard, camera, keychains, enterprise data APIs) through capabilities issued at runtime.
- Enforces sandboxes: process isolation, syscall filters, namespace/jail policies, or a bytecode VM.
- Emits structured audit logs with stable trace IDs for every decision and external side effect.
- Presents a hardware‑backed remote attestation quote that proves to a verifier what code is running and in what security posture.
Every one of those pieces exists today. Container sandboxes. WASM runtimes with Wasi capabilities. Managed keychains. TPM‑anchored measurements. Confidential compute VMs. What’s missing is a confident way to combine them for agentic workloads and make them first‑class in enterprise agent orchestration.
On‑device AI runtimes fit directly into this picture. If the model is local — a small reasoning model on a laptop, or a quantized vision model on an edge box — the inference step is just another skill, subject to the same permissions and logging. If the model is remote, the call happens through a signed connector skill, still mediated by your runtime. Either way, the agent remains a guest in your house, not a permanent resident of someone else’s platform.
This is not a cry for monolithic “agent platforms.” It is a call to treat the host runtime as a trusted base and everything else — skills, planners, connectors, evaluators — as replaceable, attestable tenants.
Attestation Is the Trust Backbone You Can Actually Operate
Remote attestation sounds intimidating, but the operational lens is simple. One side asks: what am I talking to? The other side answers with a verifiable description of itself: here is my code identity, here is my hardware and boot posture, here is a fresh key bound to both.
Under the hood, hardware vendors ship a root of trust — a chip and a set of endorsement keys — that can sign measurements of code or VM state. Different ecosystems exist across x86 and ARM, and across enclave and VM isolation styles. The exact acronym is less important than the pattern:
- The runtime boots into a measured state. A cryptographic hash of the runtime binary, its configuration, and sometimes a small policy bundle becomes part of a platform state.
- The runtime asks the hardware to generate an attestation quote. That quote contains the measurement and a fresh public key, plus a signature chain back to a vendor‑provided certificate.
- The runtime presents that quote to your verifier service. The verifier checks the vendor chain, verifies the signature over the measurement, and matches the measurement against an allowlist of known‑good builds.
- If everything matches, the verifier issues a short‑lived token and policy to the runtime. That token gates further capability grants and skill loading.
From an enterprise perspective, this turns a “who is this process?” question into a crisp decision you can centralize and audit. You can pin to specific runtime builds, deprecate old hashes, and phase in new ones across device fleets. You can bind the runtime’s signing keys to specific machines, departments, or data zones.
Attestation does not need to be perfect to be useful. Some endpoints will sit behind TPM‑anchored measured boot without enclave isolation. Others will run inside confidential VMs at the edge. The control plane should understand these tiers and issue different policies. For example: a laptop runtime with TPM proof may be approved to run skills that only read local files and talk to low‑risk APIs, while a confidential VM runtime with stronger isolation can receive credentials for sensitive data processing.
The important point is that agent runtime remote attestation makes your off‑platform execution visible and enforceable. Without it, you slide back into blind trust and wishful thinking.
Signed Skill Contracts: Provenance, Permissions, and Cost Hints
Agents do useful work by composing skills: fetch a ledger, summarize a document, open a ticket, call a model, or click through a browser. In most app‑store models, skills arrive wrapped in a discovery and rating layer. The verification step is someone else’s process; the provenance is opaque. That is exactly the dependency we are trying to retire.
Move skills into your own supply chain and make them cryptographic citizens.
- Sign every skill. A skill is a package: either a bytecode module (WASM is a fine choice) or a container image. It comes with a manifest that declares its permissions, resource constraints, and expected side effects. Build it in a reproducible pipeline, attach a software bill of materials, and sign the artifact. Keep the signing keys in an HSM or a cloud KMS with hardware enforcement. Record attestations (build environment, commit hashes) using standard mechanisms.
- Define a contract the runtime can enforce. The manifest should be machine‑checkable: which capabilities are required (filesystem paths, HTTP domains, model endpoints), which data classifications the skill is allowed to touch, what logging fields it must emit, and any human‑in‑the‑loop requirements. Treat the contract as a policy. If the skill tries to open a file outside its declared path, block and log. If it calls a model without a permitted tag, deny.
- Track provenance across updates. Skills evolve. Signatures should include version numbers, allowed upgrade paths, and optional kill switches. The orchestrator can pin a plan to exact skill digests and fail closed when a digest changes outside policy.
- Add cost hints. Most enterprises are reeling from surprise AI invoices. Put rough cost metadata into the contract. A model caller might state expected token ranges; an RPA skill might state API pricing units. Agents can plan with these hints, and the orchestrator can enforce budgets.
“Signed agent skills” is not a slogan; it is a practical way to pull trust decisions into your org. The runtime enforces the contract. The orchestrator chooses the skills and composes them. Auditors read the logs and the policy. App stores are welcome to exist. They are not the root of trust.
The Architecture That Works Now: Local Runtimes, Cloud Orchestrators
Big enterprises like abstractions that fit everywhere. This one does.
- On every device class you care about, deploy a native agent runtime. Laptops, gold‑image VDIs, developer workstations, point‑of‑sale terminals, edge servers, and private cloud VMs. Package the runtime so it updates the way any managed client updates in your fleet.
- Keep a cloud‑based orchestrator. It plans, coordinates multi‑agent workflows, queries a catalog of signed skills, checks policy, and talks to the attestation verifier to issue capability grants. The orchestrator should be stateless apart from job state and logs; if it dies, agents keep local context until reconnect.
- Let the runtime mediate everything local. UI automation, clipboard and window control, device sensors, filesystem, and enterprise applications that only exist inside your network. Many of the most valuable automations live here, far from any SaaS endpoint.
- Treat model access as a skill. Local models run as sandboxed modules alongside other skills. Remote models route through signed connectors that inject compliance headers, redact sensitive fields, and enforce rate and spend ceilings. Swap vendors without changing the agent code.
- Secure the handshake with remote attestation. No orchestrator job runs on a runtime that cannot present a fresh attestation quote and pass policy checks. No skill loads without a verified signature and a contract match.
- Log like your future self will need it. Every agent action writes structured logs: who planned what, which skills ran, which external systems were touched, what data labels were present, which redaction rules fired, and what the cost meter recorded. Send logs to your SIEM. Keep per‑job transcripts for replay.
Here is the flow in more detail:
- A user or a backend trigger asks the orchestrator to run an agentic task: reconcile a week of expenses, draft a policy memo from ten PDFs, or triage a support queue.
- The orchestrator resolves a plan using its policy engine and a catalog of skills, each identified by a signed digest. The plan lists required capabilities: read these folders, call this model, open this line‑of‑business app.
- The orchestrator picks a target runtime based on data gravity and trust tier. Maybe it chooses the user’s laptop because the PDFs are local and confidential. Maybe it picks a confidential VM near a private dataset.
- The runtime presents an attestation quote. The verifier validates the quote and returns a short‑lived token that encodes which capabilities can be granted.
- The orchestrator sends the plan. The runtime resolves each skill, verifies signatures and manifests, and requests capabilities under the token. It then executes the plan step by step, emitting audit events, cost counters, and any human‑approval prompts.
- When a model call is part of the plan, the runtime prefers a local model skill if policy allows; otherwise it uses a remote connector with built‑in redaction and guardrails. Either way, the call is logged with token usage or estimated compute.
- On completion, the orchestrator writes a job record: plan digest, skills digests, runtime measurement, logs, outputs, and costs. If something goes wrong, the orchestrator can ask the runtime to stash context for replay under support supervision.
This pattern decouples planning and execution while keeping trust tight at the edge. It is a sane default for enterprise agent orchestration.
Compliance and Audit Without Stall Speed
Agents introduce a compliance puzzle: how do you approve something that plans its own steps? The answer is to approve the substrate and sharply constrain the steps.
Policy is not a PDF; it is code and signatures. The runtime knows what a “PII‑touching” skill looks like and where it is allowed to run. The orchestrator knows when a dataset requires an on‑prem model. The verifier knows which runtime measurements are in scope for a regulated zone. Together they push a lot of compliance work into the compile‑time and boot‑time edges of the system.
A few pragmatic patterns help:
- Label data and propagate labels. If a file watcher skill ingests a folder marked “sensitive‑HR,” that label should ride along. The planner sees the label and restricts model choices. The logger sees the label and unconditionally captures redaction events.
- Provide human‑in‑the‑loop anchors that actually work. For irreversible actions — wire transfers, production deployments, legal notices — the skill contract can require an approval window signed by an authorized approver. The runtime pops the prompt where the data lives; the orchestrator records the approval artifact.
- Freeze and replay. Keep enough context to replay an agent run deterministically: skill versions, inputs, relevant prompts, and model identifiers. Regulators and auditors are not allergic to AI; they are allergic to untraceable systems.
- Fence third‑party connectors. If you must call external APIs, route through wrapper skills that strip identifiers and enforce explicit scopes for each call. Keep allowlists tight.
Enterprises in the UAE and across the Gulf often operate within regulated, multi‑entity structures. Agent runs may need to respect data residency, free‑zone boundaries, or sector‑specific controls. With attested runtimes and signed skills, the policy question becomes: where can this plan legally run and which capabilities can it receive in that zone? That’s a cleaner administrative problem than trying to force fit global app‑store policy into local compliance maps.
Cost Control by Construction, Not Post‑Hoc Shock
The most reliable way to avoid runaway SaaS bills is to reduce how often you need to ask someone else’s server for expensive work. On device AI runtimes and edge inference are not a panacea, but they move the demand curve in the right direction.
There are several levers, all compatible with the runtime pattern:
- Put a small local model on endpoints for classification, extraction, and skeleton planning. Reserve large remote models for the handful of steps that truly need them. Even when you must call out, a local pre‑processor can trim the input.
- Cache results at the skill layer with cryptographic keys derived from the input and policy. If a document was summarized yesterday under the same policy, the agent can rehydrate the output without a fresh call.
- Make costs visible to plans. Attach token and time budgets to jobs. Let the planner degrade gracefully rather than blasting through a cap. With cost hints in skill contracts, the planner can prune expensive branches.
- Choose your own hardware economics. In your cloud, run model pools on reserved instances or spot capacity with conservative fallbacks. The orchestrator can choose where to send a job based on current price signals.
You still pay for value — model calls, storage, support — but you control which workloads hit external meters and why. You also know where the money is going, because every call is a log line and every plan has a cost forecast.
A Sober Counter‑Argument: Centralized Platforms Are Safer and Faster
The strongest argument against native, attested runtimes is the oldest: centralize what you do not fully understand. Platform vendors patch faster. They see abuse patterns across tenants. Their DX is smoother. They invest in evaluation harnesses and guardrails you might not replicate.
There is truth here. Not every organization should host every piece of every agent stack. Some are better off letting a vendor carry the pager. Attestation can be brittle across OS versions. Hardware trust chains are vendor‑specific. Sandboxes leak, and isolation primitives have footguns.
Two responses keep the proposal honest.
First, pick a threat model you can operate. You do not need a perfect enclave to make progress. A TPM‑anchored measured boot already improves posture over a bare process. A confidential VM in your cloud shields you from a class of attacks that a normal VM would not. The point is progressive hardening. If your orchestrator can reason about tiers, it can send the right plan to the right host with the right capabilities.
Second, centralize what should be centralized: planning logic, skill catalogs, signing services, policies, logs, and patch distribution. Decentralize what must be decentralized: direct access to local data and applications, context that never should have left the device, and time‑sensitive UI work that breaks when latency climbs. The architecture keeps you close to the platform convenience curve where it helps, and away from app‑store lock‑in where it hurts.
As for DX, you build it once. A clean skill ABI, a well‑documented manifest format, a local simulator that enforces the same checks as production, and a test harness with golden logs will pay back for years. Engineers prefer systems that run where their code runs. Give them a runtime they can install, inspect, and reason about.
The Migration Path That Avoids Big‑Bang Risk
You can start next quarter without breaking things.
- Introduce the runtime as a sidecar. Ship it to a pilot group of internal users as a tame companion to existing SaaS agents. Let it handle local tasks: file watching, redaction before upload, and UI automations that never leave the device. No attestation yet; focus on stability and logging.
- Package two or three skills your teams already maintain. Pick low‑risk, high‑friction chores: converting scanned invoices to text, scraping a dashboard, normalizing spreadsheet formats. Sign the skills, enforce a minimal contract, and wire logs into your SIEM.
- Stand up the orchestrator as a planner with stubs. It receives jobs, resolves a tiny plan across your signed skills, and records everything. Keep the cloud vendors in place for the heavy lifting. You’re proving the control plane, not the capacity.
- Add attestation on one class of hosts. Developer workstations with modern chips are usually a good first target. Build the verifier, load an allowlist, and gate a new set of capabilities behind a successful quote. Do this in a quiet corner so you can iron out operational wrinkles.
- Move a noisy workload. Pick a task that hits external tokens hard — nightly document classification, support ticket clustering — and bring the inference local or into your own cloud under the runtime. Watch the cost chart. Adjust models and caching.
- Expand the skill catalog. As teams see the pattern, they will propose wrappers for their favorite APIs and in‑house systems. The contract enforces discipline. The runtime keeps you from turning into a bag of scripts.
At each step, if something breaks, stop. You are still running on the old rails. The point of this path is to avoid a migration cliff.
Design Choices That Keep You Out of the Ditch
A few choices make the difference between a principled architecture and an unmaintainable science project:
- Prefer a portable sandbox. WASM with a capability model is a strong default for skill packaging. Container sandboxes are fine for heavier dependencies but be strict on syscalls and mounts.
- Make the manifest a contract, not a suggestion. The manifest is not just documentation. It is executable policy. Capabilities should be verbs with narrow scopes: “read:/home/user/Reports,” “http:POST:https://api.example.com/tickets,” “model:embedding:v1.”
- Separate plan and act. The orchestrator proposes a plan with digests, costs, and labels. The runtime executes atomically with as few network round‑trips as possible. Plans that need “just one more capability” should go back to the orchestrator, not wing it locally.
- Keep keys out of skills. Skills request short‑lived capabilities. Long‑lived secrets live in the runtime or OS keychain, released based on policy and attestation tier.
- Version everything. Plans, skills, manifests, runtime builds, and policy bundles carry digests and semantic versions. Logs record versions. Reproducibility is a compliance tool and a debug tool.
This is the discipline that lets you tell an auditor, or a board member, or a regulator: we know what runs where and with which permissions; we can replay it; we can revoke it.
Why Now: The Gatekeepers Have Declared Their Terms
The past year set two clear signals. First, the gatekeepers of distribution and API access are instituting verified‑developer regimes and sharper enforcement. Second, SaaS AI pricing has lurched in ways that make CFOs ask pointed questions. Enterprises do not have the luxury of ignoring either. The combination undermines brittle architectures built on platform mercy and aspirational budgets.
On the other side, the ingredients for sovereignty have matured. On device AI runtimes can handle useful tasks on commodity hardware. Confidential compute is available in mainstream clouds. Supply‑chain signing and build attestation are not exotic anymore. Policy engines can express fine‑grained capability models without burying teams in YAML.
No one needs to wait for standards committees to bless an acronym. A small, disciplined team can ship a working native agent runtime, a verifier, and an orchestrator that respects signatures and measurements in a quarter. That is enough to start pulling the highest‑risk, highest‑cost jobs off platform.
The change is not just technical. It is strategic. In regions like Dubai where public and private services digitalize fast and operate across jurisdictions, being able to run agents locally — under your policy and your audit — is not a luxury. It is a requirement if you intend to scale without hard ceilings imposed by someone else’s app store or rate limiter.
The Sharp Take: Treat Platforms as Peers, Not Parents
Enterprises should not pick fights with platforms. They should pick their posture. When agents move from demos to payroll‑grade automation, keeping the center of gravity under your control is not a purist stance; it is operational common sense.
A native, sandboxed runtime with hardware‑backed remote attestation and signed skill contracts is the practical path out of app‑store lock‑in. It satisfies security teams with concrete controls. It gives auditors real artifacts instead of wishful policy. It gives engineers a substrate they can trust and extend. It gives finance a bill they can predict and bend.
Build it, run it, and let platforms compete to be excellent skills inside your catalog — not the only theater where your agents are allowed to perform.