components-unpacked
workflowv1.0.0Using unpacked component directories alongside .komponent archives
Install
Then run locally:
Configure LLM provider in ~/.kdeps/config.yaml (created automatically on first run).
README
Components Unpacked Example
This example demonstrates using unpacked component directories in the components/ folder, alongside .komponent archives.
Structure
components-unpacked/
├── workflow.yaml
├── resources/
│ └── response.yaml
└── components/
└── greeter/ # Unpacked component directory
└── component.yaml
How It Works
-
Component Directory: The
components/greeter/directory contains a standardcomponent.yamlfile (and optionally aresources/subdirectory). -
Auto-Loading: When parsing the workflow,
loadComponents()scans thecomponents/directory and:- Processes each subdirectory that contains a
component.yaml(or .j2/.yml variants) - Loads the component and merges its resources into the workflow
- Deduplicates by
actionId(later entries win)
- Processes each subdirectory that contains a
-
Component Resource: The
greetercomponent defines a resourcesayHellothat sets agreetingvariable. -
Workflow Flow:
sayHello(from unpacked component) → setsgreeting = "Hello from unpacked component!"finalResponse→ returnsgreetingas JSON
Running the Example
kdeps run examples/components-unpacked/workflow.yaml
Expected output:
{
"success": true,
"message": "Hello from unpacked component!"
}
Unpacked Components vs .komponent Archives
| Feature | Unpacked Directory | .komponent Archive |
|---|---|---|
| Development | Easy to edit, version control friendly | Single file, portable |
| Distribution | Multiple files | Single archive file |
| Use Case | Local development, debugging | Sharing, versioning, CI/CD |
| Loading | Direct from filesystem | Extracted to temp dir automatically |
Both formats are fully supported and can coexist in the same components/ directory. Use unpacked directories during development for easy iteration, then package as .komponent for distribution.
Creating an Unpacked Component
Simply create a subdirectory under components/ with a component.yaml:
mkdir components/my-component
cat > components/my-component/component.yaml << 'EOF'
apiVersion: kdeps.io/v1
kind: Component
metadata:
name: my-component
resources:
- apiVersion: kdeps.io/v1
kind: Resource
metadata:
actionId: myAction
run:
expr:
- set('result', 'done')
EOF
The component's resources will be automatically available to your workflow.
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.0 | 4/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 4/11/2026