---
title: "List agent environment templates"
method: GET
path: "/agents/environments/templates"
tags: ["Agents"]
---

# List agent environment templates

`GET /agents/environments/templates`

Lists reusable environment templates without returning confidential values. See [reusing a hosted setup](https://developers.openai.com/api/docs/guides/agents-api/tools#reuse-a-hosted-plugin-setup).

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc' — The order in which paginated resources are returned.
- `after` string

## Response `200`

A page of environment templates.

- EnvironmentTemplateListResource — A page of Agents API resources, with IDs for retrieving additional pages.
  - `object` 'list', required — The object type, which is always `list`.
  - `data` EnvironmentTemplateResource[], required — The resources returned in this page, in the requested sort order.
    - `id` string, required — The ID of the reusable environment template.
    - `name` string, nullable, required — An optional human-readable display name for the template.
    - `object` 'agent.environment.template', required — The object type. Always `agent.environment.template`.
    - `created_at` integer, required — The Unix timestamp, in seconds, when the template was created.
    - `updated_at` integer, required — The Unix timestamp, in seconds, when the template was last updated.
    - `packages` EnvironmentPackagesResource, required — Packages installed in an OpenAI-hosted environment.
      - `python` string[], required — Python packages installed in the environment.
      - `system` string[], required — System packages installed in the environment.
      - `npm` string[], required — npm packages installed globally in the environment.
    - `network` NetworkPolicyResource, required — Network access for an OpenAI-hosted environment.
      - `access` 'enabled' | 'disabled' | 'restricted', required — The network access mode for an OpenAI-hosted environment.
      - `allowed_domains` string[], required — Domains the environment may access when network access is restricted.
    - `capability_directories` string[], required — Directories that expose capabilities to the agent.
    - `skills` HostedTemplateSkillResource[], required — Safe skill metadata, preserving unresolved version selectors.
      - union — Safe metadata for a skill configured by an environment template.
        - object — A skill resolved afresh from the Skills API whenever a session starts.
          - `type` 'skill_reference', required — The type of the object. Always `skill_reference`.
          - `skill_id` string, required — The referenced skill ID.
          - `version` string, nullable, required — The requested version selector, including `latest`.
        - object — Safe metadata for an inline skill archive.
          - `type` 'inline', required — The type of the object. Always `inline`.
          - `name` string, required — The skill name declared in `SKILL.md`.
          - `description` string, required — The skill description declared in `SKILL.md`.
    - `plugins` HostedPluginResource[], required — Safe plugin metadata, excluding inline archive contents.
      - `type` 'inline', required — The type of the object. Always `inline`.
      - `name` string, required — The installed plugin name.
      - `description` string, required — The installed plugin description.
    - `files` HostedTemplateFileResource[], required — Safe file metadata, excluding contents and session-scoped file IDs.
      - union — Safe metadata for a file configured by an environment template.
        - object — A project-scoped Files API reference resolved separately for each session.
          - `type` 'file_id', required — The type of the object. Always `file_id`.
          - `file_id` string, required — The ID of the uploaded file.
          - `path` string, required — The file's absolute path inside the environment.
        - object — Metadata for confidential inline file contents.
          - `type` 'inline', required — The type of the object. Always `inline`.
          - `path` string, required — The file's absolute path inside the environment.
          - `size_bytes` integer, required — The decoded size of the inline file in bytes.
  - `first_id` string, nullable, required — The ID of the first resource in `data`, or `null` if the page is empty.
  - `last_id` string, nullable, required — The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters.
  - `has_more` boolean, required — Whether there are more resources to retrieve after this page.

## Other responses

- `400` — The request was invalid.
- `401` — Authentication or project context was missing.
- `403` — The API key lacks the required management permission.
- `404` — The requested environment definition was not found.
- `500` — An internal error occurred.
- `503` — The service is temporarily unavailable.

## Changes

- **2026-09-10** `f2dae1a9aced` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openai/apis/openapi/changes/agents/environments/templates/get.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/openai/apis/openapi/revisions/c40bf0ba89d2?raw)
