Skip to content

Dev commands ​

Commands for local development: run, agent REPL, validate, scaffold, configure, and diagnose.

kdeps run ​

Run a workflow locally (default execution mode).

bash
kdeps run [workflow.yaml | directory | package.kdeps] [flags]

Arguments:

  • workflow.yaml - Path to a workflow file
  • directory - Path to a directory containing workflow.yaml
  • package.kdeps - Path to packaged workflow file

Flags:

FlagDescriptionDefault
--devEnable hot reload modefalse
--portAPI server port numberFrom workflow config
--debugEnable debug loggingfalse
--interactiveOpen an interactive LLM REPL alongside the running workflowfalse
--fileFile path to process (file input source only). Takes priority over stdin, KDEPS_FILE_PATH, and input.file.path config
--eventsEmit structured NDJSON execution events to stderr (resource lifecycle, failure classification)false
--memoryEnable the agent memory store in workflow mode - resources can use memory_save/memory_search/memory_list/memory_delete expression functionsfalse

Examples:

bash
export KDEPS_API_AUTH_TOKEN=dev-token      # Required when apiServer is configured
kdeps run workflow.yaml                    # Run from file
kdeps run ./my-agent/                      # Run from a directory containing workflow.yaml
kdeps run myapp.kdeps                      # Run from package
kdeps run workflow.yaml --dev              # Hot reload
kdeps run workflow.yaml --debug            # Debug logging
kdeps run workflow.yaml --port 16395       # Custom port
kdeps run workflow.yaml --interactive      # LLM REPL alongside server

When apiServer is configured, kdeps refuses to start without KDEPS_API_AUTH_TOKEN or api_auth_token in ~/.kdeps/config.yaml. Clients must send Authorization: Bearer <token> on workflow routes. See Security reference.


kdeps [path] (agent REPL) ​

Start agent mode - an interactive LLM loop where whole workflows and components are registered as callable tools. Pass a path to expose workflows as tools, or omit it for a bare REPL with no workflow tools.

bash
kdeps [path] [flags]

Flags:

FlagDefaultDescription
--modelKDEPS_AGENT_MODEL or llama3.2:1bLLM model name
--backendKDEPS_AGENT_BACKEND or fileLLM backend (file = local llamafile, no server)
--base-urlKDEPS_AGENT_BASE_URLLLM API base URL
--system(none)System prompt injected at conversation start
--skill(none)Load a skill file or directory (repeatable)
--resume(none)Resume a saved session by ID
--index(none)Search a folder with this project: add it to the project card and index it before the session starts (repeatable; see search folders)
--debugfalseEnable debug logging

Examples:

bash
kdeps                                                         # bare REPL, no workflow tools
kdeps ./my-agent/                                             # one tool: metadata.name
kdeps ./agents/                                               # all workflows in folder as tools
kdeps ./my-agent/ --model mistral
kdeps ./agents/ --system "You are a helpful assistant."

See Agent Mode for full details.


kdeps validate ​

Validate workflow configuration against schema and business rules.

bash
kdeps validate [workflow.yaml | directory] [flags]

What it validates:

  • YAML syntax
  • Schema compliance (JSON Schema)
  • Resource dependencies
  • Expression syntax
  • Circular dependency detection
  • Business rules
  • Static analysis (unreachable resources, bad expression refs, missing component inputs)

Examples:

bash
kdeps validate workflow.yaml
kdeps validate .                            # Validate all in directory
kdeps validate myapp.kdeps                  # Validate package

Output:

Validating: workflow.yaml

✓ YAML syntax valid
✓ Schema validation passed
✓ Resource dependencies resolved
✓ No circular dependencies
✓ Expression syntax valid

Workflow validated successfully

kdeps test ​

Run the tests: cases declared in workflow.yaml against the workflow's own router, in-process. No port is bound.

bash
kdeps test [workflow.yaml | directory] [flags]

Flags:

FlagDescriptionDefault
--fail-fastStop at the first failing casefalse

Examples:

bash
export KDEPS_API_AUTH_TOKEN=dev-token   # Required when apiServer is configured
kdeps test ./my-agent/                   # Every case in workflow.yaml
kdeps test workflow.yaml                 # Single file
kdeps test myapp.kdeps                   # Packaged workflow
kdeps test . --fail-fast                 # Stop at the first failure

The request path is the same one a live client gets: middleware, bearer auth, route matching, executors, and apiResponse formatting. Cases that send no Authorization or X-API-Key header are sent with KDEPS_API_AUTH_TOKEN as a bearer token. Setup matches kdeps run: .j2 rendering, schema validation, environment setup, and the LLM backend when a chat resource needs one.

Output:

text
Running 2 test(s) for my-agent

  PASS  health (200, 0s)
  FAIL  chat: expected status 200, got 500
        status: 500
        body: {"success":false,"error":{"code":"INTERNAL_ERROR",...}}

