> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobare.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List environment templates

> Deprecated alias for GET /agents.



## OpenAPI

````yaml /openapi.json get /v1/environment-templates
openapi: 3.1.0
info:
  title: Gobare Agent API
  version: v1
  description: >-
    Programmatic access to Gobare coding-agent sessions. Conceptually aligned
    with OpenAI's Agents API; deliberately not wire-compatible with it. See the
    divergence list in the product documentation.
servers:
  - url: https://api.{domain}
    variables:
      domain:
        default: gobare.dev
security: []
paths:
  /v1/environment-templates:
    get:
      summary: List environment templates
      description: Deprecated alias for GET /agents.
      operationId: get_environment_templates
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: How many to return, 1–100. Default 20.
        - name: after
          in: query
          required: false
          schema:
            type: string
          description: >-
            The `last_id` of the previous page. A cursor this collection cannot
            place — expired, deleted, or never issued — answers with an empty
            page rather than starting over, so a paging loop ends instead of
            repeating itself.
      responses:
        '200':
          description: Deprecated alias for GET /agents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentTemplateList'
        '400':
          description: >-
            `invalid_request`. A query parameter this endpoint does not take.
            Refused rather than ignored, because an ignored filter answers with
            everything and looks like a filter that matched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The access token is missing, unrecognised, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The token is valid but may not perform this call. The message names
            the scope it wanted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such endpoint, or the public API is not enabled on this
            deployment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            `rate_limit_exceeded`. The token is past its allowance for this
            bucket. Honour `Retry-After`; the `x-ratelimit-*` headers on every
            response say how close you were.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: An unexpected error. Quote the request id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: true
      security:
        - accessToken: []
components:
  schemas:
    EnvironmentTemplateList:
      type: object
      required:
        - object
        - data
      properties:
        object:
          type: string
          const: list
          description: >-
            Always `list`. Names the shape, so a value can be identified without
            knowing which call returned it.
        data:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentTemplate'
    Error:
      type: object
      required:
        - error
      description: Every refusal this API makes, in one shape.
      properties:
        error:
          description: Always present on a failure, and the only thing present.
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - authentication_error
                - permission_denied
                - not_found
                - method_not_allowed
                - conflict
                - queue_full
                - rate_limit_exceeded
                - project_limit_exceeded
                - context_length_exceeded
                - provider_error
                - provider_unauthorized
                - sandbox_error
                - sandbox_unavailable
                - directory_unavailable
                - workspace_recovery_failed
                - bridge_incompatible
                - internal_error
            message:
              type: string
            request_id:
              type: string
              description: >-
                Also on the x-request-id header. Quote it when reporting a
                problem.
    EnvironmentTemplate:
      type: object
      required:
        - object
        - id
        - name
      description: >-
        A named configuration copied into a session at creation. Changing or
        deleting it does not affect sessions already created from it.
      properties:
        object:
          type: string
          const: environment_template
          description: >-
            Always `environment_template`. Names the shape, so a value can be
            identified without knowing which call returned it.
        id:
          type: string
        name:
          type: string
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
          description: >-
            Tools every session started from this agent gets, unless it replaces
            them. Secrets are withheld — see `redacted` on an entry.
        text:
          type:
            - object
            - 'null'
          description: Output shaping copied into every session started from this agent.
        created_at:
          type: integer
    Tool:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
          enum:
            - mcp
            - function
        name:
          type: string
          description: 'Unique across both types: the agent sees one list.'
        url:
          type: string
          description: 'mcp: the server''s address. Exclusive with `command`.'
        command:
          type: string
          description: 'mcp: a command run inside the sandbox. Exclusive with `url`.'
        args:
          type: array
          items:
            type: string
          description: 'mcp: arguments for `command`.'
        allowed_tools:
          type: array
          items:
            type: string
          description: >-
            mcp: restrict the agent to these tools from this server. Absent
            means all of them.
        required:
          type: boolean
          description: >-
            mcp: the session fails if this server will not connect. Absent means
            optional, which produces an `mcp.unavailable` event instead.
        redacted:
          type: array
          items:
            type: string
          description: >-
            Names of the secret values withheld from this response, such as
            `authorization` or `headers.x-api-key`. Not a request field: sending
            it back is refused, so an edited read-back cannot silently drop your
            credentials.
        description:
          type: string
          description: 'function: what the function is for. The model reads it.'
        parameters:
          type: object
          description: 'function: a JSON Schema for the arguments. Carried unexamined.'
        timeout_seconds:
          type: integer
          description: 'function: how long to wait for your process to answer this call.'
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: >-
        A `gbr_pat_` access token. Scopes are recorded on the token when it is
        minted.

````