Skip to content

Component resource

The component: resource calls a reusable resource bundle - a registry component installed with kdeps registry install, or a custom component in your project's components/ directory. Think of it like calling a function: you pass typed inputs via with:, the component's own resources run, and you get its result back.

Where it runs

Both workflow mode and agent mode. See Components for the difference between registry and custom components, and how to build one.

Basic usage

yaml
# resources/scrape.yaml
actionId: scrape
name: Extract Page Content
component:
  name: scraper                 # installed via `kdeps registry install scraper`
  with:
    url: "https://example.com"
    selector: ".article"
yaml
# resources/reply.yaml
actionId: reply
name: Send Bot Reply
component:
  name: botreply
  with:
    platform: telegram
    message: "Hello!"

Configuration options

OptionDescription
nameComponent name - either the registry install name, or a directory under components/ (required)
versionPin a specific installed version (registry components only)
withKey-value inputs passed to the component. Each entry is injected as set('<callerActionId>.<key>', value) before the component's resources run, so the same component can be called multiple times with different inputs in one workflow

Output

Whatever the component's own result resource returns - the shape depends on the component. Check the component's own documentation or component.yaml for its output contract.

See also

Released under the Apache 2.0 License.