Defining the Input Schema
Every agent has an Input Schema, which tells it what kind of data to expect for a run. This schema is written using JSON Schema, a popular and standardized way to define the structure of JSON data. Let’s imagine we’re building a “Sales Lead Profiler” agent. We want to give it the name of a person and the company they work at, and optionally some other details. Here’s what the input schema would look like:- The input must be a JSON object.
nameandcompanyare required.jobTitle,website, andlinkedinUrlare optional.
Using Inputs in Your Goal Prompt
The real power of inputs comes from using them to dynamically control your agent’s behavior. You can reference the properties from your input schema directly in your agent’s Goal Prompt. We support Handlebars syntax for templating, so you can use{{ propertyName }} for placeholders and {{#if}}...{{/if}} for conditional logic.
Here’s how we could write the goal prompt for our Sales Lead Profiler:
We use Handlebars for templating, which means common blocks like
{{#if}}, {{#unless}}, and {{#each}} are all supported.