1 passed, 1 failed

Exits 0 when every case passes and 1 when any case fails or the workflow defines no tests:. A failing case prints its status and the first 400 bytes of the response.

See Test a workflow for the tests: format and assertion reference.


kdeps new ​

Create a new AI agent with interactive prompts.

bash
kdeps new [agent-name] [flags]

Flags:

FlagDescriptionDefault
--template, -tAgent template to useapi-service
--forceOverwrite existing directoryfalse

Available templates: api-service, sql-agent, agency, whatsapp-bot (a WhatsApp Cloud API webhook: verification handshake, signed messages answered by an LLM and sent back through the http_request component)

Examples:

bash
kdeps new my-agent                           # Uses api-service template
kdeps new my-agent --template sql-agent      # SQL agent template
kdeps new my-bot --template whatsapp-bot     # WhatsApp bot (webhook + Graph API reply)
kdeps new my-agent --force                   # Overwrite existing

Generated structure:

my-agent/
├── workflow.yaml
├── resources/
│   ├── http_client.yaml
│   ├── llm.yaml
│   └── response.yaml
└── README.md

kdeps edit ​

Open the global kdeps configuration file (~/.kdeps/config.yaml) in your editor. Scaffolded if it does not exist.

bash
kdeps edit [flags]

Editor resolution: $KDEPS_EDITOR > $VISUAL > $EDITOR > vi

bash
kdeps edit
KDEPS_EDITOR=code kdeps edit                # Open in VS Code

kdeps doctor ​

Run system health checks to diagnose common configuration and environment issues.

bash
kdeps doctor [flags]

Checks:

CheckDescription
Config fileExistence of ~/.kdeps/config.yaml
Config validationTypos in API key names, missing keys
LLM backendModels dir and cached llamafiles (file backend) or TCP connectivity (ollama)
Pythonpython3 availability in PATH
Backend/API keyCloud backend configured without its API key
AgentsInstalled agent count
Env varsCritical environment variables set

Exits with code 1 when any check has FAIL status.


kdeps instrument ​

List, show and remove sessions recorded with --instrument.

bash
kdeps --instrument=billing-bug          # record an agent session
kdeps run workflow.yaml --instrument=api-500
kdeps instrument list                   # saved sessions, newest first
kdeps instrument show billing-bug       # session.md and events.ndjson
kdeps instrument show billing-bug --trace   # also trace.log
kdeps instrument path billing-bug       # the folder
kdeps instrument rm billing-bug

The session folder is ~/.kdeps/instrument/<name>/:

text
session.md      # command, folder, start and end, event counts, how to read the rest
events.ndjson   # one JSON object per prompt, model call, tool call and workflow event
trace.log       # every log line at debug level, and the call-chain trace

Bare --instrument names the session by its start time. Put the name after =. With a space, the next argument (the workflow path) is taken as the name.


kdeps --upgrade ​

Check for a newer kdeps release and, for a standalone install, download/verify/install it. Same flow as the REPL's /upgrade command - see Agent loop REPL features - Updating kdeps for the full behavior (what each install method does, checksum verification, etc.).

bash
kdeps --upgrade

Flags:

FlagDescriptionDefault
--nightlyCheck the nightly channel instead of the latest stable releasefalse
--target-versionInstall this exact version instead of the latest, skipping the update check - can be older than the running build (a downgrade); takes priority over --nightly""
bash
kdeps --upgrade --nightly
kdeps --upgrade --target-version 2.35.0

Assets: kdeps install, update, uninstall, list, profile ​

kdeps install, kdeps update and kdeps uninstall install, update and remove kdeps' versioned assets - harness sections, events, actions, presets, themes, tool definitions, slash commands, LLM server recipes, model registries, project templates, schemas and components - as well as registry packages. An argument naming an asset set (tools) or item (tools/bash_exec) is an asset; anything else is a package. Same as the REPL's /update; see Updating assets for how versions, pins and removal work.

bash
kdeps update                          # the chosen profile and everything installed since, to their newest versions
kdeps update --check                  # list available updates, change nothing
kdeps update harness                  # every item in one set
kdeps install harness/safety          # one item at its newest version (unpins it), with what it requires
kdeps install harness/safety@1.2.0    # exactly that version, pinned (older = downgrade)
kdeps uninstall themes/vim themes/linux   # remove items (restore with: kdeps install themes/vim)
kdeps list --assets                   # every item, its version, state, shelf and ~context tokens
kdeps list rag                        # one shelf (model, context, harness, tools, memory, rag, agent, guardrails, evals, workflow, deploy)
kdeps profile agent                   # install a profile: minimum, workflows, agent, deploy, full (or sets and items: docker,tools/bash_exec)
kdeps profile                         # choose the profile again, or tick sets and single items yourself (custom); needs a terminal
CommandAssets
kdeps install <ref>...Install sets or items (@version pins), and what they require; each line shows the item's estimated LLM context tokens, and the total is printed last
kdeps update [ref]...No args: every installed asset and the profile; --check lists updates without installing
kdeps uninstall <ref>...Remove items (comma-separated or several args); required items cannot be removed
kdeps list --assetsEvery asset with its version, state (source, downloaded, pinned, removed), shelf and estimated LLM context tokens, with the installed total
kdeps list <shelf>Assets on one shelf. Item ids stay set/name
kdeps profile [name]Install a profile (minimum, workflows, agent, deploy, full, custom, or a comma-separated list of sets and set/name items) and record it as what update keeps current; no name opens the picker

The profiles and what each installs are listed in Updating assets.


kdeps chat ​

Interactive AI assistant that generates and runs kdeps workflows from natural language.

bash
kdeps chat [flags]

Flags:

FlagDescriptionDefault
--modelLLM model for workflow generationFrom config
--base-urlLLM backend base URL, including /v1http://localhost:11434/v1
--sessionResume a previous session by IDNew session
--no-executeGenerate workflow but do not allow /runfalse

REPL slash commands:

CommandDescription
/showPrint the generated workflow YAML
/runExecute the workflow
/save [path]Save workflow to directory
/exportShow Kubernetes manifests
/resetClear conversation and start fresh
/quitExit
bash
kdeps chat                                    # Start interactive assistant
kdeps chat --model gpt-4o                     # Use specific model
echo "list files in /tmp" | kdeps chat --no-execute

kdeps llamafile ​

Manage the local model registry. Covers llamafile, GGUF (llama.cpp), and Ollama models. Aliases like llama3.2:1b resolve to cached model files in ~/.kdeps/models/; models are downloaded on first use with aria2c (fast parallel downloads with resume) or built-in HTTP. Ctrl+C cancels an in-flight download immediately - an interrupted aria2c download aborts instead of restarting via the HTTP fallback, and the partial file is kept so the next attempt resumes.

When llmfit is installed, the agent REPL's /model picker shows a hardware-fit score (0-100) and level for each local model - Perfect, Good, Marginal, or Too Tight - based on your machine's RAM/VRAM, so you can tell before downloading whether a model will actually run. Fit levels are searchable in the picker: type perfect or tight to filter. When aria2c or llmfit is not installed, the REPL prints a one-line install tip at startup.

bash
kdeps llamafile list      # all known aliases (LF + GGUF + Ollama) with size, quant, and URL
kdeps update models       # refresh the registries (llamafile + GGUF) from kdeps.io

list shows a TYPE column (LF, GGUF, or model name) for each entry. The registries are the models/llamafile and models/gguf assets: harvested nightly from HuggingFace, published as new versions, and installed with kdeps update models (see Updating assets). Models you register yourself (HuggingFace search or a custom URL) live in ~/.kdeps/llamafile_versions.yaml and ~/.kdeps/gguf_versions.yaml and are merged on top. Ollama models are discovered from the local ollama list output.


kdeps knowledge ​

Sets up and maintains the knowledge vault: the markdown notes the agent recalls from each turn without reading them. It is on by default in ~/.kdeps/notes and set up by the first agent session.

bash
kdeps knowledge init [folder]       # scaffold projects/, shared/, inbox/, archive/, KDEPS.md (default ~/.kdeps/notes)
kdeps knowledge build               # build the link graph (only changed notes and code files are re-read)
kdeps knowledge build --extract     # a local model reads changed notes first: inferred edges with confidence
kdeps knowledge check               # one home per fact: next steps outside cards, duplicate summaries, dangling links
kdeps knowledge recall "why monthly billing"   # what recall would hand the agent
kdeps knowledge report              # GRAPH_REPORT.md: god nodes, Louvain communities, surprising connections
FlagDescriptionDefault
--vaultVault folderknowledge.vault in ~/.kdeps/config.yaml, else ~/.kdeps/notes
--extract (build)Have a local model read changed notes firstfalse
--model (build)Model for --extractknowledge.extract.model, else the detected local model
--limit (build)Most notes --extract reads0 (all changed)

check exits non-zero when it reports anything.


kdeps konfig export ​

Export the current effective agent-loop config - tuning, harness, themes, and skills - to one self-contained YAML file. See konfig for the full file format and the REPL's /konfig export equivalent.

bash
kdeps konfig export              # writes ./konfig.yaml
kdeps konfig export path/to/mine.yaml

Reads whatever is persisted in ~/.kdeps/agent-loop-settings.yaml, or built-in defaults if nothing has ever been customized - so this works even against a completely fresh ~/.kdeps.


See also ​

Released under the Apache 2.0 License.