Skip to content
Blog

Multi-User Shared Sessions: Collaborative Multi-Party Agent Workspaces

ADK models a session as one user's thread with the agent — there is no built-in multi-party session. This post is honest about that and builds three workable collaboration patterns, with permission boundaries, auditability, and the temp: scope trap spelled out.

Published on • December 3, 2026

AI Assistant

Two product managers and a legal reviewer all need to steer the same contract-review agent, and each of them expects the agent to remember what they said. The obvious ask — “just put three users in one session” — runs straight into ADK’s data model: a Session is identified by (app_name, user_id, session_id) and is explicitly a single conversation thread between a user and your agent. There is no participant list, no per-participant identity inside a session, and no built-in multi-party mode to switch on.

Pretending otherwise produces apps where everyone shares one identity, nobody’s turns can be attributed, and an access-control review becomes impossible. So this post takes the constraint as given and builds on top of it: three honest patterns for collaborative workspaces, the permission and audit implications of each, and the one scope trap — temp: — that people reach for when modeling participants and get wrong.

Prerequisites

  • ADK installed (pip install google-adk) and a Runner you have run at least once.
  • Comfort with session identity, user:/app: state prefixes, and events.
  • A product decision on what “shared” means: shared history, shared artifacts, or shared control — the patterns below serve different answers.

1. What the data model actually guarantees

Start from the contract, because every pattern is a consequence of it:

PropertyValueMulti-party implication
Identity(app_name, user_id, session_id)One user_id owns the thread; no second owner field
Historysession.events, one chronological logTurns are attributed to event.author — an agent name or 'user', never a second human
Statesession.state, scoped by prefixuser: keys attach to the user_id, not to participants
Scratchtemp: keysScoped to the invocation, not to a participant
ArtifactsArtifactService, session- or user-scopeduser:-prefixed filenames bind to the one user_id

The critical rows are the last two. temp: is invocation-scoped: everything from the agent receiving input to producing final output shares one InvocationContext — including across a parent agent and its sub-agents. It is not participant-scoped, so you cannot use it to give “just Alice’s turn” a private scratchpad while Bob is in the same invocation. And user: state follows the single user_id, so a workspace’s shared preferences cannot live there without binding them to whichever human happens to be the key.

2. Pattern A — one session per participant plus a coordination store

The cleanest fit for the data model: each human gets their own session, and an application-level store (a table, a Redis doc, a workspace object) holds what is genuinely shared.

from google.adk.sessions import DatabaseSessionService
from google.adk.runners import Runner

session_service = DatabaseSessionService(db_url="postgresql+asyncpg:///agent.db")

async def open_participant_thread(app_name: str, workspace_id: str, user_id: str):
    """Each participant's private thread with the agent."""
    return await session_service.create_session(
        app_name=app_name,
        user_id=user_id,                      # the real human
        state={
            "workspace:workspace_id": workspace_id,
            "workspace:role": await lookup_role(workspace_id, user_id),
        },
    )

Each participant runs their own Runner.run_async against their own session; the coordination store carries workspace membership, roles, and shared artifacts. Attribution is free — every event in a participant’s session belongs to that participant by construction — and deleting one person’s data is just §2 of any erasure flow, untouched by everyone else.

The cost is that shared context is not automatic. If Alice’s session learns something the workspace needs, you must propagate it explicitly: write it to the coordination store, then surface it into Bob’s session through an event, an instruction template, or a tool that reads the store.

3. Pattern B — one shared user_id for the workspace

If the product requirement is one shared thread — a single conversation everyone watches and can continue — model the workspace as the user:

async def open_workspace_session(app_name: str, workspace_id: str):
    # The workspace IS the identity for this pattern.
    return await session_service.create_session(
        app_name=app_name,
        user_id=f"workspace:{workspace_id}",
        state={
            "workspace:members": ["alice", "bob", "carol"],
            "workspace:active_speaker": "alice",
        },
    )

Participants are tracked in state (workspace:* keys here — deliberately unprefixed or app:-style, since user: would bind to the synthetic workspace identity), and the request layer stamps event.author or a metadata field with the acting human so the log stays attributable. This gives you a single history with zero propagation logic — the agent sees everything in one place.

