BRK277 · Breakout

Hack the harness: Copilot SDK agents from prototype to production

  • Wednesday 18 November
  • 41 min
  • Catalogue level: (300) Advanced
  • Our depth rating: 300
  • Worth watching: 2/3

Speakers: Patrick Nikoletich, Steve Sanderson

Watch on Microsoft’s site from 00:08

Microsoft’s player cannot open a video at a given time: once it plays, skip to the time shown.

What the session covers

Patrick Nikoletich and Steve Sanderson present Copilot SDK 2.0, released the day before the session, and the rebrand from GitHub Copilot SDK to Microsoft Copilot SDK, and they explain the SDK/runtime/harness layering. Using the open-source Managed Copilot SDK sample, they take one staff assistant app through the shared, isolated, promotable, direct drive (brain-hands split) and delegate architectures, with live demos of the security and cost trade-offs of each. Steve explains that the Copilot runtime was rewritten from Node to Rust (about 50 ms startup, 10-11x less memory) and can be hosted in process in six languages. Patrick states that Copilot Cowork uses the promotable architecture today, and the session closes with the mixed architecture, inference from any provider and deployment to Azure via Aspire.

Best for: Architects and developers building custom agents on the Copilot SDK who need to choose between isolation, cost and scalability models for code execution in multi-user environments.

Session timeline by chapter

New material starts at 00:08. The session opens directly with the Copilot SDK 2.0 release and rebrand, so there is no introductory recap before the new content.

Where to skip: Watch 00:08–05:29 for the 2.0 release and multi-tenancy. You can skim the shared and isolated demos (12:22–18:07). The core is the promotable demo at 18:07, the Rust rewrite at 23:13, direct drive at 25:00–30:36 and delegate at 30:36, including the Copilot Cowork remark around 32:23. The recap from 36:19 is optional.

