Deployment
Foundry Hosted Agents (Azure)
Deploy to Microsoft Foundry Hosted Agents on Azure AI Foundry Agent Service.
Foundry Hosted Agents are Fabric Harness's primary Azure target. The build target emits a Dockerfile, an azd project file, Bicep infra, and Foundry agent metadata.
Status: scaffold + preview metadata. This target emits deployable scaffolding ready for
azd up. Live Hosted Agent create/update/invoke is pending Azure MCP Foundry discovery or an official stable Hosted Agent deployment schema.
Build
fh build --target foundry-hosted-agentOutput:
.fabricharness/build/foundry-hosted-agent/
Dockerfile
azure.yaml
foundry-agent.yaml
infra/main.bicep
dist/server.mjs
manifest.jsonYou can also build the worker variant:
fh build --target foundry-hosted-agent --runtime temporal-worker
fh build --target foundry-hosted-agent --runtime nodeDeploy
cd .fabricharness/build/foundry-hosted-agent
azd upazd provisions the Foundry project, identity, networking, and deploys the container image.
Why Foundry
| Foundry capability | Why it matters for Fabric agents |
|---|---|
| Per-session hypervisor sandbox | Maps 1:1 onto Fabric's SandboxEnv semantics. |
| Disk persistence across scale-to-zero | Backs sandbox.snapshot() / restore(). |
| Per-agent Entra Agent ID + on-behalf-of (OBO) auth | Fits Fabric's two-identity actor schema. |
| Foundry-native Azure OpenAI access | Models, identity, and observability in one runtime. |
| Toolbox, Memory (preview) | Optional Fabric integrations, behind feature flags. |
Architecture decision
- Fabric runs inside the Foundry session substrate. Foundry provides the per-session sandbox; Fabric provides the harness loop, governance, and (optionally) Temporal durability.
- Temporal workers run outside Foundry. Use the
temporal-workerruntime variant when you need durable, replayable agent sessions; the worker calls Foundry-hosted activities for sandbox effects. - Entra Agent ID + OBO identities are recorded in the session entry's
actorfield so audit trails answer "which agent acted, on whose behalf, who approved?". - Foundry preview integrations (Toolbox, Memory, Activity Protocol) live in
@fabric-harness/azureonly — no Foundry SDK types leak into@fabric-harness/sdk.
Identity model
actor?: {
agentId?: string; // Entra Agent ID
onBehalfOf?: string; // upstream user identity
};Approval requests record both identities for compliance.
See also
- Azure overview
- Capability matrix — Foundry feature coverage.