Alphakdeps.io is experimental and evolving — the registry and packages may change or reset.
kdeps componentkdeps asset

kdeps-components-read_file

v1.1.1

kdeps kdeps-component: read_file

set components / shelf workflow

PurposeRead a file through the kdeps API and return its text

LLM context: ~210 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.

  1. a resource names a component (or the model calls it as a tool)
  2. the component's own resources runcomponents/read_file
  3. 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.

kdeps install components/read_file

Also installs what it requires, when missing or older: schemas/v1, tools/read_file.

Pin a version with kdeps install components/read_file@<version>.

Contents

component.yaml

apiVersion: kdeps.io/v1
kind: Component
metadata:
  name: read_file
  description: Read a file through the kdeps API and return its text
  version: "1.1.1"
interface:
  inputs:
    - name: file_path
      type: string
      description: Path of the file to read. Omit when using match_id
    - name: offset
      type: number
      default: 0
      description: First line to return (1-based). 0 reads from the start
    - name: limit
      type: number
      default: 0
      description: How many lines to return. 0 reads through the end
    - name: match_id
      type: string
      description: A match_id from a search_local result, instead of file_path
    - name: context_before
      type: number
      description: Only with match_id - lines of context before the match (default 20)
    - name: context_after
      type: number
      description: Only with match_id - lines of context after the match (default 20)
  # body is the formatted file text. The HTTP envelope stays inside the call.
  output: "{{ output('call').body }}"
resources:
  - actionId: call
    name: Read file
    httpClient:
      method: POST
      # In-process host. The HTTP executor calls the handler without dialing.
      url: http://kdeps.api/apis/tools.kdeps.io/v1/tools/read_file/call
      headers:
        Content-Type: application/json
      failOnError: true
      timeout: 30s
      data:
        file_path: "{{ get('read_file.file_path') }}"
        offset: "{{ get('read_file.offset') }}"
        limit: "{{ get('read_file.limit') }}"
        match_id: "{{ get('read_file.match_id') }}"
        context_before: "{{ get('read_file.context_before') }}"
        context_after: "{{ get('read_file.context_after') }}"
requires:
  schemas/v1: ""
  tools/read_file: ""

Versions

VersionPublishedStatus
1.1.110/21/2026active
1.1.010/21/2026active
1.0.010/20/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
1.1.1
Published
10/20/2026

Tags

kdepskdeps-component