Chapters (14)

  1. 00:08 New Depth 200 · Novelty 3/3

    Copilot SDK 2.0 release, rebrand and the SDK/runtime/harness model

    Patrick Nikoletich (PM, Copilot SDK) and Steve Sanderson (Copilot runtime team) state that version 2.0 of the Copilot SDK was released the previous day and that the GitHub Copilot SDK has been rebranded to Microsoft Copilot SDK. They explain three layers: the SDK as the programmatic interface, the runtime as the engine behind Copilot-branded agentic experiences, and the harness as the default configuration that is evaluated and benchmarked and can be customised or replaced. The runtime is portable (local, cloud, air-gapped government clouds, private VNets) and works with any inference, including local models and third-party providers.

  2. 02:43 New Depth 300 · Novelty 2/3

    SDK 2.0 multi-tenant shared runtime and on-demand sandboxes

    SDK 2.0 introduces true multi-tenant support: in 1.0 only isolated container-based setups were supported, which brought cost and complexity. The new shared runtime can run as a shared process without a container and dynamically spin up sandboxes on demand, locally or in the cloud, depending on infrastructure and cost/performance trade-offs. A slide frames this as six architectures (Isolated, Shared, Promotable, Direct, Delegate, Mixed); the session will mature a single application through them, while BRK276 covered interconnected apps.

  3. 05:29 Deep dive Depth 300 · Novelty 2/3

    Managed Copilot SDK sample and the staff assistant requirements

    Steve introduces Managed Copilot SDK, an open-source reference implementation on GitHub that deploys agents to different locations and can migrate them between locations. Standard SDK code (create a Copilot client, create sessions with a model, send prompts) stays the same; only a few lines defining startup and where the session runs change. The scenario is a staff assistant that must run scripts and manipulate files while being fast to start, cheap to run and secure.

  4. 07:52 Demo Depth 300 · Novelty 2/3

    Demo: staff assistant in a shared environment without sandbox tools

    The prototype staff assistant answers business questions from context, first in a plain chat UI and then in a 3D office UI on the same SDK sessions. The apphost.mts config shows a single shared 'staff' environment (Claude Sonnet, network disabled, unsafe host tools false) optimised for fast time to first token and low memory. Uploading a spreadsheet fails with an error that the shared environment has no sandbox files, and the agent says it cannot execute code because no such tools exist; Steve then sets unsafe host tools to true.

  5. 12:22 Demo Depth 300 · Novelty 1/3

    Demo: unsafe host tools enable files but leak data across users

    With unsafe host tools enabled, agent Carol runs bash, loads a skill and uses Python to count rows and produce a new spreadsheet with the first five rows, which opens correctly in Excel. A slide summarises the shared multi-tenant model: low per-session overhead and per-session identity, but no shell or files and only app-level isolation. Logged in as a different user, Steve asks which sessions are in the directory and the agent lists other users' session workspaces, showing it could read or modify their data.

  6. 14:46 Demo Depth 300 · Novelty 1/3

    Demo: isolated architecture with a container per session

    Steve switches the staff environment to isolated, which locally creates a Docker container per session (in the cloud it could be another sandbox mechanism). Saying a single word to Dave creates a new sandboxed container, where the agent can safely run tools and count 10,000 rows. In Docker Desktop the uploaded file appears in the container workspace and the session state, including events.jsonl used to build inference requests, lives inside the container; containers are kept so sessions can be resumed.

  7. 18:07 Demo Depth 300 · Novelty 2/3

    Container cost growth and the promotable architecture demo

    Patrick raises cost: illustrative data shows container cost rising linearly with users because each session gets a permanent container, even chat-only sessions. The promotable architecture starts each session on the cheap shared runtime and automatically promotes it into a sandbox when it needs dangerous tools, via an API that moves the session between environments while retaining its contents. The demo shows small talk creating no sandbox, while uploading a file and triggering tool calls creates one containing the spreadsheet and the runtime.

  8. 23:13 Deep dive Depth 400 · Novelty 2/3

    Copilot runtime rewritten from Node to Rust: startup and memory gains

    Steve explains why the shared runtime is efficient: six months earlier the Copilot runtime used across coding agent products was written in TypeScript on Node, took up to about 5 seconds to start and used a lot of memory. The team translated 2 million lines of code into Rust using agents, cutting startup by two orders of magnitude to about 50 ms in process and memory by a factor of 10-11, with much higher throughput. The runtime can be hosted in process in six supported languages, including TypeScript, Go, C#, Java, Rust and Python.

  9. 25:00 Deep dive Depth 300 · Novelty 2/3

    Limits of promotable and the direct drive (brain-hands split) concept

    Promoted sandboxes still persist until users delete conversations, so container count keeps growing, only more slowly; promotable mainly helps drive-by questions. The direct drive architecture, also called brain-hand split, keeps the agent loop and session state on the shared runtime and sends only tool calls into a disposable sandbox. The sandbox has no agent and no model calls, so it can be discarded after tool calls and recreated later without losing state.

  10. 27:52 Demo Depth 300 · Novelty 2/3

    Demo: direct drive orchestrator with disposable sandboxes

    The staff environment is reconfigured as an orchestrator that can spawn isolated sandbox instances and directs tool calls into them. Greeting agent Alice creates no container; asking to count rows creates one, whose runtime directory is empty because the runtime stays outside. Steve deletes the sandbox mid-session, asks a follow-up and the session continues with its context, recreating a sandbox to redo tool calls; a cost chart shows direct drive flattening below isolated and promotable.

  11. 30:36 Deep dive Depth 300 · Novelty 2/3

    User demand for parallel long-running jobs and the delegate architecture

    User feedback asks for long-running overnight jobs and parallel work such as splitting test suites across workers. The delegate architecture runs a coordinator session on the shared runtime and gives it a tool to spawn as many worker instances as it needs. Each worker is an independent agent with its own sandbox, decision making and tool calls, and the coordinator organises tasks and cleans up; the slide notes costs of a container and agent per worker and self-contained tasks.

  12. 32:23 Demo Depth 300 · Novelty 2/3

    Demo: delegating parallel workers, plus how Copilot Cowork uses promotable

    The orchestrator is configured to link the staff environment to sandbox workers that are full agents. Steve uploads several spreadsheets and asks for parallel sandboxes to count rows; the first attempt fails to start workers and after a restart only one worker is started, which copies the files and completes the task, then removes its sandbox when told to clean up. Meanwhile Patrick states that Copilot Cowork uses a promotable architecture today and that teams are moving to delegation and brain-hands models, with GitHub software factories fully self-orchestrating.

  13. 36:19 Recap Depth 200 · Novelty 1/3

    Recap of the five architectures and the mixed architecture

    Steve recaps the path from shared (cheap, fast, insecure for arbitrary code) to isolated containers and then promotable, direct drive and delegate to reduce container costs. A slide contrasts where each level thinks (agent loop) and where it acts (shell and files). He adds a mixed architecture in which the agent decides at runtime which architecture and environments a given task needs.

  14. 37:42 Closing Depth 200 · Novelty 1/3

    Closing: harness origins, any inference, Aspire deployment and next steps

    Patrick notes that the Copilot SDK underpins many platforms where teams bind custom tools, skill providers and memory, and that the harness originates from the GitHub Copilot coding agent; the multi-tenant runtime shipped in 2.0 unlocks all six architectures. Inference is not restricted (Foundry, GitHub Copilot inference, alternative models), and BRK280 shows decision/classification models with a 5-6x speed-up. Everything shown can be deployed to Azure, e.g. Azure Container Apps, with an Aspire deploy command; Managed Copilot SDK is open source on GitHub, GitHub Copilot sandboxes and Foundry managed agent hosts are mentioned, and further offerings are said to be coming.

