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
- Open Studio > Schema tab
- Click "Add Field"
- Configure field properties
- Set validation rules
- 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
| Type | Description | Example |
|---|---|---|
string | Text input | Company name |
number | Numeric input | Max tickets per day |
boolean | Checkbox | Enable notifications |
enum | Dropdown select | Industry selection |
array | Multiple values | Email 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
- Keep it minimal: Only ask for essential configuration
- Provide defaults: Make setup easier with sensible defaults
- Clear descriptions: Help users understand each field
- Validate early: Catch errors before deployment
Next: Learn about Orchestration rules.