Skip to content
Talk to our solutions team

AI Task Reference

The AI tasks available to flows and harnesses, with every parameter — type, whether it is required, its default — and worked examples.

Model calls resolve through the AI Gateway, so a task’s model traffic is subject to the same aliases, budgets and cost accounting as any other call on the platform.

LLM chat and completion requests with model selection, context management, and parallel execution support.

ParameterTypeRequiredDefaultDescription
typestringNocompletionRequest type: chat, completion, or gateway
promptstring/listYes*Prompt text(s) for completion mode. Supports Liquid templates
messageslistYes*Chat messages for chat mode. Each entry has role and content
selectionmapNo{}Model selection criteria: cost, time, accuracy, model
temperaturefloatNo1.0Sampling temperature
maxtokensintNo200Maximum tokens to generate
choicesintNo1Number of response choices
setkeystringNoEnvironment key to store the response
contextlimitintNo2000Maximum context token limit
contextkeystringNoEnvironment key for context maps
contextfieldstringNoField within context maps containing context text
linksfieldstringNoField within context maps containing source URLs
promptkeystringNoKey to rank context maps against
stopstringNoStop token sequences
urlstringNoCustom endpoint URL
responsekeystringNoKey to extract from response
timeoutintNo500Request timeout in seconds
parallelintNo-1Number of parallel requests (-1 = sequential)

* prompt is required for completion mode; messages is required for chat mode.

tasks:
- name: ask
chat:
type: chat
messages:
- role: system
content: "You are a helpful assistant."
- role: user
content: "{{user.prompt}}"
selection:
model: gpt-4
maxtokens: 500
setkey: chatresult
outputs:
- next
tasks:
- name: complete
chat:
type: completion
prompt: "Summarize the following text: {{context}}"
selection:
accuracy: high
temperature: 0.7
maxtokens: 300
setkey: summary
outputs:
- next
tasks:
- name: answer
chat:
type: chat
messages:
- role: system
content: "Answer based on the provided context."
- role: user
content: "{{user.question}}"
selection:
model: gpt-4
contextkey: searchresults
contextfield: scraped_data
linksfield: url
contextlimit: 4000
maxtokens: 1000
setkey: answer
outputs:
- respond

LLM chat and completion functions.

Scope: System

Note: llm.chat and llm.complete require a pipeline environment with ProxySelector for model routing. Use the YAML interface for full functionality.

FunctionDescription
llm.chat()LLM chat completion
llm.complete()LLM text completion

Tokenize text data and generate vector embeddings in a two-step process. First tokenizes (splits) input data using a configurable tokenizer, then generates embeddings for each chunk via an embedding model endpoint.

ParameterTypeRequiredDefaultDescription
datastringYesEnvironment key referencing the data to embed. Supports Liquid templates
setkeystringNoEnvironment key to store the embeddings result
typestringNoEmbedding type (e.g. openai) to determine API endpoint
defaulturlstringNodataDefault key name for single-string input
tokenizermapYesTokenizer configuration (see below)
embeddermapYesEmbedder configuration (see below)
timeoutintNo500Request timeout in seconds per embedding call
FieldTypeDescription
selection.modelstringTokenizer model: string-splitter or length-splitter
params.stringstringDelimiter for string-splitter
params.lengthintChunk size for length-splitter
FieldTypeDescription
selectionmapModel selection criteria: cost, time, accuracy, model
tasks:
- name: embed-text
embed:
data: scraped
setkey: embeddings
type: openai
tokenizer:
selection:
model: string-splitter
params:
string: "\n\n"
embedder:
selection:
model: text-embedding-ada-002
outputs:
- store
tasks:
- name: embed-text
embed:
data: scraped
setkey: embeddings
tokenizer:
selection:
model: length-splitter
params:
length: 500
embedder:
selection:
model: text-embedding-ada-002
outputs:
- store

See the embed namespace documentation and the embeddata task for related functionality.

Generate vector embeddings from text data via a REST embedding API. Supports splitting input data by delimiter or character length before embedding.