Announcements (9)

  • 00:08 not stated Microsoft Copilot SDK

    Microsoft Copilot SDK 2.0

    New major version of the programmatic interface to the Copilot runtime and harness, released the day before the session.

    yesterday

    Speaker’s quote (at 00:08)
    „Yesterday, we announced that we officially released 2.0 of the Microsoft Copilot SDK.“
  • 00:08 not stated Microsoft Copilot SDK

    Rebrand from GitHub Copilot SDK to Microsoft Copilot SDK

    The SDK formerly called GitHub Copilot SDK is renamed to reflect its broad adoption across Microsoft.

    Speaker’s quote (at 00:08)
    „it was previously called the GitHub Copilot SDK. But as we've scaled adoption up across all of the corporations and divisions, We've decided to rebrand it“
  • 02:43 not stated Microsoft Copilot SDK

    Multi-tenant support in Copilot SDK 2.0

    Lets many agent sessions run in one shared runtime process instead of requiring an isolated container per session.

    Speaker’s quote (at 02:43)
    „One of the real key innovations in SDK 2.0 is that it introduces true multi-tenanted support.“
  • 04:01 not stated Microsoft Copilot SDK

    On-demand sandboxes from the shared runtime

    The shared runtime can dynamically spin up sandboxes locally or in the cloud only when a workload needs them.

    Speaker’s quote (at 04:01)
    „it can dynamically choose to spin up sandboxes on demand, locally in the cloud depending on the context, your infrastructure choices“
  • 05:29 not stated Microsoft Copilot SDK

    Managed Copilot SDK (open-source sample)

    Open-source reference library on GitHub for orchestrating Copilot SDK agents locally or in the cloud and moving them between environments.

    Speaker’s quote (at 05:29)
    „we've got a set of samples available. These are open source samples on GitHub with a project called Manage Copilot.“
  • 20:55 not stated Microsoft Copilot SDK

    Promotable session architecture

    Sessions start on the shared runtime and are moved once into their own sandbox, keeping session contents, when tools are needed.

    Speaker’s quote (at 20:55)
    „we've got an API that we can call to transform this session from one environment into another environment, and it will retain all the contents of that session.“
  • 24:07 not stated Microsoft Copilot SDK

    Copilot runtime rewritten in Rust

    The Copilot runtime was translated from TypeScript/Node to Rust, greatly reducing startup time and memory use.

    Speaker’s quote (at 24:07)
    „We rewrote it in Rust. We translated 2 million lines of code using our agents into Rust“
  • 24:32 not stated Microsoft Copilot SDK

    In-process runtime hosting in six languages

    The shared runtime can be hosted in process in an application written in any of six supported languages.

    Speaker’s quote (at 24:32)
    „this shared runtime, which you can now host in process in your application in any of the six supported languages“
  • 40:27 roadmap Microsoft Copilot SDK

    Paved-path offerings for agent solutions

    Additional offerings that will provide paved paths for the agent architectures shown are said to be coming.

    Speaker’s quote (at 40:27)
    „we have a few other offerings coming that will help unlock paved paths for all of these types of agent solutions for you in the future too.“