The tradeoffs are sharp, and you should accept them knowingly: all participants share one identity, so per-user access control has to be enforced before the request reaches ADK (who may append a turn, who may read the thread), not inside the session; one person’s erasure request collides with everyone else’s history; and concurrent turns race on the same session — DatabaseSessionService serializes append_event with in-process plus row-level locking, so you get integrity, not interleaving guarantees for your UX.

4. Pattern C — separate sessions bridged by events and artifacts

A middle path: participants keep separate sessions (Pattern A’s isolation) and a bridge agent synchronizes between them by writing events and user-scoped artifacts that others read.

import google.genai.types as types
from google.adk.events import Event, EventActions

async def broadcast_decision(session_service, artifact_service,
                             app_name: str, member_ids: list[str],
                             decision: str) -> None:
    # 1. Persist the durable artifact once, in a shared scope.
    part = types.Part.from_bytes(data=decision.encode(), mime_type="text/plain")
    await artifact_service.save_artifact(
        app_name=app_name, user_id="workspace:shared",
        session_id="coordination", filename="decisions.md", artifact=part,
    )
    # 2. Fan out an event into each member's own session.
    for member in member_ids:
        session = await session_service.get_session(
            app_name=app_name, user_id=member, session_id=...,
        )
        await session_service.append_event(
            session,
            Event(
                invocation_id="bridge_sync",
                author="bridge",
                actions=EventActions(
                    state_delta={"workspace:last_decision": decision}
                ),
            ),
        )

The artifact is the single source of truth (versioned by the ArtifactService), and each member’s session receives a state-delta event pointing at it. This preserves per-user identity and per-user erasure while still giving the workspace a shared record — at the cost of you owning the sync logic and its failure modes.

5. Choosing: permission boundaries and auditability

The three patterns are not ranked; they answer different questions:

RequirementPattern A (per-participant)Pattern B (shared identity)C (bridged)
Single shared conversation viewNo — needs propagationYesPartial — via bridge
Per-user attribution in eventsAutomaticMust be stamped manuallyAutomatic
Per-user access controlNatural (separate sessions)Enforced at the request layerNatural
Per-user erasureCleanConflicts with shared historyClean
Concurrent turnsIndependentSerialized on one sessionIndependent
Shared context costExplicit propagationNoneBridge maintenance

Whichever you pick, two disciplines are non-negotiable. Permission boundaries belong outside the session: ADK does not check whether the requester may read or write a given key, so the calling layer must authorize append and read operations per participant — never assume holding the session_id implies membership. Auditability needs a stable actor field: because event.author records the agent that produced an event and 'user' for input, record the acting human in state or event metadata from the request layer, or your log cannot answer “who said this.”

And resist the temp: temptation from §1: it is invocation-scoped and vanishes when the turn ends, so it is useful for a single turn’s scratch work and useless as a participant’s private channel.

Checklist

  • The product has chosen one pattern deliberately — shared view, shared isolation, or bridged — and its tradeoffs are written down.
  • Participant identity is not conflated with the session’s single user_id.
  • The acting human is recorded per event (metadata or state) for audit, not inferred from event.author.
  • Access control — who may append, who may read — is enforced in the request layer before ADK sees the call.
  • Shared state uses deliberate keys (workspace:*), not user: (bound to one identity) or temp: (invocation-scoped).
  • Concurrent-turn behavior matches the pattern: independent sessions, or serialized appends via DatabaseSessionService.
  • Per-user erasure has been thought through for the chosen pattern, including Pattern B’s conflict with shared history.
  • Cross-session propagation (A/C) is explicit and tested, including what happens when it fails.
  • Artifacts shared across participants live in a scope all participants can legitimately read.

Conclusion

ADK gives you exactly one honest primitive for collaboration — a session per user_id — and every multi-party design is an arrangement around that fact. Give each participant their own session when isolation and attribution matter; collapse the workspace into a single identity when one shared thread matters; bridge sessions with events and artifacts when you want both. Whichever you choose, keep authorization outside the session, stamp the human actor yourself, and never mistake temp:’s invocation scope for a participant’s private space.

References