ParameterTypeRequiredDefaultDescription
datastringYesEnvironment key referencing the data to embed. Supports Liquid templates
setkeystringNoEnvironment key to store the embeddings result
selectionmapNo{}Model selection criteria: cost, time, accuracy, model
typestringNoEmbedding type (e.g. openai) to determine API endpoint
splitterstringNoDelimiter string to split data before embedding
limitintNo0Character length to split data into chunks
defaulturlstringNodataDefault key name for single-string input
timeoutintNo500Request timeout in seconds
tasks:
- name: generate-embeddings
embeddata:
data: scraped
selection:
model: text-embedding-ada-002
type: openai
splitter: "\n\n"
setkey: embeddings
outputs:
- store
tasks:
- name: generate-embeddings
embeddata:
data: scraped
selection:
model: text-embedding-ada-002
limit: 1000
setkey: embeddings
outputs:
- store

Embedding generation and text splitting functions.

Scope: System

Note: embed.generate requires a pipeline environment with ProxySelector. The embed.split function works without a pipeline environment.

FunctionDescription
embed.generate()Generate embeddings (requires pipeline)
embed.split()Split text data by delimiter or length

LLM safety classification using Llama Guard. Classifies user prompts (pre-guard) or agent responses (post-guard) against unsafe content categories (S1–S11). Returns safe, unsafe (with violated categories), or unknown.

ParameterTypeRequiredDefaultDescription
user-promptstringYes*User prompt to classify (pre-guard). Supports Liquid templates
agent-responsestringYes*Agent response to classify (post-guard). Supports Liquid templates
selectionmapNo{}Model selection criteria for the guard model
unsafe-categorieslistNoall (S1–S11)Subset of categories to check
error-responsestringNoResponse message when content is unsafe. Supports Liquid templates
error-triggerstringNoJavaScript code to execute when content is unsafe
setkeystringNoEnvironment key to store the guard result
continueonerrorboolNotrueIf true, returns success even when content is unsafe
temperaturefloatNo1.0Guard model temperature
maxtokensintNo200Guard model max tokens
contextlimitintNo2000Maximum context token limit
timeoutintNo500Request timeout in seconds

* At least one of user-prompt or agent-response is required.

CategoryDescription
S1Violent Crimes
S2Non-Violent Crimes
S3Sex Crimes
S4Child Exploitation
S5Specialized Advice
S6Privacy
S7Intellectual Property
S8Indiscriminate Weapons
S9Hate
S10Self-Harm
S11Sexual Content

The guard task is registered under two task keys:

Task KeyUsage
pre-guardCheck user input before processing
post-guardCheck agent output before delivery
tasks:
- name: safety-check
pre-guard:
user-prompt: "{{user.message}}"
selection:
model: llama-guard
unsafe-categories:
- S1
- S4
- S9
error-response: "Your message was flagged as unsafe."
setkey: guardresult
outputs:
- process
tasks:
- name: output-check
post-guard:
agent-response: "{{chatresult.choices[0].message.content}}"
selection:
model: llama-guard
error-response: "The response was flagged."
setkey: guardresult
outputs:
- respond
tasks:
- name: safety-check
pre-guard:
user-prompt: "{{user.message}}"
selection:
model: llama-guard
error-trigger: |
log("Unsafe content detected: " + result.categories);
setvar("blocked", "true");
setkey: guardresult
outputs:
- process

LLM safety classification functions.

Scope: System

Note: guard.check requires a pipeline environment with ProxySelector for model routing. Use the YAML interface for full functionality.

FunctionDescription
guard.check()Classify content safety

Intent classification for user prompts. Sends prompts to an intent classification model endpoint and returns classification results.

ParameterTypeRequiredDefaultDescription
promptstring/listYesPrompt(s) to classify. Supports Liquid templates
selectionmapNo{}Model selection criteria: cost, time, accuracy, model
timeoutintNo500Request timeout in seconds
tasks:
- name: classify
getintent:
prompt: "{{user.message}}"
selection:
model: intent-classifier
outputs:
- route
tasks:
- name: classify-batch
getintent:
prompt:
- "{{user.message}}"
- "{{user.context}}"
selection:
accuracy: high
outputs:
- route

Intent classification functions.

Scope: System

Note: intent.classify requires a pipeline environment with ProxySelector for model routing. Use the YAML interface for full functionality.

FunctionDescription
intent.classify()Classify the intent of a prompt

Stream pipeline ML chat task. Reads incoming data records from pipeline inputs, builds chat messages from conversation memory and the current record, delegates to the chat task in chat mode, and writes the parsed ML response to pipeline outputs. Designed for streaming multi-turn conversations within a data pipeline.

Registered as both mlpipelinechat and mlpipechat.

