OverviewMembers

Claude Managed Agents Python SDK guide

Managed Agents for Python is a reference file in Anthropic's claude-api skill for Python developers building on Claude Managed Agents. It installs the anthropic package, creates a client from environment credentials, sets up a cloud environment with limited networking, and creates a persistent agent that each session references by its ID.

What it does

Code calls client.beta.environments.create, prints the env ID, then agents.create. It recommends keeping agent and environment definitions as version-controlled files synced with the ant CLI.

How to use it

Claude Code consults it for Python Managed Agents code. Keep agents.create out of the request path and reuse the stored ID.

Requirements and limits

Anything not shown should come from the Python SDK repo or the live docs, per the file's own warning.

More in Overviews and the Claude Code library.

What it covers

  • Installation
  • Client Initialization
  • Create an Environment
  • Create an Agent required first step
  • Minimal
  • With system prompt and custom tools
  • Send a User Message
  • Define an Outcome default kickoff for one deliverable
  • Stream Events SSE
  • Provide Custom Tool Result

The full text is in the members library

Book a call and we will give you access to the full Claude Code library: every entry in full, search by meaning, copy and download.

Source and license

Source: https://github.com/anthropics/skills/blob/main/skills/claude-api/python/managed-agents/README.md

Author: anthropics, Anthropic skills. License: Apache-2.0.

Related entries