Environment

更新时间:
复制 MD 格式

A runtime environment defines the execution sandbox and pre-installed dependencies used for tool calls. Environments are managed independently of agents and can be reused across sessions.

Lifecycle

  • The update endpoint uses full-replacement semantics; omitted fields are cleared. Running sessions bound to this environment use the snapshot captured at bind time and are unaffected by updates.

  • Archive is a soft operation: archived_at is set to the archive time. Archived environments are hidden from list results by default but can still be queried; bound sessions continue to work.

  • Delete is a hard operation; environment configuration is removed and cannot be recovered.

Environment operations

Operation

Endpoint

Description

Create an environment

POST /environments

Create a runtime environment; specify sandbox type and pre-installed dependencies.

Retrieve Environment

GET /environments/{environment_id}

Get environment details.

List Environments

GET /environments

Paginated list of environments under the workspace; archived environments are excluded by default.

Update Environment

POST /environments/{environment_id}

Full-replacement update; running sessions use the snapshot bound at creation and are unaffected.

Archive Environment

POST /environments/{environment_id}/archive

Soft archive; hidden from list results by default, bound sessions remain available.

Delete Environment

DELETE /environments/{environment_id}

Hard delete; configuration is removed and cannot be recovered.