---
title: "Create or edit a schema"
slug: "create-or-edit-a-schema"
abstract: "How to create and edit reusable JSON schemas that agents use to generate consistent outputs."
---
# Create or edit a schema

Schemas are configured by admins to define the structure of agent outputs. Once created, they can be reused across Agentic studio when [creating standard agents](https://doc.sitecore.com/sai/en/users/sitecoreai/working-with-agentic-studio/understanding-agents/create-a-standard-agent.html "Create a standard agent") or [configuring parameters](https://doc.sitecore.com/sai/en/users/sitecoreai/working-with-agentic-studio/understanding-agents/create-a-workflow-agent/create-a-workflow-agent.html#configure-parameters "Configure parameters") in workflow agents. Admins can update schemas at any time.

For more information about schemas, see [agent configuration tabs](https://doc.sitecore.com/sai/en/users/sitecoreai/working-with-agentic-studio/understanding-agents/create-a-workflow-agent/overview-of-agent-configuration-tabs.html#schemas). 

## Create a schema

Admins can create schemas to define structured JSON formats for agent outputs.

To create a schema:

1. In the navigation menu, click **Agentic** and then, in the left sidebar, click :mdiCodeBraces: **Schemas**.
2. On the **Schemas** page, click **Add schema**.
3. In the right pane, provide the following:
    - **Name** - the schema name. **ID** is generated automatically.
    - **Description** (optional) - what the schema is used for.
    - **Tags** (optional) - add labels to categorize the schema.
4. Define the JSON structure for the output. You can use **Simple** mode or **Advanced** mode to define the schema manually using either the :mdiXml: **Code** or :mdiEyeOutline: **Visual** editor.

    You can define the structure by:

    - Specifying required fields to ensure essential content is always included.
    - Defining data types (for example, `string`, `array`, or `object`).
    - Adding descriptions to guide how agents generate content.
    - Configuring validation rules to control output quality.

    Example

    The following schema defines the structure of a LinkedIn post:

    ```json
    {
      "type": "object",
      "properties": {
        "body": {
          "type": "string",
          "description": "Main content (max 3000 characters)"
        },
        "hashtags": {
          "type": "array",
          "description": "Relevant hashtags (3-5 recommended)",
          "items": {
            "type": "string"
          }
        },
        "headline": {
          "type": "string",
          "description": "Attention-grabbing headline or opening line"
        },
        "mentions": {
          "type": "array",
          "description": "People or companies to tag",
          "items": {
            "type": "string"
          }
        },
        "call_to_action": {
          "type": "string",
          "description": "Clear call-to-action"
        }
      },
      "required": [
        "body",
        "hashtags",
        "headline",
        "mentions",
        "call_to_action"
      ],
      "additionalProperties": false
    }
    ```

    This schema ensures each post includes all required sections and follows a consistent structure. When used with a template, the output can also be automatically formatted.

5. Click **Save**.

## Edit a schema

Admins can update an existing schema to refine its structure or metadata.

To edit a schema:

1. In the navigation menu, click **Agentic** and then, in the left sidebar, click ::mdiCodeBraces:: **Schemas**.
2. On the **Schemas** page, find the schema you want to edit.
3. Click the **Actions** :mdiDotsHorizontal: > **Edit**.
4. Update the schema details or JSON structure as needed.
5. Click **Save**.