kdeps agent
An autonomous LLM REPL you run on your machine. Tool use, persistent memory, multi-step reasoning, skills, and a judge panel (the eval, on unless you turn it off). The default model is local, with no API key, fully offline. Point llm.base_url at an LLM server you run and the same REPL sends prompts there. Whole workflows and components register as callable tools; the model decides what to invoke.
kdeps # bare REPL - built-in tools only
kdeps ./my-agent # also load that agent's workflows/components as tools# ~/.kdeps/config.yaml
llm:
backend: openai
base_url: http://192.168.1.50:8000/v1 # your LLM server, your network
models:
- llama3.2 # one model, or severalThe desktop app reads the same file. The boundary rules are on Data sovereignty. The server page has the client contract.
Not this? If you want a deterministic request→response pipeline (same input, same execution path, safe to run unattended), that is kdeps workflow. To orchestrate several agents as one system, kdeps agencies.
Single workflow vs folder
When you point at a folder, kdeps discovers every workflow and agency file inside it (recursively). Each becomes a separate tool. The tool name is metadata.name from the workflow's manifest - not the filename.
| Target | Workflow/agency/component tools registered |
|---|---|
| No path | None (built-in tools only) |
| Single workflow file/dir | One tool (metadata.name) + one per component |
| Single agency file | One tool (agency metadata.name) |
| Folder | One tool per workflow/agency found recursively + component tools |
How it works
Given a workflow whose metadata.name is my-agent, running kdeps ./my-agent/ gives the LLM one tool named my-agent. When it calls that tool, kdeps runs the full workflow DAG - every resource in dependency order - and returns apiResponse.response to the LLM. The LLM can then call more tools or produce a final answer.
Command and flags
kdeps [path] [flags][path] is optional. When provided it must be a workflow or agency file or directory.
| Flag | Default | Description |
|---|---|---|
--model | KDEPS_AGENT_MODEL or llama3.2:1b | LLM model name |
--backend | KDEPS_AGENT_BACKEND or file | LLM backend (file, gguf, ollama, openai, ...) |
--base-url | KDEPS_AGENT_BASE_URL | LLM API base URL |
--system | (none) | System prompt injected at conversation start |
--skill | (none) | Path to a skill file or directory (repeatable) |
--prompt | (none) | Path to a prompt templates directory (repeatable) |
--resume | (none) | Session ID to resume directly (skips the picker) |
--new | false | Start clean, skipping this folder's resume picker |
--index | (none) | Search a folder outside the project with it (repeatable): added to the card and indexed first. See search folders |
--theme | normal | REPL theme: normal, black, linux, vim, emacs, or a custom name from ~/.kdeps/themes/ |
--debug | false | Enable debug logging |
# Environment variables (flags override these)
KDEPS_AGENT_MODEL=llama3.2:1b
KDEPS_AGENT_BACKEND=file # default: local llamafile
KDEPS_AGENT_BASE_URL=http://localhost:11434/v1
KDEPS_THEME=black # same as --themeExamples
kdeps # bare REPL, built-in tools only
kdeps ./my-agent/ # register one workflow as a tool
kdeps ./agents/ # register every workflow in the folder
kdeps ./agents/ --model mistral --system "You are a data analyst."
kdeps --backend gguf --model qwen3.5-4b # local GGUF model
KDEPS_AGENT_BACKEND=openai kdeps ./agents/ --model gpt-4o
kdeps --resume abc123def456 # resume a sessionMore on the agent loop
| Topic | Page |
|---|---|
| Slash commands and auto-detected shell/file mentions | REPL slash commands |
| Built-in tool catalog, permission modes, lean mode | Built-in tools |
Shell execution (!cmd, Ctrl+C / Ctrl+Z, jobs) | Shell execution |
| Live status line and stall detection during a tool run | Tool execution monitoring |
| Rewriting each prompt for clarity before the turn | Prompt refinement |
| Independent review of the final answer | Judge panel |
/model, /context, auto-routing, running local servers | Local model management |
| One-time permission exceptions for a denied tool call | Approval tokens |
Optional turo token reducer | Prompt reduction (turo) |
Skills, prompt templates, KDEPS.md instructions | Skills and prompt templates |
| Per-folder session history and the startup resume picker | Sessions |
| Pasting, rendering, themes, notifications, updates | Agent loop REPL features |
Differences from workflow mode
Workflow mode (kdeps run) | Agent mode (kdeps [path]) | |
|---|---|---|
| Execution | DAG, deterministic | LLM loop, tool-driven |
| Entry point | metadata.targetActionId | User prompt |
| Unit of work | Individual resources | Whole workflows |
| Tools | Functions in chat.tools | One per workflow + one per component + built-ins |
| Input | One workflow path | Optional file or folder |
| Conversation | Single run | Multi-turn, persistent JSONL |
See also
- Agent loop REPL features - pasting, rendering, sessions, updates
- Skills and prompt templates - context files that teach the agent
- REPL slash commands - full command reference
- Workflow mode - deterministic DAG pipelines
- LLM provider reference - backend config and model names
- Agencies - multi-agent orchestration