ParameterTypeRequiredDefaultDescription
selectionmapNo{}Model selection criteria: cost, time, accuracy, model
promptkeystringNoRecord field name containing the user prompt
tasks:
- name: request
mlpiperequest:
inputs:
- source
outputs:
- chat
- name: chat
mlpipechat:
selection:
model: gpt-4
promptkey: message
inputs:
- request
outputs:
- response

Full pipeline with request, chat, and response

Section titled “Full pipeline with request, chat, and response”
tasks:
- name: ingest
mlpiperequest:
inputs:
- source
outputs:
- process
- name: process
mlpipelinechat:
selection:
model: gpt-4
accuracy: high
promptkey: user_message
inputs:
- ingest
outputs:
- deliver
- name: deliver
mlpiperesponse: "https://api.example.com/v1/conversation/response"
inputs:
- process

See the pipeline namespace documentation for the pipeline.chat() function details.

Stream pipeline ML request task. Reads incoming data records from pipeline inputs and forwards them to pipeline outputs with conversation context. Acts as the request ingestion stage of a streaming ML pipeline.

Registered as both mlpipelinerequest and mlpiperequest.

This task reads its configuration from pipeline inputs/outputs and the incoming record. No additional execute parameters are required beyond the pipeline wiring.

tasks:
- name: ingest
mlpiperequest:
inputs:
- source
outputs:
- chat
tasks:
- name: request
mlpiperequest:
inputs:
- source
outputs:
- process
- name: process
mlpipechat:
selection:
model: gpt-4
promptkey: message
inputs:
- request
outputs:
- response
- name: response
mlpiperesponse: "https://api.example.com/v1/response"
inputs:
- process

See the pipeline namespace documentation for the pipeline.request() function details.

Stream pipeline ML response task. Reads processed data records from pipeline inputs and submits them to an external URL via HTTP POST with authorization headers. Acts as the response delivery stage of a streaming ML pipeline.

Registered as both mlpipelineresponse and mlpiperesponse.

ParameterTypeRequiredDefaultDescription
(direct value)stringYesThe URL to submit the response to

The URL is provided as the direct value of the task key, not as a named parameter.

tasks:
- name: respond
mlpiperesponse: "https://api.example.com/v1/conversation/response"
inputs:
- chat
tasks:
- name: request
mlpiperequest:
inputs:
- source
outputs:
- chat
- name: chat
mlpipechat:
selection:
model: gpt-4
promptkey: message
inputs:
- request
outputs:
- respond
- name: respond
mlpipelineresponse: "https://api.example.com/v1/conversation/response"
inputs:
- chat

See the pipeline namespace documentation for the pipeline.response() function details.

Scrape content from web URLs. Supports scraping websites with configurable crawl depth and page limits. Posts scrape requests to a scraping service resolved via ProxySelector. Scraped content is stored in the pipeline environment.

ParameterTypeRequiredDefaultDescription
urlslistYesList of URL specifications (strings or maps)
selectionmapNo{}Service selection criteria: cost, time, accuracy, model
depthint/stringNo1Crawl depth for website scraping. Supports Liquid templates
setkeystringNoEnvironment key to store the scraped data
limitintNo-1Maximum number of pages to scrape (-1 = unlimited)
contextlimitintNo15000Maximum character limit per scraped page
timeoutintNo500Request timeout in seconds
FieldTypeDescription
urlstring/listOne or more URLs to scrape
typestringScrape type: website
depthstringCrawl depth for this URL
setkeystringEnvironment key for this URL’s results
limitintPage limit for this URL
contextLimitintCharacter limit for this URL
tasks:
- name: scrape
scrapedata:
urls:
- "https://docs.example.com/guide"
selection:
model: scraper
depth: 2
setkey: scraped
contextlimit: 10000
outputs:
- embed
tasks:
- name: scrape
scrapedata:
urls:
- url:
- "https://example.com/page1"
- "https://example.com/page2"
type: website
depth: "1"
setkey: webdata
contextLimit: 15000
outputs:
- process
tasks:
- name: scrape-limited
scrapedata:
urls:
- "https://docs.example.com"
depth: 3
limit: 50
setkey: scraped
outputs:
- embed

See the scrape namespace documentation for the scrape.web() function details.

Scrape text content from DOCX files via a remote scraping service. Posts the file URL to the scraping service endpoint resolved via ProxySelector and stores the extracted text in the pipeline environment.

