input-component

workflowv1.0.0

Built-in input component that collects named input slots and returns structured JSON

Install

kdeps registry install input-component

Then run locally:

kdeps exec input-component

Configure LLM provider in ~/.kdeps/config.yaml (created automatically on first run).

README

input-component

Demonstrates the built-in input component — a pre-installed component that collects named input slots and returns them as structured JSON.

No kdeps component install needed. The input component ships with kdeps.

Structure

input-component/
├── workflow.yaml
└── resources/
    ├── 01-collect.yaml   # calls built-in input component
    ├── 02-answer.yaml    # passes collected inputs to LLM
    └── 03-response.yaml  # returns inputs + LLM answer

Usage

kdeps run examples/input-component

Requirements

  • Ollama running locally with llama3.2 (ollama pull llama3.2)

The Built-in input Component

The input component accepts up to 14 named slots:

SlotPurpose
queryA query string
promptAn LLM prompt
textPlain text
dataArbitrary data
keyA key name
valueA value
ahEight generic slots

Only non-empty slots are included in the JSON output.

How It Works

# 1. Collect inputs
run:
  component:
    name: input
    with:
      query: "What is the capital of France?"
      text: "The Eiffel Tower is in Paris."
      key: "location"

The output is a JSON object with only the provided slots:

{"query":"What is the capital of France?","text":"The Eiffel Tower is in Paris.","key":"location"}

Access individual fields from the output:

# Using json_decode filter
"{{ output('collectInputs') | json_decode | get('query') }}"

When to Use the input Component

The input component is most useful in workflows that declare sources: [component] — i.e., sub-workflows designed to be called by a parent. The parent passes inputs via with:, the sub-workflow uses the input component to collect and normalize them, then proceeds with its logic.

See the component-input-source example for a complete sources: [component] workflow.

Validate

kdeps validate examples/input-component

Versions

VersionPublishedStatus
1.0.04/11/2026active

Details

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

Tags

inputcomponents