FPO templates
An FPO template wraps a Full Product Object (FPO). Use it to publish a reusable product definition with values that you collect during import.
Use an FPO template when you need to:
- Keep the product structure stable.
- Collect names, URLs, API keys, or environment-specific values during import.
- Preview the product with
/nowbefore you create it.
Template shape
The public FPO template contract uses these top-level keys:
versionsets the template document format version. Use1.0or1.1.productObjectcontains the FPO.template.variablescontains metadata for each variable referenced in the FPO.
Set productObject.version to 1.0, 1.1, or 2.0. The 2.0 version is the default FPO version. In 2.0, place inline agent runtime fields under agent.config. In 1.0 and 1.1, place those fields directly on the agent object.
Use variable references in string values within the FPO:
The repository includes a complete example at docs/templates/quick-start/customer-support-fpo-template.json.
Variable manifest
Declare each variable in template.variables with the following fields:
Resolution rules
Resolve a template with these rules:
- Declare every
{{variableName}}reference in the manifest. - Do not use inline defaults such as
{{apiKey|default}}. - Define defaults with
template.variables[].defaultValue. - Do not define defaults for secret variables.
- Preserve the
numberorbooleanscalar type when a field value is exactly{{variableName}}. - Resolve every other substitution to a string.
Example template
Use this complete template as a starting point:
Add scheduled jobs
Use the top-level productObject.schedules[] array for cron or one-time automation. Each schedule targets a capability through capabilityId. Importing the FPO creates the schedule record.
Do not add a type: "schedule" surface to make a scheduled capability reachable. A schedule surface is an optional management or presentation container, not the trigger. The validator counts schedules[].capabilityId as a reachable capability.
Use the following structure to define a scheduled capability:
Add a schedule surface only when you need a dedicated surface for users or operators to inspect and manage schedule behavior.
Add eval suites
Use the optional top-level productObject.evals[] array to include eval suites in a product. Each suite targets a capability through capabilityId. Importing the FPO creates the suite, its graders, and its example cases with the capability’s flow or agent.
The following fields define an eval suite in an FPO:
Use the following structure to add an eval suite:
Re-importing or converging a product replaces only the cases that originally came from the FPO. Cases you author manually or save from a run in the dashboard are preserved, and those platform-authored cases are not exported back into the FPO when you pull the product definition.
For grader and case concepts, see What are Evals?. Use Managing eval suites to edit imported suites in the dashboard.
Add skills
Use the optional top-level productObject.skills[] array to include agent skills in a product. A skill is a loadable context bundle with a markdown body and optional capabilities that it activates when loaded. Importing the FPO publishes each skill and binds it to the agent-backed capabilities listed in bindTo.
The following fields define a skill in an FPO:
Do not declare mcpServers in a skill’s capabilities. The validator rejects the key with an explicit error. Bind MCP tools with a saved tool ID or an inline tool.
Use the following structure to add a skill:
Validate a template
Validate a template with POST /v1/public/products/validate-template before you publish it.
Send the template from TypeScript with this code:
Send the template file to the validation endpoint with this cURL request:
Replace YOUR_API_KEY with a Runtype API key.
The validation response reports the following results:
- Structural template errors.
- Undeclared variable references.
- Unused manifest variables.
- Normalized variable metadata.
- Whether defaults produce a valid resolved FPO without extra input.
Create a product from a template
After the template validates, follow these steps:
- Preview the template with
POST /v1/quick-start/imports/preview. - Collect missing variable values from the preview response.
- Create the product with
POST /v1/quick-start/create.
An inputType: "secret" variable is substituted literally into the resolved product object. Do
not put live secrets in template files or defaultValue. Provide the value at creation time, or
declare the credential in the target tool’s auth.secrets and reference it with {{ secret: KEY }}.
Next steps
Continue with these guides:
- Importing products: Preview and create products from hosted or pasted JSON.
- Quickstart: Make your first call to the Runtype API.
- Agent Skills: Bind loadable context bundles to agents.