kdeps-components-ocr_image
v1.0.2kdeps kdeps-component: ocr_image
set components / shelf workflow
PurposeExtract text from an image with tesseract through the kdeps API
LLM context: ~159 tokens when loaded (prompt or tool definition)
Where it runs
Part of the components set, used in workflow and agent mode. Ready-made workflow steps (sql, browser, email, git, ocr...) a resource calls by name; in agent mode they are also tools.
- a resource names a component (or the model calls it as a tool)
- the component's own resources runcomponents/ocr_image
- its output goes back to the caller
Loaded by: kdeps (agent loop), /settings, kdeps validate, kdeps run, kdeps bundle package, kdeps env, kdeps export k8s, kdeps test
In the code: kdeps (agent loop)yaml.(*Parser).ParseWorkflowyaml.(*Parser).loadAssetComponents
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Also installs what it requires, when missing or older: schemas/v1, tools/ocr_image.
Pin a version with kdeps install components/ocr_image@<version>.
Contents
component.yaml
apiVersion: kdeps.io/v1
kind: Component
metadata:
name: ocr_image
description: Extract text from an image with tesseract through the kdeps API
version: "1.0.2"
interface:
inputs:
- name: file
type: string
required: true
description: Absolute path to the image (png, jpg/jpeg, tiff, bmp, gif). PDFs with a text layer go through load_document instead.
- name: language
type: string
default: eng
description: 'tesseract -l value, e.g. eng or eng+fra'
- name: psm
type: integer
default: 3
description: 'tesseract --psm page segmentation mode (3 = fully automatic)'
- name: oem
type: integer
default: 3
description: 'tesseract --oem engine mode (3 = whatever is available)'
# body is the extracted text. A missing tesseract is an error. The HTTP envelope stays inside the call.
output: "{{ output('call').body }}"
resources:
- actionId: call
name: OCR
httpClient:
method: POST
# In-process host. The HTTP executor calls the handler without dialing.
url: http://kdeps.api/apis/tools.kdeps.io/v1/tools/ocr_image/call
headers:
Content-Type: application/json
failOnError: true
timeout: 120s
data:
file: "{{ get('ocr_image.file') }}"
language: "{{ get('ocr_image.language') }}"
psm: "{{ get('ocr_image.psm') }}"
oem: "{{ get('ocr_image.oem') }}"
requires:
schemas/v1: ""
tools/ocr_image: ""
version: 1.0.2
requires:
schemas/v1: ""
tools/ocr_image: ""
files:
component.yaml: |
apiVersion: kdeps.io/v1
kind: Component
metadata:
name: ocr_image
description: Extract text from an image with tesseract through the kdeps API
version: "1.0.2"
interface:
inputs:
- name: file
type: string
required: true
description: Absolute path to the image (png, jpg/jpeg, tiff, bmp, gif). PDFs with a text layer go through load_document instead.
- name: language
type: string
default: eng
description: 'tesseract -l value, e.g. eng or eng+fra'
- name: psm
type: integer
default: 3
description: 'tesseract --psm page segmentation mode (3 = fully automatic)'
- name: oem
type: integer
default: 3
description: 'tesseract --oem engine mode (3 = whatever is available)'
# body is the extracted text. A missing tesseract is an error. The HTTP envelope stays inside the call.
output: "{{ output('call').body }}"
resources:
- actionId: call
name: OCR
httpClient:
method: POST
# In-process host. The HTTP executor calls the handler without dialing.
url: http://kdeps.api/apis/tools.kdeps.io/v1/tools/ocr_image/call
headers:
Content-Type: application/json
failOnError: true
timeout: 120s
data:
file: "{{ get('ocr_image.file') }}"
language: "{{ get('ocr_image.language') }}"
psm: "{{ get('ocr_image.psm') }}"
oem: "{{ get('ocr_image.oem') }}"
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.2 | 10/21/2026 | active |
| 1.0.1 | 10/21/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.2
- Published
- 10/21/2026