The whole hunk
from line 32, old and new numbered
/
lines
from line 32
32321. Copy the agent ID and [environment ID](https://platform.claude.com/docs/en/managed-agents/environments) from Console.
33332. Reference them in your code when [creating sessions](https://platform.claude.com/docs/en/managed-agents/sessions):
3434
35<CodeGroup defaultLanguage="CLI">
35<CodeGroup>
3636 ```bash cURL
37 session=$(curl -fsSL https://api.anthropic.com/v1/sessions \
37 curl -fsSL https://api.anthropic.com/v1/sessions \
3838 -H "x-api-key: $ANTHROPIC_API_KEY" \
3939 -H "anthropic-version: 2023-06-01" \
4040 -H "anthropic-beta: managed-agents-2026-04-01" \
from line 43
4343 "agent": "agent_01J8XkN5uT3vHpLqRfWdY2",
4444 "environment_id": "env_01K2mPsT7hNwR4jXuLvCqD8",
4545 "title": "My first session"
46 }')
46 }'
4747 ```
4848
4949 ```bash CLI