# Claude Managed Agents Environments
An **environment** is a container template for [[Claude Managed Agents|managed agent]] sessions. You create it once with `config` (type, packages, networking) and reference its ID when starting sessions. Each session gets its own **isolated container instance** — sessions never share filesystem state, even if they point at the same environment.
## Container basics
- Ubuntu 22.04 LTS, x86_64
- Up to 8 GB memory, 10 GB disk
- Network **disabled by default** unless the `networking` config enables it
## Pre-installed runtimes
Python 3.12+ (pip, uv); Node.js 20+ (npm, yarn, pnpm); Go 1.22+; Rust 1.77+; Java 21+ (maven, gradle); Ruby 3.3+; PHP 8.3+; C/C++ (GCC 13+).
Databases: SQLite available; `psql` and `redis-cli` clients for external connections (no servers running in-container by default).
Utilities: `git`, `curl`, `wget`, `jq`, `ripgrep`, `tree`, `htop`, `tmux`, `make`, `cmake`, `vim`, `nano`, archive tools, docker (limited).
## Packages field
Auto-installs before the agent runs. Cached across sessions that share the environment. Install order is alphabetical: apt, cargo, gem, go, npm, pip.
```json
{
"packages": {
"pip": ["pandas", "numpy==2.2.0"],
"npm": ["
[email protected]"],
"apt": ["ffmpeg"]
}
}
```
Version pinning is optional; default is latest.
## Networking modes
`networking` controls **container outbound access** — it does *not* constrain `web_search` / `web_fetch` tools' allowed domains.
| Mode | Behavior |
|---|---|
| `unrestricted` | Full outbound except a safety blocklist. Default. |
| `limited` | Only `allowed_hosts` (HTTPS-prefixed) plus optional `allow_package_managers` and `allow_mcp_servers` bypasses |
For production, always use `limited` and give only the minimum access the agent needs.
```json
{
"networking": {
"type": "limited",
"allowed_hosts": ["api.example.com"],
"allow_mcp_servers": true,
"allow_package_managers": true
}
}
```
## Lifecycle
- Environments persist until archived or deleted
- **Not versioned** — if you change an environment, you lose the ability to map session state back to the old config, so log updates externally
- `archive` makes it read-only but keeps existing sessions alive
- `delete` only works if no sessions still reference it
## References
- https://platform.claude.com/docs/en/managed-agents/environments
- Container reference: https://platform.claude.com/docs/en/managed-agents/cloud-containers
## Related
- [[Claude Managed Agents]]
- [[Claude Managed Agents Sessions]]