ParameterTypeRequiredDefaultDescription
fileurlstringYesURL of the DOCX file to scrape. Supports Liquid templates
setkeystringNoEnvironment key to store the scraped content
selectionmapNoService selection criteria for ProxySelector
contextlimitintNo15000Maximum character limit for scraped content
timeoutintNo500Request timeout in seconds
tasks:
- name: read-docx
scrape-docx:
fileurl: "{{document.url}}"
selection:
model: scraper
setkey: docxcontent
outputs:
- process
tasks:
- name: read-docx
scrape-docx:
fileurl: "https://storage.example.com/docs/manual.docx"
setkey: docxdata
contextlimit: 25000
outputs:
- embed

See the scrape namespace documentation for the scrape.docx() function details.

Scrape content from Excel files. Downloads the file and extracts sheet data using the worksheet library. Does not require ProxySelector — processes Excel files directly.

ParameterTypeRequiredDefaultDescription
fileurlstringYesURL of the Excel file to scrape. Supports Liquid templates
setkeystringNoEnvironment key to store the scraped content
tasks:
- name: read-excel
scrape-excel:
fileurl: "{{document.url}}"
setkey: exceldata
outputs:
- process
tasks:
- name: read-spreadsheet
scrape-excel:
fileurl: "https://storage.example.com/data/report.xlsx"
setkey: reportdata
outputs:
- embed

See the scrape namespace documentation for the scrape.excel() function details.

Scrape text content from PDF files via a remote scraping service. Posts the file URL to the scraping service endpoint resolved via ProxySelector and stores the extracted text in the pipeline environment.

ParameterTypeRequiredDefaultDescription
fileurlstringYesURL of the PDF file to scrape. Supports Liquid templates
setkeystringNoEnvironment key to store the scraped content
selectionmapNoService selection criteria for ProxySelector
contextlimitintNo15000Maximum character limit for scraped content
timeoutintNo500Request timeout in seconds
tasks:
- name: read-pdf
scrape-pdf:
fileurl: "{{document.url}}"
selection:
model: scraper
setkey: pdfcontent
contextlimit: 20000
outputs:
- embed
tasks:
- name: read-pdf
scrape-pdf:
fileurl: "https://storage.example.com/docs/{{document.filename}}"
setkey: pdfdata
outputs:
- process

See the scrape namespace documentation for the scrape.pdf() function details.

Scrape text content from PPTX (PowerPoint) files via a remote scraping service. Posts the file URL to the scraping service endpoint resolved via ProxySelector and stores the extracted text in the pipeline environment.

ParameterTypeRequiredDefaultDescription
fileurlstringYesURL of the PPTX file to scrape. Supports Liquid templates
setkeystringNoEnvironment key to store the scraped content
selectionmapNoService selection criteria for ProxySelector
contextlimitintNo15000Maximum character limit for scraped content
timeoutintNo500Request timeout in seconds
tasks:
- name: read-pptx
scrape-pptx:
fileurl: "{{document.url}}"
selection:
model: scraper
setkey: pptxcontent
outputs:
- embed
tasks:
- name: read-presentation
scrape-pptx:
fileurl: "https://storage.example.com/slides/{{presentation.id}}.pptx"
setkey: slidecontent
contextlimit: 20000
outputs:
- process

See the scrape namespace documentation for the scrape.pptx() function details.

Sofia vector store operations. Sends embeddings and associated data to a Sofia vector store REST endpoint. Iterates over embeddings from the pipeline environment, templates a payload for each, and POSTs to the configured URL with custom headers. Supports retry configuration.

ParameterTypeRequiredDefaultDescription
urlstringYesSofia REST endpoint URL. Supports Liquid templates
embeddingskeystringYesEnvironment key containing the embeddings data (with .embeddings, .keys, .data sub-keys)
payloadstringNoLiquid template string for the POST body
headersmapNoHTTP headers to include. Values support Liquid templates
optypestringNoinsertOperation type. Supports Liquid templates
doretrystring/boolNofalseWhether to enable HTTP retry

The payload template has access to these variables:

VariableDescription
embeddings_dataThe text/data for the current embedding
embeddings_keyThe key/source for the current embedding
embeddingsThe embedding vector (as JSON array)
tasks:
- name: store-in-sofia
sofia:
url: "https://sofia.example.com/v1/documents"
embeddingskey: embeddings
payload: |
{
"text": "{{embeddings_data}}",
"source": "{{embeddings_key}}",
"vector": {{embeddings}}
}
headers:
Authorization: "Bearer {{user.token}}"
Content-Type: "application/json"
outputs:
- done
tasks:
- name: store-in-sofia
sofia:
url: "https://sofia.example.com/v1/documents"
embeddingskey: embeddings
optype: upsert
doretry: true
headers:
Authorization: "Bearer {{api.token}}"
outputs:
- done

