Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

DAI Studio

AI/ML Types

Element types that shape how the AI thinks and acts: the core primitives for building AI workflows.

AI/ML types are the core primitives of an AI workflow — the context, rules, tools, models, and agents a model reasons with. In the editor they live under Types → Domains → AI/ML. The Agent has its own page covering multi-agent composition.

Every type below can be a bpmn:task or — once it has children — a bpmn:subProcess container; types marked container by default are placed as containers. All of them accept the universal attributes. In the tables, dai:-prefixed keys are attributes on the element; keys marked † are stored as <dai:field key="…"> children (see Where values go).

There are 18 types in this category: Agent, Context, Dataset, Evaluation, Guardrail, Human, Knowledge, Markdown, MCP Server, Memory, Model, Output, Prompt, Router, Rule, Session, Skill, Tool.

Agent

dai:type="dai.types.ai.agent" · dai:stepType="agent" · container by default

An autonomous AI agent. Contains Tools, Skills, Rules, and Prompts as child elements. Agents can be nested to compose multi-agent systems. The Agent page covers composition, multi-agent patterns, and full examples.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat does this agent do?
dai:agentRoleRoletexte.g. “Research analyst”, “Code reviewer”
dai:defaultModelModelmodel-selector
dai:agentTypeAgent Typeselectautonomous · supervised · reactive · collaborative
dai:memoryTypeMemoryselectnone · in-context · persistent · external
dai:maxIterationsMax Iterationsnumbere.g. 10; min 1
dai:stopConditionStop ConditiontextareaWhen should this agent stop?
dai:outputSchemaOutput Schemacodee.g. JSON schema for the agent output
dai:properties (child element)Inputskey-value

Context

dai:type="dai.types.ai.context" · dai:stepType="context"

Background knowledge, grounding data, or reference material that informs downstream steps. It does not produce output itself — it shapes how the AI reasons. What sets Context apart from Memory is scope: Context is scoped, often ephemeral grounding for this workflow.

KeyLabelInputValues / notes
dai:sourceSourceselectmanual · file · url · database · api · previous-step
dai:formatFormatselecttext · json · markdown · csv · code · html
dai:scopeScopeselectglobal · local
dai:contentContenttextareaPaste or write the context content here. This is the actual grounding data the AI will use.
dai:notesNotestextareaDescribe what this context provides and how downstream steps should use it.
<bpmn:task id="Task_ctx" name="Order Schema" dai:type="dai.types.ai.context" dai:stepType="context" dai:scope="global"
  dai:source="manual" dai:content="An order contains: orderId (str), customerId (str), lines (list of OrderLine)."
  dai:notes="The data shapes the validation steps below will be checked against." />

Dataset

dai:type="dai.types.ai.dataset" · dai:stepType="dataset"

A training, fine-tuning, or evaluation dataset. Distinct from Context — a runtime grounding source — a Dataset is a corpus artifact used to shape or evaluate model behaviour offline.

KeyLabelInputValues / notes
dai:sourceSourceselectcurated · generated · scraped · synthetic
split †Splitselecttrain · eval · test · all
dai:formatFormatselectjsonl · csv · parquet · text
size †Sizetexte.g. 10k examples, 2GB
dai:notesNotestextareaDescribe what this dataset contains and how it is used.
<bpmn:task id="Task_data" name="Support QA pairs" dai:type="dai.types.ai.dataset" dai:stepType="dataset"
  dai:source="curated" dai:format="jsonl"
  dai:notes="Anonymised support conversations used to tune the summarisation skill.">
  <bpmn:extensionElements>
    <dai:fields>
      <dai:field key="split">train</dai:field>
      <dai:field key="size">8k examples</dai:field>
    </dai:fields>
  </bpmn:extensionElements>
</bpmn:task>

Evaluation

dai:type="dai.types.ai.evaluation" · dai:stepType="evaluation"

An evaluation suite or benchmark for AI behaviour. Distinct from a generic Test — an Evaluation defines metrics, benchmarks, or scoring criteria used to assess model outputs.

