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

# [Deprecated] Legacy sectioned schema — use /schema/v2

> Return the legacy sectioned JSON Schema fragments.

.. deprecated::
    Superseded by :func:`get_agent_schema_v2`, which returns the
    full :class:`AgentData` schema in a single ``schema`` field.
    Kept for backwards compatibility with existing API consumers.
    New consumers should call ``GET /agent/schema/v2``.

The frontend previously used three sections — identity, context
config, and react config — so we return them as separate
self-contained schemas rather than a single :class:`AgentData`
schema with ``$ref`` s.

Returns:
    `AgentSchemaResponse`:
        Schemas for the three form sections.



## OpenAPI

````yaml /versions/2.0.4/en/deploy/openapi.json get /agent/schema
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.4
servers: []
security: []
paths:
  /agent/schema:
    get:
      tags:
        - agent
      summary: '[Deprecated] Legacy sectioned schema — use /schema/v2'
      description: |-
        Return the legacy sectioned JSON Schema fragments.

        .. deprecated::
            Superseded by :func:`get_agent_schema_v2`, which returns the
            full :class:`AgentData` schema in a single ``schema`` field.
            Kept for backwards compatibility with existing API consumers.
            New consumers should call ``GET /agent/schema/v2``.

        The frontend previously used three sections — identity, context
        config, and react config — so we return them as separate
        self-contained schemas rather than a single :class:`AgentData`
        schema with ``$ref`` s.

        Returns:
            `AgentSchemaResponse`:
                Schemas for the three form sections.
      operationId: get_agent_schema_agent_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSchemaResponse'
        '404':
          description: Not found
      deprecated: true
components:
  schemas:
    AgentSchemaResponse:
      properties:
        identity:
          additionalProperties: true
          type: object
          title: Identity
          description: >-
            Schema for the agent's identity fields (``name``,
            ``system_prompt``).
        context_config:
          additionalProperties: true
          type: object
          title: Context Config
          description: Schema for ``ContextConfig``.
        react_config:
          additionalProperties: true
          type: object
          title: React Config
          description: Schema for ``ReActConfig``.
      type: object
      required:
        - identity
        - context_config
        - react_config
      title: AgentSchemaResponse
      description: |-
        **Deprecated.** JSON Schema fragments used by the frontend to
        render the agent create / edit forms.

        Superseded by :class:`AgentSchemaV2Response`, which returns the full
        :class:`AgentData` JSON Schema in a single ``schema`` field so newly
        added agent fields (like the ``invite_config`` sub-model) reach the
        frontend automatically without the router having to know about them.

        The frontend previously split :class:`AgentData` into three
        hand-picked sections (``identity``, ``context_config``,
        ``react_config``) here, which required a router edit every time a
        new user-editable field landed on :class:`AgentData`. Kept for
        backwards compatibility with pre-v2 API consumers.

````