Demos (6)

  • 07:52 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Show a staff assistant running all users' sessions in one shared runtime and the limits of that model for file and code workloads.

    Steps (6)
    1. Sign in to the staff assistant web app and ask about office locations in the chat UI.
    2. Switch to the 3D office UI and ask agent Dave to list the offices alphabetically.
    3. Open apphost.mts in VS Code and review the shared 'staff' environment: model, network disabled, customizations path, unsafe host tools false.
    4. Drag conference-leads.xlsx into the UI and ask Dave what is in the file; observe the shared-environment error.
    5. Ask Dave to …; observe that it has no way to execute code.
    6. Change the setting to use unsafe host tools true and restart the app host.

    Prerequisites: Managed Copilot SDK sample, Aspire app host, a configured model, sample data file conference-leads.xlsx.

  • 12:22 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Show that enabling host tools in a shared runtime makes file processing work but breaks isolation between users.

    Steps (5)
    1. After restarting with unsafe host tools true, drag conference-leads.xlsx to agent Carol and ask what is in it and to count rows.
    2. Observe Carol running bash commands, loading a skill and running Python.
    3. Ask for a new spreadsheet with only the first five rows, download it and open it in Excel.
    4. Sign in as a different user (Patrick) and start a new conversation.
    5. Ask which sessions are in the directory and observe other users' session folders being listed.

    Prerequisites: Managed Copilot SDK sample with unsafe host tools set to true; multiple user accounts in the staff assistant app.

  • 14:46 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Make arbitrary code execution safe by running each session in its own container.

    Steps (6)
    1. In apphost.mts, switch the staff environment to isolated with a sandbox image, model, no network and customizations path.
    2. Restart the app host and check Docker Desktop: only the Managed Copilot Relay container runs.
    3. Start a conversation with Dave and observe a new sandbox container being created.
    4. Upload conference-leads.xlsx and ask how many rows; the agent answers 10,000.
    5. In Docker Desktop, open the container Files tab and find the file under workspace/uploads.
    6. Browse managed-copilot/runtime/session-state to see the session files including events.jsonl.

    Prerequisites: Managed Copilot SDK sample, Docker Desktop locally, a sandbox container image.

  • 18:07 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Reduce container costs by creating a sandbox only when a session actually needs tools.

    Steps (6)
    1. Show that a chat-only conversation with Bob still created a second sandbox in the isolated model.
    2. In apphost.mts, configure the staff environment as promotable into an isolated sandbox environment, auto-promoting on tool calls.
    3. Restart the app host and delete leftover sandbox containers in Docker Desktop.
    4. Greet an agent and ask where the offices are; confirm no sandbox is created.
    5. Upload conference-leads.xlsx and ask for the first row; confirm a sandbox is created.
    6. Inspect the new container to see the uploaded spreadsheet and the runtime inside.

    Prerequisites: Managed Copilot SDK sample with two environments (promotable staff, isolated sandbox), Docker Desktop.

  • 27:52 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Keep the agent loop on the shared runtime and use throwaway sandboxes only for tool execution, capping container costs.

    Steps (7)
    1. In apphost.mts, set the staff environment as an orchestrator able to spawn sandbox-type isolated environments and direct tool calls into them.
    2. Restart the app host and confirm in Docker Desktop that no sandbox containers run.
    3. Say hello to Alice and confirm no container is created.
    4. Upload conference-leads.xlsx and ask to count rows; confirm a sandbox is created.
    5. Inspect the container: the uploaded file is present but the runtime directory is empty.
    6. Delete the sandbox in Docker Desktop while the session is active.
    7. Ask a follow-up question and observe the session continue and recreate a sandbox.

    Prerequisites: Managed Copilot SDK sample configured with an orchestrator environment and a sandbox environment; Docker Desktop.

  • 32:23 Not stated Microsoft Copilot SDK (Managed Copilot SDK sample)

    Let a coordinator agent spawn worker agents in their own sandboxes to process multiple files in parallel and clean up afterwards.

    Steps (6)
    1. In apphost.mts, configure the staff environment as an orchestrator whose workers are full agents in sandbox environments.
    2. Restart the app host and delete old containers.
    3. Drag several conference-leads spreadsheets to agent Carol.
    4. Ask to use parallel sandboxes to count rows in all the files.
    5. After a failed worker start, restart and retry; one worker is started, receives the files and completes the task.
    6. Tell the agent you are done and ask it to clean up; it removes the worker sandbox.

    Prerequisites: Managed Copilot SDK sample configured with orchestrator and sandbox worker environments; Docker Desktop; several sample spreadsheets.

Watch on Microsoft’s site: BRK277