KeyLabelInputValues / notes
metric †Metrictexte.g. BLEU, ROUGE, accuracy, F1
benchmark †Benchmarktexte.g. MMLU, HumanEval, HellaSwag
threshold †Pass Thresholdtexte.g. ≥ 0.85, top-5%
dai:methodMethodselectautomated · human · hybrid
dai:notesNotestextareaDescribe what this evaluation measures and how results should be interpreted.
<bpmn:task id="Task_eval" name="Groundedness suite" dai:type="dai.types.ai.evaluation" dai:stepType="evaluation" dai:method="automated"
  dai:notes="Scores every generated summary against the retrieved source set.">
  <bpmn:extensionElements>
    <dai:fields>
      <dai:field key="metric">F1</dai:field>
      <dai:field key="threshold">≥ 0.85</dai:field>
    </dai:fields>
  </bpmn:extensionElements>
</bpmn:task>

Guardrail

dai:type="dai.types.ai.guardrail" · dai:stepType="guardrail"

A runtime enforcement or detection mechanism. Distinct from Rule (a policy-level constraint) — a Guardrail is actively applied at inference time: content filters, output validators, safety classifiers.

KeyLabelInputValues / notes
guardrailType †Typeselectinput · output · both
action †Actionselectblock · warn · redact · flag
dai:triggerTriggertextareaWhat pattern, condition, or classifier activates this guardrail?
dai:notesNotestextareaDescribe the enforcement logic and any exceptions.
<bpmn:task id="Task_guard" name="PII filter" dai:type="dai.types.ai.guardrail" dai:stepType="guardrail"
  dai:trigger="Detector matches email addresses, phone numbers, or national ID patterns.">
  <bpmn:extensionElements>
    <dai:fields>
      <dai:field key="guardrailType">both</dai:field>
      <dai:field key="action">redact</dai:field>
    </dai:fields>
  </bpmn:extensionElements>
</bpmn:task>

Human

dai:type="dai.types.ai.human" · no dai:stepType

A human-in-the-loop step: a person approves, reviews, provides input or handles an escalation before the flow continues.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this human for?
action †Actionselectapprove · review · input · escalation; default approve
dai:assigneeRole / assigneetexte.g. Support lead
channel †Channelselectin-app · email · chat · ticket · other
instructions †InstructionstextareaWhat the person should check or decide
timeout †Timeouttexte.g. 24h
onTimeout †On timeoutselectproceed · reject · escalate

Knowledge

dai:type="dai.types.ai.knowledge" · no dai:stepType

A knowledge base that AI steps retrieve from (RAG): documents, sites, wikis or databases indexed for search. Distinct from Context (inline grounding), Memory (accumulates over time) and Dataset (offline training or evaluation).

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this knowledge for?
sourceType †Sourceselectdocuments · website · wiki · database · code · api · other
location †LocationtextURL, bucket, path or connection
retrieval †Retrievalselectvector · keyword · hybrid · graph; default hybrid
embeddingModel †Embedding modeltexte.g. text-embedding-3-large
chunking †Chunkingtexte.g. 800 tokens, 100 overlap
refresh †Refreshselectstatic · scheduled · live
topK †Results per query (top-k)numbermin 1; default 5

Markdown

dai:type="dai.types.ai.markdown-note" · dai:stepType="markdown-note"

A freeform note with markdown content rendered on canvas. Use it for documentation, context, or instructions that travel with the diagram. Two additional editor-behaviour attributes control how the note participates in the diagram:

KeyLabelInputValues / notes
dai:markdownContentmarkdown# Heading Write your note here…
dai:agent_ignoreIgnore in Agent Contextbooleandefault true
dai:zoomText Zoomrange50–200, step 10; default 100
<bpmn:task id="Task_note" name="Definition of done" dai:type="dai.types.ai.markdown-note" dai:stepType="markdown-note"
  dai:markdown="# Done means&#10;- all tests green&#10;- docs updated" />

MCP Server

dai:type="dai.types.ai.mcp-server" · no dai:stepType · container by default

