Skip to main content

Schema Builder

The Schema Builder lets you define configuration schemas that users must complete when deploying your template.

Overview

Configuration schemas:

  • Define required setup fields
  • Validate user input
  • Customize agent behavior at deployment

Building a Schema

Via Dashboard

  1. Open Studio > Schema tab
  2. Click "Add Field"
  3. Configure field properties
  4. Set validation rules
  5. Preview the onboarding form

Via API

const agent = await client.agents.update('agent-123', {
onboardingSchema: {
type: 'object',
required: ['company_name', 'support_email'],
properties: {
company_name: {
type: 'string',
title: 'Company Name',
description: 'Your company name for personalization'
},
support_email: {
type: 'string',
format: 'email',
title: 'Support Email',
description: 'Email for escalations'
},
support_hours: {
type: 'string',
title: 'Support Hours',
default: '9 AM - 5 PM',
description: 'When support is available'
},
industry: {
type: 'string',
title: 'Industry',
enum: ['technology', 'finance', 'healthcare', 'retail', 'other']
}
}
}
});

Field Types

TypeDescriptionExample
stringText inputCompany name
numberNumeric inputMax tickets per day
booleanCheckboxEnable notifications
enumDropdown selectIndustry selection
arrayMultiple valuesEmail recipients

Validation

Required Fields

{
"required": ["company_name", "support_email"]
}

Format Validation

{
"support_email": {
"type": "string",
"format": "email"
},
"website": {
"type": "string",
"format": "uri"
}
}

Pattern Validation

{
"phone": {
"type": "string",
"pattern": "^\\+?[1-9]\\d{1,14}$"
}
}

Using Schema Values

Reference schema values in prompts:

Company: {{company_name}}
Support Email: {{support_email}}
Hours: {{support_hours}}

Best Practices

  1. Keep it minimal: Only ask for essential configuration
  2. Provide defaults: Make setup easier with sensible defaults
  3. Clear descriptions: Help users understand each field
  4. Validate early: Catch errors before deployment

Next: Learn about Orchestration rules.