Skip to content

Resources overview reference ​

This page lists every field and option. The overview shows what it does and a first example.

A resource is a single step in a workflow. It has an ID, optional dependencies, optional validation, and exactly one action. kdeps builds a dependency graph from all resources and runs them in order.

Where it runs ​

Every resource type runs in the workflow. requires: sets the order.

The shape of a resource ​

yaml
# resources/my-resource.yaml
actionId: myResource        # required: unique ID -- used by requires: and get()
name: My Resource           # required: human-readable label
description: What it does   # optional
category: api               # optional grouping label

flow:
  requires:                   # like imports -- these run first and must produce output
    - otherResource           # myResource will not run until otherResource is done

  items:                      # optional: run this resource once per item -- see /workflow/items
    - item1
    - item2

  loop:                       # optional: repeat while a condition holds -- see /workflow/loop
    while: "loop.index() < 5"

# Gate whether the resource runs at all -- see /workflow/validation
validations:
  methods: [POST]                # only run on POST requests
  routes: [/api/v1/endpoint]    # only run on this route
  headers: [Authorization]      # only run when this header is present
  params: [q, limit]            # only run when these params are present
  skip:
    - get('skip') == true       # skip silently if true
  check:
    - get('q') != ''            # fail with the error below if false
  error:
    code: 400
    message: Query required

# Expressions that run around the action -- see /workflow/expressions
before:                 # prepare values the action reads
  - set('pre', 'value')
after:                  # process the output for downstream resources
  - set('post', 'value')

The one action ​

yaml
# resources/my-resource.yaml
actionId: myResource        # required: unique ID -- used by requires: and get()

# Exactly one primary action per resource (apiResponse: may accompany it
# on the same resource to format the HTTP response):
chat: { ... }        # send a prompt to an LLM; reply text at .message.content
agent: { ... }       # run another agent's full workflow; output is its apiResponse
apiResponse: { ... } # build the HTTP response returned to the caller
component:           # call a shipped or installed component:
  name: http_request #   make an HTTP request; output is the parsed response body
  with:
    method: GET
    url: https://api.example.com/data

The tables under Resource types are the allowlist. An action listed as component: runs only that way. Its native key (exec:, python:, embedding:, searchLocal:, httpClient:, loader:, vectorStore:, ...) is not valid as a primary action or in a before:/after: step. The parser rejects it, and the error gives the component. Actions listed as a plain YAML key have no bundled component and run natively.

actionId and requires ​

actionId is the resource's unique name. It is what targetActionId points to, and the key you pass to get() to read the resource's output.

yaml
# resources/response.yaml
actionId: response
name: API Response
flow:
  requires: [llm]          # response will not run until llm is done
apiResponse:
  response:
    answer: get('llm').message.content   # reply text from the llm resource

requires: lists direct dependencies only. kdeps resolves transitive dependencies automatically - you do not list the whole chain.

Resource types ​

All executors are part of the kdeps binary. You do not install them. This page shows them in groups by function. Each executor has a link to its reference page.

AI & language ​

YAML keyDescriptionPage
chatLLM interaction - responses, generation, tools, visionLLM
chat (routing)Delegate model choice to config / auto-fitLLM routing
-Model backends, providers, API keysLLM backends
component: load_documentLoad PDF, HTML, CSV, text, or a directory into text chunks - a kdeps component, YAML onlyLoader
component: embeddingLocal SQLite keyword store: index / search / upsert / delete - a kdeps component, YAML onlyEmbedding
component: vector_storeExternal vector DB: Qdrant, Chroma, Pinecone, pgvector, ... - a kdeps component, YAML onlyVector store
component: transcribe_audioSpeech to text via a Whisper API (OpenAI, Groq, local) - a kdeps component, YAML onlyTranscribe
component: transcribe_audio_offlineSpeech to text offline via whisper.cpp - a kdeps component, YAML onlyTranscribe
component: ocr_imageText from an image via tesseract - local, no API key (a kdeps component, YAML only)OCR

Web ​

YAML keyDescriptionPage
component: http_requestHTTP requests - APIs, webhooks, auth, retry, cache - a kdeps component, YAML onlyHTTP client
component: search_localGlob + keyword search across local files - a kdeps component, YAML onlysearch_local

Data & system ​

YAML keyDescriptionPage
component: sqlDatabase queries and transactions - a kdeps component, YAML onlySQL
component: fileRead, write, patch, list, delete, copy, move files - a kdeps component, YAML onlyFile
component: gitStatus, diff, log, commit, branch, push, pull - a kdeps component, YAML onlyGit
component: pythonRun a Python script, stdout parsed as JSON - a kdeps component, YAML onlyPython
component: execRun a shell command, structured {success, exitCode, stdout, stderr, ...} - a kdeps component, YAML onlyExec

Messaging ​

YAML keyDescriptionPage
component: slack_post, telegram_post, discord_postSend a message to a chat - connector components, YAML onlyConnectors

Orchestration ​

YAML keyDescriptionPage
agentCall another agent in an agencyAgent
componentCall a reusable resource bundleComponent
apiResponseReturn data to the HTTP callerAPI response

Registry components (installable via kdeps install) ​

Some install names (embedding) are also kdeps components. The registry component is a separate package. When you install it, it replaces the shipped component.

Install nameDescription
embeddingVector embeddings via OpenAI Embeddings API
searchWeb search via Tavily API

See the Components guide for installation and usage details.

Execution flow ​

RequestRoute MatchingBuild Dep GraphFor each resource (in order)Return TargetResponseCheck RouteskipCheck Skipskip silentlyPreflight Checkerrorexecute before:Execute Actionexecute after:Store Outputnot matchingcondition truevalidation fails

See also ​

kdeps has the Apache 2.0 License.