Document agent-owned memory as a third memory scope - #16
Open
mamigot wants to merge 1 commit into
Open
Conversation
The memory docs described two scopes, and both were user-scoped: global
user memories (the user, across all agents) and agent-specific memories
(the user, within one agent). Every endpoint reflected that, nested under
/users/{user_id}/.
Agents also hold memory of their own — what the agent has learned doing
its job, shared across every user who talks to it. An agent used by a
whole office should not re-learn the same thing once per person, and
duplicating that knowledge into each user's memory multiplies storage,
drifts as it is corrected in one place and not others, and leaks one
person's context into another's profile.
Adds the third scope to both the developer reference and the product
docs: what belongs there versus in user memory, why it is separate, and
the governance that follows from entries being visible to everyone
(no personal data, admin-reviewable, audited, scoped to one agent).
Agent-owned memory endpoints are agent-scoped rather than user-nested,
following the same shape as memory-categories. The exact route slugs are
not listed yet and the note says so explicitly, so nobody infers a wrong
path from the pattern.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The memory docs described two scopes — and both were user-scoped. Every endpoint in
developer/agents/memory.mdis nested under/orgs/{org}/users/{user_id}/:/users/{user_id}/global-memories//users/{user_id}/agents/{mentor_id}/agent-memories/"Agent-specific" reads like agent-owned but isn't — it is still keyed to a person; it's what the agent remembers about you.
Agents also hold memory of their own: what the agent has learned doing its job, shared across everyone who talks to it. An agent used by a whole office shouldn't re-learn the same thing once per person, and pushing that knowledge into each user's memory instead multiplies storage, drifts as it is corrected in one place and not others, and leaks one person's context into another's profile.
It is also the correct home for knowledge that otherwise gets pushed somewhere it doesn't belong — notably the ontology layer, which is a pass-through to the systems it references and stores nothing of its own.
What changed
developer/agents/memory.mdSubjectcolumn making explicit which are about a user and which is about the agent./users/{user_id}/, agent-scoped under/orgs/{org}/agents/{agent}/.os/agent-settings/memory.mdPlease check before merging
The route slugs are deliberately not listed. The doc states they are agent-scoped and being finalized, and explicitly tells readers not to infer them from the pattern. If the real endpoints exist, please add them — I did not want to publish a path that returns 404.
Two other things worth a maintainer's eye:
os/section describes intended behaviour ahead of the UI.Related:
/api/ai-mentor/orgs/{org}/metadata/(create/update metadata for a mentor) is agent-scoped and user-independent, and has no doc page inos/ordeveloper/. Worth documenting separately.🤖 Generated with Claude Code