Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

DAI Studio

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

KeyLabelInputValues / notes
dai:agentRoleRoletextThe agent’s purpose — e.g. “Research analyst”, “Code reviewer”
dai:defaultModelModelmodel pickerThe model this agent uses — overrides the diagram’s default
dai:agentTypeAgent Typeselectautonomous · supervised · reactive · collaborative
dai:memoryTypeMemoryselectnone · in-context · persistent · external
dai:maxIterationsMax IterationsnumberMaximum reasoning iterations before halting; min 1
dai:stopConditionStop ConditiontextareaPlain-language description of when the agent should stop
dai:outputSchemaOutput SchemacodeJSON schema describing the agent’s output structure
dai:notesDescriptiontextareaWhat this agent does
dai:properties (child element)InputsrowsTyped 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:

TypeUse it for
ModelThe model an agent uses, with provider, context window, and default parameters — richer than dai:defaultModel alone
MCP ServerAn MCP server whose Tools are nested inside it; connect Agents to it
RouterPicks which agent, model, or tool handles a request; connect it to each target
SessionA conversation or run scope that contains the steps sharing its state
HumanA human-in-the-loop approval, review, or escalation step
OutputWhat 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