# How I built a digital coworker on Azure that learns on the job

2026-11-24 · [Article source](./source.md) · [Project](https://github.com/tkubica12/agent-demos/tree/main/autopilots-on-azure)

1. **Two-month role, not a scheduled prompt.** Junior tracks project changes and their impact. Can suggest a deadline; the responsible human confirms it. Example: distinguish a dropped feature from a rescheduled meeting; compare plan with web copy and contact the copywriter with both sources. Chatbot answers; workflow applies rules; assistant takes direction. Digital worker carries a role, acts under its own identity and applies corrections to future work.
2. **Managed vs self-hosted.** [Microsoft Autopilot](https://learn.microsoft.com/en-us/copilot/autopilot/overview) in phased Frontier preview since Nov 17, 2026. Demo runs on Azure/Foundry; portable core/role/skills, [custom model](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart/) and another host possible with equivalents for the platform services.
3. **Interactive path.** [Activity Protocol](https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/activity-protocol) → OnDemand bridge → authenticated HTTPS `/v1/runs` → Hermes. Replies via bridge to original thread; async Service Bus events via managed trigger. [SDK supports several hosts](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/overview-agents-toolkit). Bridge has no model/MCP access. Runtime calls Foundry with its managed identity; some MCP connections still inside runtime, target configuration outside container in ACA Sandboxes. Bridge can sit in DMZ; private runtime VNet/DNS + VPN/ExpressRoute can reach on-prem.
   [Hermes](https://github.com/NousResearch/hermes-agent) = open-source harness. Bridge contains no AI and has independent lifecycle. [One bridge per worker today](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0014-per-worker-agent365-blueprints-and-bridges.md); future multi-agent router must isolate identities and runtime destinations.
4. **Teams/A365.** Agent User: teach in 1:1 chat, [mention and receive a threaded reply](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/DEPLOYMENT.md#deployed-checks), reach a named person proactively via Teams tool. Immediate temporary bridge 👀 = picked up; typing in personal/group chats. Hermes can choose 👍 for agreement, ❤️ for praise, 😮 for surprise, or `NO_RESPONSE`. [Comments/email answered in originating workload](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0002-teams-event-routing-and-reactions.md).
5. **Three learning levels.** (1) [Native Hermes](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/DEMO.md#2-memory-versus-skills): during/post-turn adaptation, `/learn`, preferences to memory, procedures to `SKILL.md` via `skill_manage`; `/new` preserves home. (2) Custom `system.dream` via Service Bus + [`dream-reflection` role skill](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/blueprints/junior-project-manager/skills/role/dream-reflection/SKILL.md) in a fresh native session compares multiple sessions; no update is valid. (3) [Collective learning](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0010-candidate-improvements-and-collective-learning-review.md): owner’s private `/learning` diff/undo/keep/share, approved signed Learning Packet → human Git review → role release → refresh. No automatic sharing; excludes chats, documents, private memory. Signature ≠ quality.
6. **[Cron and async integrations](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0015-service-bus-backed-hermes-cron.md).** Thursday check: who takes over which task and by when. Native job, revision, instructions in home. `CronScheduler` arms only next occurrence in per-worker Service Bus: type, IDs, revision, due time; no prompt/body/token. External managed connector → PeekLock → OnDemand bridge callback → verify revision → execute → deliver to bound conversation → settle with durable receipts. Polling can delay wake. Demo: cron, Dreaming, deterministic document retry; never chat. Possible extensions, not deployed: database change or GitHub/Azure DevOps webhook → adapter → message `type` → handler. Unknown effect to DLQ.
7. **[ACA Sandbox](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0022-memory-suspend-with-native-backups.md#evidence).** OnDemand, hibernate after 5 idle minutes. [Modes](https://learn.microsoft.com/en-us/azure/container-apps/sandboxes-overview#lifecycle-states): `Memory` snapshots RAM and disk to resume same process; `Disk` preserves disk only, Hermes restarts/discovers MCPs. Sweden Central, 2 vCPU/2 GiB, 11 MCPs: VM <1 s, Hermes API Memory 1.5–2.7 s vs Disk 17–25 s, not model latency. [Keepalive](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/runtimes/hermes/runtime_keepalive.py): active model/tool calls only, `GET /health` through own HTTPS ingress roughly every 60 s, not localhost; stops after work, max 30 min per operation. Idle compute is not the whole bill. Local single-writer SQLite, roughly minute-scale native backup after changes to Blob volume, final backup on planned replacement. Restore latest valid archive for same worker; deleting group also deletes volume.
8. **[Identity](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0012-mcp-identity-and-governance.md).** Foundry = runtime MI; private incidents/public shipments MCP = federated Agent Identity; M365 = fixed delegated Agent User, not human caller token. Loopback token adapter today. Goal: secrets/MCP auth/egress outside Hermes; [platform rules/header injection](https://learn.microsoft.com/en-us/azure/container-apps/sandboxes-egress-policies) do not replace Agent User delegation. Managed connector used for Service Bus; generated apps enforce deny-default egress.
9. **[Chat files](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/bridge/generated_files.py) ≠ [shared original](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0019-durable-document-publish-and-interactive-choice.md).** Optional run-scoped DOCX/UTF-8 TXT export, max 3 × 10 MiB, actual bytes/hash. No learning from incoming attachments. Original: Work IQ discovery/collaboration, Graph as Agent User, content-anchored edit, Open XML validation, ETag. No blind overwrite. On lock choose retry original or shared copy now; after 24 h/terminal conflict send labeled copy.
10. **Inside chat.** Adaptive Card = known authenticated action, never model-authored payload. [HTML widget](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/DEPLOYMENT.md#generated-html-widgets-and-hermes-selections) = author-added `teams-html-widget` skill, `extendedmarkdown`, isolated HTML/CSS/JS + handshake. `autopilot.widget.submit`: 30 min, one continuation, not tool approval. Teams 1:1 web/Chrome: 4 people, CZK 5,000 budget, 3,100 cost, 775/person, 1,900 left. Not desktop/mobile/channel proof.
11. **Standalone app, two routes.** [Demo gateway → child Sandbox](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/adr/0020-adaptive-cards-generated-web-apps-and-mcp-apps.md): isolated [microVM with external proxies](https://learn.microsoft.com/en-us/azure/container-apps/sandboxes-overview#architecture), participant Entra sign-in before app code, direct URL, deny-default egress, suspend after 5 min, default deletion 24 h after suspension. Extend/delete without model/queue. Kubernetes needs equivalent controls. [Copilot Managed Runtime](https://learn.microsoft.com/en-us/microsoft-365/copilot-managed-runtime/architecture): Hermes can write a custom SPA and publish via SDK without Microsoft Copilot Code; publishing/sharing a custom app tested in tenant. Entra, tenant policies, [M365 inventory](https://learn.microsoft.com/en-us/microsoft-365/copilot-managed-runtime/overview).
12. **[Agent Chat Simulator](https://github.com/tkubica12/agent-demos/tree/main/autopilots-on-azure/chat-simulator).** [Run locally](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/chat-simulator/README.md#run-and-build) without Teams/Agent 365: explicitly enable [DEMO mode](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/chat-simulator/README.md#explicit-expiring-demo-mode), set access code, expiry within 30 days and `test-data-only`; chosen display name ≠ authenticated identity. Simulates the channel, not the model: register real bridge `/api/messages`, configure matching channel key. Test 1:1, threaded mentions, cards, reactions, attachments, widgets. Not proof of tenant permissions, actual Teams client behavior or Graph/Work IQ writes. [Real Hermes on Azure](https://github.com/tkubica12/agent-demos/blob/main/autopilots-on-azure/docs/simulator-deployment.md) needs cloud and model access, not publication to Teams.
