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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What does this agent do? |
dai:agentRole | Role | text | e.g. “Research analyst”, “Code reviewer” |
dai:defaultModel | Model | model-selector | |
dai:agentType | Agent Type | select | autonomous · supervised · reactive · collaborative |
dai:memoryType | Memory | select | none · in-context · persistent · external |
dai:maxIterations | Max Iterations | number | e.g. 10; min 1 |
dai:stopCondition | Stop Condition | textarea | When should this agent stop? |
dai:outputSchema | Output Schema | code | e.g. JSON schema for the agent output |
dai:properties (child element) | Inputs | key-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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:source | Source | select | manual · file · url · database · api · previous-step |
dai:format | Format | select | text · json · markdown · csv · code · html |
dai:scope | Scope | select | global · local |
dai:content | Content | textarea | Paste or write the context content here. This is the actual grounding data the AI will use. |
dai:notes | Notes | textarea | Describe 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:source | Source | select | curated · generated · scraped · synthetic |
split † | Split | select | train · eval · test · all |
dai:format | Format | select | jsonl · csv · parquet · text |
size † | Size | text | e.g. 10k examples, 2GB |
dai:notes | Notes | textarea | Describe 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
metric † | Metric | text | e.g. BLEU, ROUGE, accuracy, F1 |
benchmark † | Benchmark | text | e.g. MMLU, HumanEval, HellaSwag |
threshold † | Pass Threshold | text | e.g. ≥ 0.85, top-5% |
dai:method | Method | select | automated · human · hybrid |
dai:notes | Notes | textarea | Describe 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
guardrailType † | Type | select | input · output · both |
action † | Action | select | block · warn · redact · flag |
dai:trigger | Trigger | textarea | What pattern, condition, or classifier activates this guardrail? |
dai:notes | Notes | textarea | Describe 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this human for? |
action † | Action | select | approve · review · input · escalation; default approve |
dai:assignee | Role / assignee | text | e.g. Support lead |
channel † | Channel | select | in-app · email · chat · ticket · other |
instructions † | Instructions | textarea | What the person should check or decide |
timeout † | Timeout | text | e.g. 24h |
onTimeout † | On timeout | select | proceed · 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).
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this knowledge for? |
sourceType † | Source | select | documents · website · wiki · database · code · api · other |
location † | Location | text | URL, bucket, path or connection |
retrieval † | Retrieval | select | vector · keyword · hybrid · graph; default hybrid |
embeddingModel † | Embedding model | text | e.g. text-embedding-3-large |
chunking † | Chunking | text | e.g. 800 tokens, 100 overlap |
refresh † | Refresh | select | static · scheduled · live |
topK † | Results per query (top-k) | number | min 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:
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:markdown | Content | markdown | # Heading Write your note here… |
dai:agent_ignore | Ignore in Agent Context | boolean | default true |
dai:zoom | Text Zoom | range | 50–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 - all tests green - 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this mcp server for? |
transport † | Transport | select | stdio · http · sse; default stdio |
command † | Command | text | e.g. npx -y @modelcontextprotocol/server-github; For stdio transport |
url † | URL | text | https://…/mcp; For HTTP transports |
auth † | Auth | select | none · api-key · oauth |
dai:properties (child element) | Environment | key-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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
memoryType † | Type | select | episodic · semantic · procedural |
dai:scope | Scope | select | session · user · global |
backend † | Backend | text | e.g. vector DB, Redis, in-process |
dai:notes | Notes | textarea | Describe 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).
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this model for? |
model † | Model | model-selector | |
provider † | Provider | select | anthropic · openai · google · mistral · meta · deepseek · qwen · self-hosted · other |
modality † | Modality | select | text · multimodal · embedding · image · speech · classical; default text |
contextWindow † | Context window (tokens) | number | min 0 |
dai:temperature | Temperature | number | 0–2, step 0.1 |
maxOutputTokens † | Max output tokens | number | min 0 |
endpoint † | Endpoint | text | API 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this output for? |
dai:format | Format | select | text · markdown · json · file · image · audio · code; default text |
schema † | Schema | code | e.g. JSON Schema or example structure |
destination † | Destination | text | e.g. user, Slack channel, S3 path, API |
sampleOutput † | Example | textarea | A 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:systemPrompt | System Message | textarea | Instructions that set the AI’s role and behaviour for this step. |
dai:userPrompt | User Message | textarea | The user-facing prompt. Use {{variable}} syntax for template variables. |
dai:outputFormat | Output Format | select | text · json · markdown · code · list · table |
defaultModel † | Model | model-selector | |
dai:temperature | Temperature | range | 0–1, step 0.1; 0 = deterministic, 1 = most creative |
dai:notes | Notes | textarea |
<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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this router for? |
strategy † | Strategy | select | llm · rules · semantic · cost · fallback; default llm |
model † | Classifier model | model-selector | |
dai:properties (child element) | Routes | key-value | |
defaultRoute † | Default route | text | Target 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:scope | Scope | select | global · local |
dai:rulePriority | Priority | select | critical · high · medium · low |
dai:enforcement | Enforcement | select | hard · soft · best-effort |
dai:notes | Rule | textarea | What 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What is this session for? |
dai:scope | Scope | select | user · conversation · task; default conversation |
stateStore † | State store | text | e.g. Redis, Postgres, in-memory |
ttl † | Expires after (TTL) | text | e.g. 30m |
maxTurns † | Max turns | number | min 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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What can the AI do with this skill? Describe the capability and when it applies. |
dai:trigger | Trigger | text | When should the AI apply this skill? (e.g. “Whenever asked to summarise or condense content”) |
dai:examples | Examples | textarea | Input: “Explain quantum entanglement to a 10-year-old” Output: “Imagine you have two magic dice…” Input: … Output: … |
skillId † | Skill ID | text | owner/repo/skill (e.g. aave/skills/account-activity) |
dai:source | Source | text | https://github.com/owner/repo |
url † | Skill page | text | https://www.skills.sh/owner/repo/skill |
install † | Install | code | e.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.
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:notes | Description | textarea | What does this tool do and what does it return? The AI will use this to decide when and how to invoke it. |
dai:language | Language | select | python · javascript · typescript · shell · sql · other |
dai:properties (child element) | Parameters | key-value | |
dai:returns | Returns | text | e.g. string, JSON object, number, void |
dai:code | Code | code | e.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:propertiesparameter lists on tools - Examples — complete workflows built from these types