Claudio.ManagedAgents.Environments (Claudio v0.7.0)

View Source

Managed Agents environments (/v1/environments) — the sandbox a session runs in: config is %{type: "cloud", networking: …, packages: …} or %{type: "self_hosted"}. Not versioned.

Beta managed-agents-2026-04-01, attached per request. Returns raw decoded bodies; see Claudio.ManagedAgents.

archive/2 makes an environment read-only (existing sessions continue); delete/2 works only while no session references it — otherwise the API returns an error.

{:ok, env} =
  Environments.create(client, %{
    name: "default",
    config: %{type: "cloud", networking: %{type: "unrestricted"}}
  })

Summary

Functions

Archives an environment (read-only; existing sessions continue).

Creates an environment. name is required by the API.

Deletes an environment. Fails while any session references it.

Retrieves an environment.

Lists environments. Options: limit, page, include_archived.

Updates an environment (POST /v1/environments/{id}).

Functions

archive(client, id)

Archives an environment (read-only; existing sessions continue).

create(client, params)

Creates an environment. name is required by the API.

delete(client, id)

Deletes an environment. Fails while any session references it.

get(client, id)

Retrieves an environment.

list(client, opts \\ [])

Lists environments. Options: limit, page, include_archived.

update(client, id, params)

Updates an environment (POST /v1/environments/{id}).