Skip to main content
A schema defines the data a workflow extracts. It lists each field’s name, data type, and description. You can reuse one schema across many workflows. For example, to extract store locations from 5 different websites, create one schema and use it for all of them.

How the agent builds a schema

When you create a workflow with Kadoa’s agent, it builds the schema for you.
  • If you name the fields in your prompt, for example “extract title, price, and rating”, the agent uses exactly those.
  • If you don’t, the agent recommends fields based on the source.
Either way, you can adjust every field before you approve the workflow. In the dashboard, the schema lives in the workflow’s Schema tab. The Pipeline tab shows how fields are transformed after extraction. Schema tab with four fields and the Reorder and JSON controls. A key icon marks the productSlug key field, and the expanded title field shows its type, description, example, and edit and delete icons.
If your workflow uses a template, the template manages its schema. Edit the schema in the template instead.

Field kinds

Every field gets its value in one of three ways. In the SDK and API, each kind has its own shape:

Function fields

A function field holds a value Kadoa computes instead of reading it from the page. Each function has an output data type. Functions marked AI use a model on every record.
  • Custom categories puts each record into one of the categories you define, for example sentiment or priority.
  • Unique ID gives each record a stable identifier. It works well as a key field.
Custom categories is available to every team. Other functions depend on your team. The editor lists only the functions your team can use.
To add one, see Add a function field.

Source fields

A source field keeps raw page content next to the extracted data. It holds the page URL, the full HTML, or the full Markdown of each page. The schema editor does not add source fields. Add them with the SDK or API, as shown in Add a source field. Every schema has key fields that identify a record across runs.

Transformations

Some workflows transform data after extraction, for example to categorize records or compute derived fields. A transformation reads input fields as context and produces output fields. Each output field has a summary of how it is computed, when one is available. To review a workflow’s transformation:

Create or edit fields

To edit a field:
  1. Open the workflow and select the Schema tab.
  2. Select the field to see its details.
  3. Select the pencil icon to open the inline edit form.
  4. Change the field and select Done.
  5. Select Save changes.
To add a field:
  1. In the Schema tab, select Add field.
  2. Select a data type for a value the agent reads from the page.
  3. Enter the Field name, Description, and Example, then select Done.
  4. Select Save changes.
To edit all fields at once, select JSON. To change the field order, select Reorder.

Add a function field

  1. In the Schema tab, select Add field.
  2. Select a function, such as Custom categories or Unique ID. Each function shows its output type. Functions marked AI use a model on every record.
  3. Configure the function and select Done.
  4. Select Save changes.

Add a source field

You add source fields with the SDK or API. The dashboard schema editor does not add them. Add a SCHEMA field with params.sourceKey instead of an extraction instruction. These source keys are supported:

Reuse a schema

To reuse a schema across workflows, save it in a template. A template packages a prompt, schema, data quality rules, and notification settings into one versioned unit.
  1. Open Templates and select Create template.
  2. Define your fields in the Schema tab.
  3. When you create a workflow, select the template to pre-fill its schema.
To start from an existing workflow’s schema, open the workflow menu and select Save as template.After you publish a new template version, apply it to the linked workflows. See Update a template.

Manage saved schemas

You manage saved schemas with the SDK or API.

Get a schema

Retrieve an existing schema by ID:

Update a schema

Change a schema’s name, entity, or fields:

Delete a schema

Remove a schema you no longer need:
Deleting a schema does not affect existing workflows or extractions created with it.

Data types

Each extracted field has a data type. Kadoa uses it to extract and validate the value.

Data type formats

Some data types return structured values:
The amount field is always in the smallest currency unit, for example cents for USD and pence for GBP.
For help with a custom schema, contact support.