> ## 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.

# Full AgentData JSON Schema for the agent form

> Return the full :class:`AgentData` JSON Schema.

Superset of the legacy sectioned endpoint. The response body is a
single ``schema`` field carrying the whole Pydantic-generated
schema of :class:`AgentData`, with two curated exclusions handled
at the model layer (so no post-processing is needed here):

- ``id``: server-assigned, marked :class:`SkipJsonSchema` on
  :attr:`AgentData.id`.
- ``context_config.summary_schema``: internal structured-output
  spec for the compression model, dropped below since it is not
  user-editable and there is no equivalent hook on the Pydantic
  side.

``$ref`` inlining is delegated to
:func:`~agentscope._utils._common._flatten_json_schema` so the
frontend can render every property from the response body alone.

The frontend derives its section grouping (identity / context /
react / invite) directly from this schema — top-level scalar
properties are the "identity" section, and top-level nested-object
properties each become their own section. Adding a new
user-editable field to :class:`AgentData` is thus enough to have it
appear in the create / edit form without a router change.

Returns:
    `AgentSchemaV2Response`:
        ``schema`` = the full :class:`AgentData` JSON Schema.



## OpenAPI

````yaml /versions/2.0.4/en/deploy/openapi.json get /agent/schema/v2
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.4
servers: []
security: []
paths:
  /agent/schema/v2:
    get:
      tags:
        - agent
      summary: Full AgentData JSON Schema for the agent form
      description: |-
        Return the full :class:`AgentData` JSON Schema.

        Superset of the legacy sectioned endpoint. The response body is a
        single ``schema`` field carrying the whole Pydantic-generated
        schema of :class:`AgentData`, with two curated exclusions handled
        at the model layer (so no post-processing is needed here):

        - ``id``: server-assigned, marked :class:`SkipJsonSchema` on
          :attr:`AgentData.id`.
        - ``context_config.summary_schema``: internal structured-output
          spec for the compression model, dropped below since it is not
          user-editable and there is no equivalent hook on the Pydantic
          side.

        ``$ref`` inlining is delegated to
        :func:`~agentscope._utils._common._flatten_json_schema` so the
        frontend can render every property from the response body alone.

        The frontend derives its section grouping (identity / context /
        react / invite) directly from this schema — top-level scalar
        properties are the "identity" section, and top-level nested-object
        properties each become their own section. Adding a new
        user-editable field to :class:`AgentData` is thus enough to have it
        appear in the create / edit form without a router change.

        Returns:
            `AgentSchemaV2Response`:
                ``schema`` = the full :class:`AgentData` JSON Schema.
      operationId: get_agent_schema_v2_agent_schema_v2_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSchemaV2Response'
        '404':
          description: Not found
components:
  schemas:
    AgentSchemaV2Response:
      properties:
        schema:
          additionalProperties: true
          type: object
          title: Schema
          description: >-
            Full :class:`AgentData` JSON Schema. All user-editable fields appear
            as top-level entries in ``properties`` — the frontend derives its
            section grouping from this single schema.
      type: object
      required:
        - schema
      title: AgentSchemaV2Response
      description: |-
        Response for ``GET /agent/schema/v2``.

        Wraps the full :class:`AgentData` JSON Schema in a single
        ``schema`` field so the frontend can render every user-editable
        property without the router having to enumerate them.

````