Skip to content

[pull] main from anthropics:main#89

Merged
pull[bot] merged 9 commits into
code:mainfrom
anthropics:main
Apr 28, 2026
Merged

[pull] main from anthropics:main#89
pull[bot] merged 9 commits into
code:mainfrom
anthropics:main

Conversation

@pull

@pull pull Bot commented Apr 28, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

claude and others added 9 commits April 25, 2026 00:08
A guided tutorial showing how to give a Managed Agent a memory store so
it learns and recalls a customer's shopping preferences across separate
sessions. Covers store creation, the resources attachment with
per-attachment instructions, inspecting and seeding memories from your
own application, and combining a per-customer read-write store with a
brand-wide read-only store.

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
- Prefer uv add over pip in the prerequisites
- Clarify that the agent_toolset_20260401 type string identifies the
  toolset, not a model, and does not need bumping
- Drop unused reply variable from the second run_turn call

Intentionally skip the dotenv suggestion: the other managed_agents
notebooks set up the client without load_dotenv, so adding it here
would be the inconsistent choice.

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
- Guard the session.status_idle break on stop_reason.type == "end_turn"
  so the pattern is safe to copy into custom-tool agents
- Import wait_for_idle_status from utilities and call it before each
  sessions.archive() to absorb the SSE-vs-status race
- Use environments.archive instead of environments.delete
- Define MODEL via the COOKBOOK_MODEL env var like the other CMA
  notebooks and pass it to agents.create
- Seed cell: capture the return, print the seeded path, and note that
  it must run before the cleanup cell that deletes the store

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
- run_turn: handle session.status_terminated and call
  wait_for_idle_status before returning, mirroring
  utilities.stream_until_end_turn; drop the now-redundant
  wait_for_idle_status calls from the cleanup cell
- environments.create: pass an explicit cloud/limited config
- agent_toolset_20260401: include the default_config block with
  permission_policy always_allow, matching every other CMA notebook
- Seed section: explain that production seeding happens before any
  sessions, and add the cell's stdout so it doesn't look un-run

Not changed: the end_turn-guarded idle break stays as-is. Reverting it
to an unconditional break would undo the previous round's fix and
diverge from utilities.stream_until_end_turn.

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
…ookbook

Pass agent={"type": "agent", "id": agent.id, "version": agent.version}
instead of the bare agent.id, matching every other notebook in the
managed_agents series.

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
The illustrative markdown snippet under "Combine per-customer and
shared stores" still passed agent=agent.id while the runnable cells
were already using the pinned dict form. Align the snippet so readers
copying the production pattern get the same version-pinned shape.

https://claude.ai/code/session_01VkfVPdiJTWVh6Vj5owqRXH
- Add wait_for_idle_status calls before session archive in cleanup
- Break out of run_turn on any status_idle, not just end_turn
- Guard event.input against None in tool_use handler
- Move seeding-order warning to a markdown Note callout
- Add %pip install cell for minimum SDK version
- Link to sibling CMA notebooks from the summary
- Simplify status_idle handler to a single unconditional break
- Document run_turn return value in the docstring
- Restore inline 'Optional: run before cleanup' hint in the seeding cell
- Add catalog store cleanup reminder to the combine-stores snippet
- Tighten registry description and intro phrasing
…r-ZRx6N

feat(managed_agents): add Managed Agents Memory Cookbook
@pull pull Bot locked and limited conversation to collaborators Apr 28, 2026
@pull pull Bot added the ⤵️ pull label Apr 28, 2026
@pull pull Bot merged commit 33424c3 into code:main Apr 28, 2026
6 of 7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants