components-unpacked

workflowv1.0.0

Using unpacked component directories alongside .komponent archives

Install

kdeps registry install components-unpacked

Then run locally:

kdeps exec components-unpacked

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

  1. Component Directory: The components/greeter/ directory contains a standard component.yaml file (and optionally a resources/ subdirectory).

  2. Auto-Loading: When parsing the workflow, loadComponents() scans the components/ 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)
  3. Component Resource: The greeter component defines a resource sayHello that sets a greeting variable.

  4. Workflow Flow:

    • sayHello (from unpacked component) → sets greeting = "Hello from unpacked component!"
    • finalResponse → returns greeting as 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

FeatureUnpacked Directory.komponent Archive
DevelopmentEasy to edit, version control friendlySingle file, portable
DistributionMultiple filesSingle archive file
Use CaseLocal development, debuggingSharing, versioning, CI/CD
LoadingDirect from filesystemExtracted 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

VersionPublishedStatus
1.0.04/11/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
1.0.0
Published
4/11/2026

Tags

componentskomponent