Skip to content

[Feature]: Host-bound per-user memory isolation (continuation of #555) #1030

Open

Description

@igs-rogenlo

Summary

Continue the opt-in per-user memory isolation proposal from #555, using a host-bound principal identity as the authority for both reads and writes. The generic capability is separate from deployment-specific bot lists and channel adapters.

#555 was closed as stale with a maintainer invitation to reopen or pursue a PR. #568 is closed and unmerged; its comments identified test, bypass-agent, vector-search, and migration problems. This issue does not claim that either closed case shipped a solution.

Problem and desired contract

One agent can serve several people. An agent-wide default scope alone does not define which person's private memory a particular tool invocation may access. Speaker attribution (#912) helps extraction, but does not authorize recall, modification, or deletion.

Provide an explicit, opt-in contract that resolves a stable principal from trusted host context and binds a request to its allowed scope set. The same decision should reach automatic capture/recall and explicit memory tools. Prompt text or a caller-provided scope string must not grant another user's access. A parsed session string alone should not be treated as an authenticated principal.

If trusted identity is absent, conflicting, revoked, or outside the configured agent/channel policy, the configured isolation policy should fail closed with a useful diagnostic. Shared/global scopes and administrative access need explicit policy rather than an implicit expansion of per-user access. Keep current agent-wide behavior when the option is disabled.

Implementation considerations

  • Use the host's supported identity/context boundary; coordinate with host capability work where necessary.
  • Apply one scope decision consistently to vector search, BM25, list, write, update, delete, dedup, and automatic hooks. Cover denied explicit cross-scope requests.
  • Preserve bypass-agent behavior and partial test fixtures deliberately; document any migration of existing agent-scoped memories and avoid silently granting wildcard reads.
  • Test two principals on the same agent, missing/revoked identity, ambiguous group contexts, explicit other-user scopes, shared-scope opt-in, and disabled-mode compatibility.

Evidence and limits

A deployment-specific prototype has 11 passing controlled source/dist recall-tool factory tests, including missing/invalid identity context and denied cross-scope cases. Those fixtures do not establish authenticated Gateway identity, all storage paths, or real multi-user end-to-end isolation. They are evidence for the proposal's boundaries, not a production security assurance or a complete upstream-ready implementation.

Please first agree on the host identity and scope contract. This is a feature continuation, not a claim that a documented existing per-user isolation guarantee is broken. No deployment-specific agent identifiers or session values are required for the public design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions