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

kdeps-commands-fold

v2.0.0

kdeps command: fold

set commands / shelf agent

PurposeShow fold status: auto on/off, threshold, items, last fold, tokens since

LLM context: none - kdeps uses it without sending it to the model

Where it runs

Part of the commands set, used in workflow and agent mode. Slash commands: the help and completion of the built-in ones, and declared commands that run other commands and prompts.

  1. you type /name in kdeps
  2. the command runs: built in, or its declared stepscommands/fold
  3. prompts go to the model; the output is shown

Loaded by: kdeps (agent loop), /update, kdeps run

In the code: kdeps (agent loop)agent.(*REPL).Runagent.declaredCommand

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 commands/fold

Also installs what it requires, when missing or older: tools/session_ops.

Pin a version with kdeps install commands/fold@<version>.

Contents

order
80
/foldShow fold status: auto on/off, threshold, items, last fold, tokens since
/fold nowFold now, whatever the threshold
/fold auto [on|off]Automatic folding: a lighter, checkpoint-only summarize+archive (default on)
/fold threshold <n|default>Tokens since the last checkpoint that trigger a fold (e.g. 2000, 2k)
/fold items <n|default>Checkpoints kept in the memory prompt
/fold preset <tight|balanced|loose>Set threshold and items together
/fold
  1. 1

    Calls a kdeps API tool

    session_ops
    operation: get
    key: fold
    

    prints

    **Fold**
      auto: {{.value}}
      threshold: {{.threshold}} tokens
      context items: {{.items}}
      last fold: {{.last}}
      accumulated since: {{.accumulated}} / {{.threshold}} tokens
/fold now
  1. 1

    Calls a kdeps API tool

    session_ops
    operation: compact
    

    prints

    {{if .summary}}**Fold summary:**
    
    {{.summary}}{{else}}Nothing to fold yet: the session has {{.turns}} turn(s); the last {{.keep}} always stay verbatim, so it needs more than {{.keep}} plus one.{{end}}
/fold auto

Shows or sets the session setting fold to one of onoff. What it prints is the setting block below.

/fold threshold

Shows or sets the session setting fold-threshold. What it prints is the setting block below.

/fold items

Shows or sets the session setting fold-items. What it prints is the setting block below.

/fold preset
/fold preset tight
  1. 1

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-threshold
    value: "1000"
    
  2. 2

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-items
    value: "3"
    

    prints

    Fold preset tight applied: threshold={{.steps.threshold.value}}, items={{.value}} (saved)
/fold preset balanced
  1. 1

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-threshold
    value: default
    
  2. 2

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-items
    value: default
    

    prints

    Fold preset balanced applied: threshold={{.steps.threshold.value}}, items={{.value}} (saved)
/fold preset loose
  1. 1

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-threshold
    value: "8000"
    
  2. 2

    Calls a kdeps API tool

    session_ops
    operation: set
    key: fold-items
    value: "10"
    

    prints

    Fold preset loose applied: threshold={{.steps.threshold.value}}, items={{.value}} (saved)
requires:
  tools/session_ops: ""

Versions

VersionPublishedStatus
2.0.010/24/2026active
1.0.110/21/2026active
1.0.010/12/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
2.0.0
Published
10/12/2026

Tags

kdepscommand