A Model Context Protocol (MCP) server that exposes Tools, resources and prompts to AI clients. Contains the Tools it exposes; connect Agents to it.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this mcp server for?
transport †Transportselectstdio · http · sse; default stdio
command †Commandtexte.g. npx -y @modelcontextprotocol/server-github; For stdio transport
url †URLtexthttps://…/mcp; For HTTP transports
auth †Authselectnone · api-key · oauth
dai:properties (child element)Environmentkey-value

Memory

dai:type="dai.types.ai.memory" · dai:stepType="memory"

A persistent or long-term memory store. Distinct from Context — scoped, ephemeral grounding — Memory persists across sessions and accumulates over time.

KeyLabelInputValues / notes
memoryType †Typeselectepisodic · semantic · procedural
dai:scopeScopeselectsession · user · global
backend †Backendtexte.g. vector DB, Redis, in-process
dai:notesNotestextareaDescribe what this memory stores and how it is retrieved.
<bpmn:task id="Task_mem" name="User preferences" dai:type="dai.types.ai.memory" dai:stepType="memory" dai:scope="user"
  dai:notes="Stores per-user tone and format preferences learned from past interactions.">
  <bpmn:extensionElements>
    <dai:fields>
      <dai:field key="memoryType">semantic</dai:field>
      <dai:field key="backend">vector DB</dai:field>
    </dai:fields>
  </bpmn:extensionElements>
</bpmn:task>

Model

dai:type="dai.types.ai.model" · no dai:stepType

An AI/ML model that Agents and Prompts use: an LLM, embedding, vision, speech or classical ML model. Records the provider, the model ID and default parameters. Distinct from Software → Model (a data schema).

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this model for?
model †Modelmodel-selector
provider †Providerselectanthropic · openai · google · mistral · meta · deepseek · qwen · self-hosted · other
modality †Modalityselecttext · multimodal · embedding · image · speech · classical; default text
contextWindow †Context window (tokens)numbermin 0
dai:temperatureTemperaturenumber0–2, step 0.1
maxOutputTokens †Max output tokensnumbermin 0
endpoint †EndpointtextAPI base URL or deployment name

Output

dai:type="dai.types.ai.output" · no dai:stepType

A result an Agent or workflow produces: a response, document, file, structured data or action payload. Defines its format, schema and destination.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this output for?
dai:formatFormatselecttext · markdown · json · file · image · audio · code; default text
schema †Schemacodee.g. JSON Schema or example structure
destination †Destinationtexte.g. user, Slack channel, S3 path, API
sampleOutput †ExampletextareaA representative output

Prompt

dai:type="dai.types.ai.prompt" · dai:stepType="prompt"

A reusable prompt template with system instructions, a user message, and an expected output format. Makes prompt engineering first-class: version, reuse, and compose prompts across workflows.

KeyLabelInputValues / notes
dai:systemPromptSystem MessagetextareaInstructions that set the AI’s role and behaviour for this step.
dai:userPromptUser MessagetextareaThe user-facing prompt. Use {{variable}} syntax for template variables.
dai:outputFormatOutput Formatselecttext · json · markdown · code · list · table
defaultModel †Modelmodel-selector
dai:temperatureTemperaturerange0–1, step 0.1; 0 = deterministic, 1 = most creative
dai:notesNotestextarea
<bpmn:task id="Task_prompt" name="Summary prompt" dai:type="dai.types.ai.prompt" dai:stepType="prompt"
  dai:systemPrompt="You are a research analyst. Produce a structured summary with citations."
  dai:userPrompt="Research the following topic and summarise your findings: {{query}}"
  dai:outputFormat="markdown" />

Router

dai:type="dai.types.ai.router" · no dai:stepType

Routes a request to one of several Agents, Models or Tools based on intent, rules, similarity, or cost and latency. Connect it to each possible target.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this router for?
strategy †Strategyselectllm · rules · semantic · cost · fallback; default llm
model †Classifier modelmodel-selector
dai:properties (child element)Routeskey-value
defaultRoute †Default routetextTarget when no route matches