See the sofia namespace documentation for the sofia.embed() function details.

Delete records from a Milvus collection by user ID, topic name, and optional URL filter. Uses the Milvus Delete API with expression filters.

ParameterTypeRequiredDefaultDescription
urlstringYesMilvus gRPC endpoint URL
collectionstringYesMilvus collection name. Supports Liquid templates
useridstringYesUser ID to delete by. Supports Liquid templates
topicstringYesTopic name to delete by. Supports Liquid templates
linkstringNoURL to filter by (delete only matching URL). Supports Liquid templates
tasks:
- name: remove-topic
topicsdelete:
url: "localhost:19530"
collection: "knowledge_base"
userid: "{{user.id}}"
topic: "{{topic.name}}"
outputs:
- done
tasks:
- name: remove-url
topicsdelete:
url: "localhost:19530"
collection: "knowledge_base"
userid: "{{user.id}}"
topic: "docs"
link: "https://docs.example.com/old-page"
outputs:
- done

See the milvus namespace documentation for the milvus.delete() function details.

Insert vector embeddings into a Milvus collection. Reads pre-computed embeddings, keys, and data arrays from the pipeline environment and inserts them with user ID, topic name, URL, and scraped data columns. Uses tenant-based database isolation.

ParameterTypeRequiredDefaultDescription
urlstringYesMilvus gRPC endpoint URL
collectionstringYesMilvus collection name. Supports Liquid templates
embeddingsstringYesEnvironment key containing the embeddings data (with .embeddings, .keys, .data sub-keys)
useridstringYesUser ID for the inserted records. Supports Liquid templates
topicstringYesTopic name for the inserted records. Supports Liquid templates
topicfieldstringNotopic_nameMilvus field name for the topic column
tasks:
- name: store-vectors
topicsinsert:
url: "localhost:19530"
collection: "knowledge_base"
embeddings: embeddingresult
userid: "{{user.id}}"
topic: "{{topic.name}}"
outputs:
- done
tasks:
- name: store-vectors
topicsinsert:
url: "localhost:19530"
collection: "documents"
embeddings: embeddings
userid: "{{user.id}}"
topic: "{{category}}"
topicfield: category_name
outputs:
- done

See the milvus namespace documentation for the milvus.insert() function details.

List unique topic names from a Milvus collection for a given user. Loads the collection, queries by user ID with optional topic and URL filters, and returns deduplicated topic names with optional scraped data.

ParameterTypeRequiredDefaultDescription
urlstringYesMilvus gRPC endpoint URL
collectionstringYesMilvus collection name. Supports Liquid templates
useridstringYesUser ID to filter by. Supports Liquid templates
topicstringNoTopic name to filter by. Supports Liquid templates
linkstringNoURL to filter by. Supports Liquid templates
senddataboolNofalseWhether to include scraped data in results
setkeystringNoEnvironment key to store the list results
tasks:
- name: list-topics
topicslist:
url: "localhost:19530"
collection: "knowledge_base"
userid: "{{user.id}}"
setkey: topicnames
outputs:
- display
tasks:
- name: list-topics-data
topicslist:
url: "localhost:19530"
collection: "knowledge_base"
userid: "{{user.id}}"
senddata: true
setkey: topicdetails
outputs:
- process

See the milvus namespace documentation for the milvus.list() function details.

Query records from a Milvus collection using field-based filters (not vector similarity). Loads the collection and queries by user ID, topic name, and optional URL filter. Returns matching records with ID, URL, and scraped data.

ParameterTypeRequiredDefaultDescription
urlstringYesMilvus gRPC endpoint URL
collectionstringYesMilvus collection name. Supports Liquid templates
topicstringYesTopic name to query by. Supports Liquid templates
useridstringNoUser ID to filter by. Supports Liquid templates
topicurlstringNoURL to filter by. Supports Liquid templates
limitintNo3Maximum number of results
setkeystringNoEnvironment key to store the query results
tasks:
- name: query-topics
topicsquery:
url: "localhost:19530"
collection: "knowledge_base"
topic: "{{topic.name}}"
userid: "{{user.id}}"
limit: 10
setkey: queryresults
outputs:
- process
tasks:
- name: query-by-url
topicsquery:
url: "localhost:19530"
collection: "knowledge_base"
topic: "docs"
topicurl: "https://docs.example.com"
limit: 20
setkey: queryresults
outputs:
- process

