Foundry Hosted Agents — Isolation Demo

Interactive tree · click any chat node to run it live
visitor: …
mode: …
agent: …

How session isolation works

Each group has users. A group can be a customer, business unit, region, or department. Each user can have private chats or join shared channels within the group — click any chat node below to run it live and watch the session ids appear.

🛡️ How the request router works ▸
flowchart LR
    User([Browser / API client])

    subgraph GK["Request router"]
        direction TB
        ID["Who is this?"]
        KEY["Build the workspace key"]
        TAG["Add tracking ID"]
        ID --> KEY --> TAG
    end

    subgraph PLATFORM["Foundry hosted agent"]
        direction TB
        ROUTE["Workspace key selects sandbox"]
        SBX1["Contoso / Alice / Thread 1
private workspace"] SBX2["Fabrikam / Carol / #project-x
different workspace"] ROUTE --> SBX1 ROUTE --> SBX2 end AUDIT[("Application Insights
audit trail")] User -->|raw identity| GK GK -->|workspace key only| PLATFORM GK -.->|tracking ID| AUDIT PLATFORM -.->|agent trace| AUDIT
LayerSees raw group identity?Enforces group separation?Holds working memory?
Browser / API clientyesnono
Request router (backend/server.py)yesbuilds the workspace keyno
Foundry platformno — only sees the workspace keyyes — the workspace boundaryhosts the workspace
AI agent (agent/main.py)no — only sees scoped contextno (and doesn't need to)yes — its own workspace
The AI agent doesn't have to be trusted with group separation. A bug in the agent code can't cross into another group's workspace — there's no path to ask "what's in another workspace".

📦 Sessions 0