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
# 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
# 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/dataThe 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.
# 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 resourcerequires: 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 key | Description | Page |
|---|---|---|
chat | LLM interaction - responses, generation, tools, vision | LLM |
chat (routing) | Delegate model choice to config / auto-fit | LLM routing |
| - | Model backends, providers, API keys | LLM backends |
component: load_document | Load PDF, HTML, CSV, text, or a directory into text chunks - a kdeps component, YAML only | Loader |
component: embedding | Local SQLite keyword store: index / search / upsert / delete - a kdeps component, YAML only | Embedding |
component: vector_store | External vector DB: Qdrant, Chroma, Pinecone, pgvector, ... - a kdeps component, YAML only | Vector store |
component: transcribe_audio | Speech to text via a Whisper API (OpenAI, Groq, local) - a kdeps component, YAML only | Transcribe |
component: transcribe_audio_offline | Speech to text offline via whisper.cpp - a kdeps component, YAML only | Transcribe |
component: ocr_image | Text from an image via tesseract - local, no API key (a kdeps component, YAML only) | OCR |
Web
| YAML key | Description | Page |
|---|---|---|
component: http_request | HTTP requests - APIs, webhooks, auth, retry, cache - a kdeps component, YAML only | HTTP client |
component: search_local | Glob + keyword search across local files - a kdeps component, YAML only | search_local |
Data & system
| YAML key | Description | Page |
|---|---|---|
component: sql | Database queries and transactions - a kdeps component, YAML only | SQL |
component: file | Read, write, patch, list, delete, copy, move files - a kdeps component, YAML only | File |
component: git | Status, diff, log, commit, branch, push, pull - a kdeps component, YAML only | Git |
component: python | Run a Python script, stdout parsed as JSON - a kdeps component, YAML only | Python |
component: exec | Run a shell command, structured {success, exitCode, stdout, stderr, ...} - a kdeps component, YAML only | Exec |
Messaging
| YAML key | Description | Page |
|---|---|---|
component: slack_post, telegram_post, discord_post | Send a message to a chat - connector components, YAML only | Connectors |
Orchestration
| YAML key | Description | Page |
|---|---|---|
agent | Call another agent in an agency | Agent |
component | Call a reusable resource bundle | Component |
apiResponse | Return data to the HTTP caller | API 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 name | Description |
|---|---|
embedding | Vector embeddings via OpenAI Embeddings API |
search | Web search via Tavily API |
See the Components guide for installation and usage details.
Execution flow
See also
- Validation and control flow - the
validations:block - Expressions -
before:/after:,get(),set() - Items iteration and Loop
- Error handling (onError) - retry and fallback
- Agencies - multi-agent orchestration
- Components - installable capability extensions