See the milvus namespace documentation for the milvus.query() function details.

Perform vector similarity search in a Milvus collection. Loads the collection, applies user/topic filters, and searches using L2 distance against a query embedding vector. Returns matched records with ID, URL, and scraped data.

ParameterTypeRequiredDefaultDescription
urlstringYesMilvus gRPC endpoint URL
collectionstringYesMilvus collection name. Supports Liquid templates
embeddingsstringYesEnvironment key containing the query embedding vector
topicstringYesTopic name to filter by. Supports Liquid templates
useridstringNoUser ID to filter by. Supports Liquid templates
topicurlstringNoURL to filter by. Supports Liquid templates
limitintNo3Maximum number of results (top-k)
setkeystringNoEnvironment key to store the search results
tasks:
- name: search-similar
topicssearch:
url: "localhost:19530"
collection: "knowledge_base"
embeddings: queryembedding
topic: "{{topic.name}}"
userid: "{{user.id}}"
limit: 5
setkey: searchresults
outputs:
- respond
tasks:
- name: search-global
topicssearch:
url: "localhost:19530"
collection: "knowledge_base"
embeddings: queryembedding
topic: "general"
limit: 10
setkey: searchresults
outputs:
- process

See the milvus namespace documentation for the milvus.search() function details.

Convert entity YAML definitions into natural language sentences. Parses entity YAML using the parser/transform library and produces human-readable sentence representations. Useful for turning structured entity definitions into prompts or descriptions.

ParameterTypeRequiredDefaultDescription
entitystringYesEntity YAML string to convert. Supports Liquid templates
setkeystringNomlresponseEnvironment key to store the resulting sentence
tasks:
- name: describe
tosentence:
entity: "{{entityyaml}}"
setkey: entitydescription
outputs:
- prompt
tasks:
- name: describe-entity
tosentence:
entity: |
name: User
fields:
- name: email
type: string
- name: age
type: integer
setkey: description
outputs:
- next

Text transformation functions.

Scope: System

Note: text.tosentence requires entity YAML context from the pipeline environment. The text.split function works independently.

FunctionDescription
text.tosentence()Convert entity YAML to sentences (requires pipeline)
text.split()Split text by delimiter or length

Validate a JSON value against a JSON schema. Schema and value can be provided inline or referenced from the pipeline environment by key. All values support Liquid template rendering.

ParameterTypeRequiredDefaultDescription
jsonschemastringYes*Inline JSON schema string
jsonschemakeystringYes*Environment key referencing the JSON schema
jsonvaluestringYes*Inline JSON value string to validate
jsonvaluekeystringYes*Environment key referencing the JSON value

* One of jsonschema or jsonschemakey is required. One of jsonvalue or jsonvaluekey is required.

tasks:
- name: check-schema
validate-json:
jsonschema: |
{
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"}
},
"required": ["name"]
}
jsonvalue: "{{user.input}}"
outputs:
- process
tasks:
- name: check-schema
validate-json:
jsonschemakey: schema_definition
jsonvaluekey: parsed_input
outputs:
- process

See the validate namespace documentation for the validate.json() function details.

Validate a YAML value against a JSON schema. The YAML value is parsed and validated using the JSON Schema specification. Schema and value can be provided inline or referenced from the pipeline environment by key. All values support Liquid template rendering.

ParameterTypeRequiredDefaultDescription
yamlschemastringYes*Inline YAML schema string (JSON Schema format in YAML)
yamlschemakeystringYes*Environment key referencing the YAML schema
yamlvaluestringYes*Inline YAML value string to validate
yamlvaluekeystringYes*Environment key referencing the YAML value

* One of yamlschema or yamlschemakey is required. One of yamlvalue or yamlvaluekey is required.

tasks:
- name: check-yaml
validate-yaml:
yamlschema: |
type: object
properties:
name:
type: string
version:
type: string
required:
- name
yamlvalue: "{{config.yaml}}"
outputs:
- process
tasks:
- name: check-yaml
validate-yaml:
yamlschemakey: config_schema
yamlvaluekey: parsed_config
outputs:
- process

See the validate namespace documentation for the validate.yaml() function details.