Agent
The autonomous AI agent — its capabilities are the elements nested inside it, and it can nest other Agents for multi-agent pipelines.
dai.types.ai.agent (legacy dai:stepType="agent") is an autonomous AI agent whose capabilities are defined by the element tree nested inside it. Place Tool, Skill, Rule, Prompt, and Knowledge children inside an Agent to give it those capabilities. Agents nest inside other Agents to compose multi-agent systems.
Like every type, an Agent’s XML element depends only on whether it has children: an Agent holding tools and rules is a bpmn:subProcess; an Agent with nothing inside it is a bpmn:task. Its dai:type, attributes, and inputs are the same in both forms. DAI Studio places a new Agent as a container and switches the element automatically as you add or remove children.
Attributes
| Key | Label | Input | Values / notes |
|---|---|---|---|
dai:agentRole | Role | text | The agent’s purpose — e.g. “Research analyst”, “Code reviewer” |
dai:defaultModel | Model | model picker | The model this agent uses — overrides the diagram’s default |
dai:agentType | Agent Type | select | autonomous · supervised · reactive · collaborative |
dai:memoryType | Memory | select | none · in-context · persistent · external |
dai:maxIterations | Max Iterations | number | Maximum reasoning iterations before halting; min 1 |
dai:stopCondition | Stop Condition | textarea | Plain-language description of when the agent should stop |
dai:outputSchema | Output Schema | code | JSON schema describing the agent’s output structure |
dai:notes | Description | textarea | What this agent does |
dai:properties (child element) | Inputs | rows | Typed inputs — see Typed Properties |
All Agent values are attributes; none use dai:fields.
Example
<bpmn:subProcess id="Agent_1" name="Research Agent"
dai:type="dai.types.ai.agent" dai:stepType="agent"
dai:agentRole="Research analyst"
dai:agentType="autonomous"
dai:memoryType="in-context"
dai:maxIterations="10"
dai:stopCondition="Stop when a cited answer with ≥3 sources is produced."
dai:notes="Searches the web, reads sources, and produces a cited research summary.">
<bpmn:extensionElements>
<dai:properties>
<dai:property name="query" type="str" />
<dai:property name="maxSources" type="int" />
</dai:properties>
</bpmn:extensionElements>
<bpmn:task id="Task_rule" name="Cite sources"
dai:type="dai.types.ai.rule" dai:stepType="rule"
dai:scope="global" dai:rulePriority="critical" dai:enforcement="hard"
dai:notes="Every factual claim must be supported by a cited source URL." />
<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 a list of {url, title, snippet} results.">
<bpmn:extensionElements>
<dai:properties>
<dai:property name="query" type="str" />
<dai:property name="n" type="int" />
</dai:properties>
</bpmn:extensionElements>
</bpmn:task>
<bpmn:task id="Task_skill" name="Synthesise"
dai:type="dai.types.ai.skill" dai:stepType="skill"
dai:trigger="When enough sources have been gathered"
dai:notes="Combine retrieved content into a coherent, cited summary." />
<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" />
</bpmn:subProcess>
In DAI Studio the Agent’s dai:properties inputs are edited in the Properties panel’s Inputs rows.
Composition — nest Agents inside Agents
Nest one Agent inside another to build multi-agent pipelines. The outer agent orchestrates; inner agents become its sub-agents, and a bpmn:sequenceFlow between them establishes the order in which they run. Inner agents with nothing inside them are plain bpmn:task elements:
<bpmn:subProcess id="Agent_outer" name="Pipeline Agent"
dai:type="dai.types.ai.agent" dai:stepType="agent"
dai:agentType="collaborative"
dai:notes="Orchestrates sub-agents to research and then write a report.">
<bpmn:task id="Agent_researcher" name="Researcher"
dai:type="dai.types.ai.agent" dai:stepType="agent"
dai:agentRole="Research analyst" dai:agentType="autonomous"
dai:notes="Gathers and summarises source material." />
<bpmn:task id="Agent_writer" name="Writer"
dai:type="dai.types.ai.agent" dai:stepType="agent"
dai:agentRole="Technical writer" dai:agentType="supervised"
dai:notes="Turns the research summary into a polished report." />
<bpmn:sequenceFlow id="Flow_rw" sourceRef="Agent_researcher" targetRef="Agent_writer" />
</bpmn:subProcess>
Types that work with agents
Several AI/ML types exist to describe what sits around an agent:
| Type | Use it for |
|---|---|
| Model | The model an agent uses, with provider, context window, and default parameters — richer than dai:defaultModel alone |
| MCP Server | An MCP server whose Tools are nested inside it; connect Agents to it |
| Router | Picks which agent, model, or tool handles a request; connect it to each target |
| Session | A conversation or run scope that contains the steps sharing its state |
| Human | A human-in-the-loop approval, review, or escalation step |
| Output | What the agent produces, with its format, schema, and destination |
Other containers
Any type becomes a container once it has children. System, Environment, Initiative, Release, and Roadmap are placed as containers by default, like Agent. A bpmn:subProcess with no dai:type is a plain, untyped group — see Flow & Structure Elements.
See also
- AI/ML Types — the capabilities nestable inside an Agent
- Examples — the multi-agent research pipeline walks a complete Agent file