AI Platform and Security · Module 3 · Infrastructure

Hybrid Agentic Work: Self-Hosted and Cloud Models for Sensitive Information

The lesson applies the hybrid pattern to agentic work tools on the desks of engineers, analysts and operators. Participants learn why routing must be fixed by the classification of the workspace before a session starts, how a provider-neutral agent, with OpenCode as the worked example, uses a self-hosted model for confidential and protected information and a cloud model for the rest, and why enforcement sits at the gateway and the network, not in the client.

Lesson 15 of 25Chapter 1590 minutes

Read the chapterThe whitepaperThe slides

All courses / AI Platform and Security / Module 3 / Chapter 15

Learning objectives

After the lesson the participant can:

Key concepts

Routing before the session starts
An agent sends file contents, command output, tool results and its earlier turns to the selected model. Once a cloud session has read a protected file the disclosure has happened, so the workspace's classification fixes the model tier in advance.
Information classes
Public, internal, confidential and protected. Confidential work may use a cloud service that has passed the controls guide for that class; protected work, such as Article 9 personal data and trade secrets, admits only a self-hosted model in an isolated zone.
Label the work, not the user
Every repository and data set carries a class, unlabelled work defaults to confidential, and labels are bound to the source-control platform and workspace identity, so that the gateway never trusts what the client asserts.
Enforcement outside the client
A client setting is a convenience, not a control. Direct egress from agent workspaces is denied, model traffic goes only to the AI gateway, cloud keys live only in the gateway and a protected workspace holds no cloud credentials at all.
Capacity follows context
A session resends its growing history at each step, so context memory, not the number of engineers, limits concurrency on the self-hosted tier. The tier is sized from measured pilot sessions, and sessions are queued instead of truncated.

Interactive exercises

Do them here and get feedback at once. Choose a card and then where it belongs, or drag it.

Interactive exercise 1 · Sort

Four information classes

Sort each example of work under the information class the chapter's table assigns it to.

Interactive exercise 2 · Scenario

One prompt on the better model

Apply the chapter's routing rule to a request from an engineer at Hansa Mutual.

Teaching plan

10 minThe teacher poses the dilemma: agents work best with a cloud frontier model, yet much valuable work must not leave the organisation's control.
20 minPresent the four classes and Figure 15.1, then read Hansa Mutual's managed configuration and routing policy and ask which lines are control and which are convenience.
15 minCover the capability gap in tool calling, the task suite from real tickets, the three operating demands and how the tier is priced against having no agent at all.
35 minExercise: groups design a classification-routed environment and write the tests that attempt the forbidden action from each workspace.
10 minDebrief on refused requests as evidence and on unattended runs, where the same agent becomes Mode 5 Autonomous production agents.

Discussion

  1. The line between Mode 3 and Mode 5 is said to be not the tool but whether a person is present to answer a prompt. Which of your agent runs already have no person present?
  2. Where a local model falls short, the chapter restricts the protected workspace to planning and review agents instead of relaxing its routing. How would your engineers react, and what would you say to them?
  3. Nordvik Region's hybrid is narrow by necessity and Hansa Mutual's broad by design. What decides the right breadth of the protected tier for your organisation?

Written exercise

Exercise · 35 minutes

Design a classification-routed agent environment

For your own organisation, or for Nordvik Region's platform team, design the environment in the eight steps of the practical guide. Produce a routing table with the four information classes, the permitted model tier and the workspace for each, and the default for unlabelled work. List what the gateway checks before it accepts a request, where cloud API keys live, which egress destinations each workspace may reach and which client features are disabled in the protected tier. Set the evaluation gate for the local model with thresholds for valid tool calls and task completion and say what is offered below it. Finally write three tests, one per workspace, that attempt a forbidden route and state the expected log entry.

Deliverable: A routing table, an enforcement list for gateway, network and credentials, a local-model gate, and three negative tests with expected evidence.

Self-test

Choose an answer to see whether it is right, or open the answer below each question.

  1. Why must the model tier for an agent session be decided before the session starts?

    Show the answer

    C. Because once a cloud session has read a protected file the disclosure has happened; switching model does not recall it
    The agent sends whatever context it gathers to the selected model, and a compacted history carries it forward, so routing follows the workspace's classification, never the prompt.

  2. What does the chapter say about a client setting that selects the permitted model provider?

    Show the answer

    B. It is a convenience, not a control, because a user can install another client or supply a cloud key
    The gateway and the network policy carry the control: even with a replaced client, the protected workspace has no route or credential for a cloud model.

  3. What is the practical guide's default treatment of a repository that carries no classification label?

    Show the answer

    D. It counts as confidential, and agent access to unlabelled repositories is refused
    The guide says to classify the work, not the user, to refuse agent access to unlabelled repositories and data sets, and to default unlabelled work to confidential.