Skip to content

Concepts overview: full text ​

This page has every step and detail. The overview is the short version.

This page shows the structure of a workflow, how data moves between steps, and which parts apply to each mode. Start with What is kdeps? if you have not run kdeps.

How a workflow is shaped ​

A kdeps project is a folder. workflow.yaml is the manifest - name, version, and targetActionId (the resource that produces the final result). Every other .yaml file under resources/ is a single resource: one LLM call, one SQL query, one shell command, one HTTP request. A resource lists what it requires:, and kdeps runs the resources in that dependency order, passing each one's output forward. That ordered graph is the workflow.

The tables below group every concept by what it does. Start with the workflow, then reach for the rest as you need them.

The workflow and its agent ​

ConceptWhat it isMode
WorkflowA DAG of resources that runs in dependency order and returns a response; the one way to run kdepsWorkflow
Input sourcesHow requests arrive: api, bot, file, interactiveWorkflow
Agent loopA chat with loop:: an LLM that calls tools over many roundsAgent
AgenciesSeveral agents bundled under one agency.yaml, calling each other with agent:Both
ComponentsReusable resource bundles you install or build, invoked with component:Both

Wiring data between steps ​

ConceptWhat it isMode
Expressionsexpr-lang snippets in , before:/after:, and check:Both
Expression helpersJson(), Safe(), Debug(), default() and other utilitiesBoth
Data accessget()/set() plus the input and request shorthandsBoth (input/request: workflow)
Function callingLet a chat: resource call other resources mid-responseWorkflow
Inline resourceschat/sql/python/... actions nested in a resource's before:/after:Both

Control flow and input ​

ConceptWhat it isMode
Validation and controlThe validations: block - skip, preflight check, route/method limits, input schemaWorkflow
Error handling (onError)Retry, fallback value, or fail on a resource errorWorkflow
Items iterationRun a resource once per list entry (for-each)Both
While-loopRepeat a resource while a condition holds; every: for scheduled tasksBoth
Input sourcesFeed a workflow from an HTTP API, a file, or listeners (a chat bot, a webhook)Workflow
Jinja2 templatesYAML preprocessing and project scaffoldingBoth

State ​

ConceptWhat it isMode
Session storageValues that persist across requests from the same callerWorkflow
Persistent memoryProject-scoped facts the agent recalls across sessionsAgent (tools also work in workflow)
Memory internalsAuto-extraction, the memory graph, and prompt injectionAgent

kdeps has the Apache 2.0 License.