OverviewMembers

Claude Managed Agents PHP SDK guide

Managed Agents for PHP is a reference file in Anthropic's claude-api skill for PHP developers working with Claude Managed Agents. It installs anthropic-ai/sdk with Guzzle through Composer, builds a Client from ANTHROPIC_API_KEY or an explicit key, then creates an environment and an agent you reuse by ID.

What it does

Its PHP snippets call $client->beta->environments->create with a cloud config and limited networking, print the env ID, and show the agent creation step that has to come first.

How to use it

Claude Code loads it for PHP Managed Agents work. Create the agent once, then pass its ID to each sessions->create call.

Requirements and limits

Bindings missing from the page should be checked in the PHP SDK repo or the docs it points to, not extrapolated from other languages.

More in Overviews and the Claude Code library.

What it covers

  • Installation
  • Client Initialization
  • Create an Environment
  • Create an Agent required first step
  • Minimal
  • Updating an Agent
  • Send a User Message
  • Stream Events SSE
  • Reconnecting and Tailing
  • 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/php/managed-agents/README.md

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

Related entries