Load a workflow as a tool
Turn a kind: Workflow file into an LLM-callable tool in agent mode. You type a prompt; the model decides when to call the workflow; kdeps runs the full DAG and returns the result.
Needs: a workflow directory with workflow.yaml and a metadata.name (the quickstart project my-agent works).
How it works
you type a prompt
|
v
LLM calls tool "my-agent"
|
v
kdeps runs the full workflow DAGThe LLM never sees the resource YAML. It sees one tool, named metadata.name, and the tool's output (apiResponse.response).
Step 1: confirm the tool name
Open workflow.yaml and read metadata.name. That string is the tool name. In the quickstart it is my-agent:
# workflow.yaml
apiVersion: kdeps.io/v1
kind: Workflow
metadata:
name: my-agent # tool name in agent mode
version: "1.0.0"
targetActionId: responseThere is no kind: Agent. Agent mode is how you run a workflow, not a separate YAML kind.
Step 2: start the REPL with the workflow
From the project directory:
kdeps .Or pass the path:
kdeps ./my-agent/The REPL starts. The model can call one workflow tool (my-agent) plus the built-in tools (search, shell, files, memory). It does not register individual resources as tools.
Step 3: ask something the workflow can answer
Type a prompt that needs the workflow. For the quickstart chat API:
> Summarize entropy in one sentence using my-agentThe model calls my-agent. kdeps runs every resource in requires: order and returns apiResponse.response to the model. The model then answers you.
A folder of workflows registers one tool per workflow.yaml (and per agency):
kdeps ./agents/Summary
kdeps [path]is agent mode.kdeps run workflow.yamlis workflow mode. Same file.- The tool name is
metadata.name, not the filename. - The unit of work is the whole workflow, not a single resource.
Next steps
- Agent mode - flags, folder discovery, how tools run
- Built-in tools - what the REPL can do with no YAML
- Skills and prompt templates - markdown that shapes the REPL
- Quickstart - the HTTP API for the same file