Rule

dai:type="dai.types.ai.rule" · dai:stepType="rule"

A constraint, policy, or business rule the AI must respect and enforce throughout the workflow. Scope, priority, and enforcement level determine how strictly it applies. Contrast with Guardrail, which is a runtime enforcement mechanism rather than a policy statement.

KeyLabelInputValues / notes
dai:scopeScopeselectglobal · local
dai:rulePriorityPriorityselectcritical · high · medium · low
dai:enforcementEnforcementselecthard · soft · best-effort
dai:notesRuletextareaWhat constraint applies here? State it clearly and specifically. The AI will enforce this when generating outputs.
<bpmn:task id="Task_rule" name="Price Rule" dai:type="dai.types.ai.rule" dai:stepType="rule"
  dai:scope="global" dai:rulePriority="critical" dai:enforcement="hard"
  dai:notes="All line item prices must be greater than zero. Orders with any zero-price line must be rejected." />

Session

dai:type="dai.types.ai.session" · no dai:stepType · container by default

One conversation or run scope. Contains the steps that share its state (messages, variables). Distinct from Memory, which persists across sessions.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat is this session for?
dai:scopeScopeselectuser · conversation · task; default conversation
stateStore †State storetexte.g. Redis, Postgres, in-memory
ttl †Expires after (TTL)texte.g. 30m
maxTurns †Max turnsnumbermin 1

Skill

dai:type="dai.types.ai.skill" · dai:stepType="skill"

An autonomous capability the AI can invoke when it judges the context appropriate. A Skill describes behaviour rather than implementation — as opposed to a Tool, which carries concrete code.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat can the AI do with this skill? Describe the capability and when it applies.
dai:triggerTriggertextWhen should the AI apply this skill? (e.g. “Whenever asked to summarise or condense content”)
dai:examplesExamplestextareaInput: “Explain quantum entanglement to a 10-year-old” Output: “Imagine you have two magic dice…” Input: … Output: …
skillId †Skill IDtextowner/repo/skill (e.g. aave/skills/account-activity)
dai:sourceSourcetexthttps://github.com/owner/repo
url †Skill pagetexthttps://www.skills.sh/owner/repo/skill
install †Installcodee.g. ["npx","skills","add","https://github.com/owner/repo","--skill","name","-y"]; argv list — append -a <agent> -g when installing; never join into a shell string.
<bpmn:task id="Task_skill" name="Synthesise" dai:type="dai.types.ai.skill" dai:stepType="skill"
  dai:trigger="When at least 3 relevant sources have been read"
  dai:notes="Combine the retrieved content into a coherent, cited research summary organised by sub-topic." />

Tool

dai:type="dai.types.ai.tool" · dai:stepType="tool"

A callable function with a concrete implementation. The AI reads the description to understand what it does, then executes the code. Parameters are declared with dai:properties.

KeyLabelInputValues / notes
dai:notesDescriptiontextareaWhat does this tool do and what does it return? The AI will use this to decide when and how to invoke it.
dai:languageLanguageselectpython · javascript · typescript · shell · sql · other
dai:properties (child element)Parameterskey-value
dai:returnsReturnstexte.g. string, JSON object, number, void
dai:codeCodecodee.g. Paste or write the implementation code for this tool…

The name doubles as the function name.

<bpmn:task id="Task_search" name="web_search" dai:type="dai.types.ai.tool" dai:stepType="tool"
  dai:language="python" dai:returns="list[dict]"
  dai:notes="Search the web and return up to n results as a list of {url, title, snippet} objects.">
  <bpmn:extensionElements>
    <dai:properties>
      <dai:property name="query" type="str" />
      <dai:property name="n"     type="int" />
    </dai:properties>
  </bpmn:extensionElements>
</bpmn:task>

See also

  • Agent — how agents nest these primitives, and each other, into multi-agent systems
  • Typed Properties — dai:properties parameter lists on tools
  • Examples — complete workflows built from these types