Skip to content

The workflow file (agent, tools, runner)

This describes workflow.yaml as users see it in the NAT example: e2e-tests/dragent/nat/workflow.yaml.

llms — name the models DRAgent can use

You declare one or more entries; each has an _type (see llm.md). The example names a single LLM datarobot_llm and points the workflow at it with llm_name.

functions — tools implemented as NAT functions

Each key under functions: is a tool name the orchestrator can call. In the example you will see:

  • chat_completion sub-workflows (planner, writer): each has its own system_prompt, description, and llm_name referencing datarobot_llm.
  • A custom tool generate_objectid: _type matches a tool registered from Python (see register.py in the same folder).

Those names are what you list under workflow.tool_names.

function_groups — bundled tools (MCP)

mcp_tools in the example is a group (_type: datarobot_mcp_client), not a single function. It expands to the MCP tools exposed by your deployment. You still add mcp_tools to tool_names so the orchestrator may call them. Details: mcp.md.

authentication — credentials MCP calls should use

The example defines datarobot_mcp_auth so MCP requests carry the same kind of auth as the rest of the DataRobot stack. See mcp.md.

memory — optional long-term memory (NAT workflows)

Use _type: dr_mem0_memory under memory: when wrapping a NAT agent with workflow._type: auto_memory_agent or streaming_memory_agent. The workflow points at the memory entry by name with memory_name. See memory.md.

workflow — the top-level runner

This block picks which agent pattern runs and which tools are in play.

Field in the example What it means
_type: per_user_tool_calling_agent NAT/DRAgent tool-calling agent: one LLM orchestrates calls to the listed tools.
llm_name: datarobot_llm Uses the LLM defined under llms.
tool_names Ordered list of tools/groups the model may invoke: here planner, writer, mcp_tools, generate_objectid.
return_direct Tools whose output should be returned to the user as-is (here writer).
system_prompt Instructions for the orchestrator (how to chain planner → writer, when to use MCP, etc.).
verbose Extra logging from the runner.

Other samples in the repo use different workflow._type values for LangGraph, LlamaIndex, CrewAI, or a minimal base agent—see those folders’ READMEs; the llms: + general: pattern is the same idea.

Optional Python beside the YAML

register.py only registers extra tools so names like generate_objectid resolve. You do not duplicate the graph in code—the declared structure is the YAML.


Legacy note: a Python-only path can load this YAML without DRAgent. Prefer nat dragent run / nat dragent serve and the file above; that path is what we document and extend.