input-component
workflowv1.0.0Built-in input component that collects named input slots and returns structured JSON
Install
Then run locally:
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:
| Slot | Purpose |
|---|---|
query | A query string |
prompt | An LLM prompt |
text | Plain text |
data | Arbitrary data |
key | A key name |
value | A value |
a – h | Eight 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
| 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