Agent mode
Agent mode starts an interactive LLM REPL where whole workflows and components are registered as callable tools. The LLM decides which tool to invoke based on the user's prompt. Workflow tools run the full pipeline atomically so all requires: dependencies resolve correctly. For the deterministic request/response pipeline instead, see Workflow mode.
Applies to agent mode.
Running kdeps with no arguments starts a bare REPL with no workflow tools - built-in tools (web_search, bash_exec, file ops, memory, etc.) are still available. Pass a path to also load workflows and agencies as tools.
Starting the agent loop
kdeps # runs the agent loop REPL
kdeps --model llama3.2 --system "You are a DevOps assistant." # override model/system prompt
kdeps --skill ~/.kdeps/skills/ # load skill files
kdeps --resume <session-id> # continue a saved sessionSingle workflow vs folder
kdeps ./my-agent/ # registers the workflow as an LLM-callable tool (named after metadata.name)
kdeps ./agents/ # registers every workflow and agency in the folder as a separate toolWhen 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 a previous conversation |
--stealth | false | Muted UI - dark gray, model name barely visible (for use in public) |
--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
KDEPS_STEALTH=1 # same as --stealth (1, true, or yes)Examples
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 |
| Task decomposition and forward-only goal enforcement | Goal-directed execution |
| Independent review of the final answer | Judge panel |
/model, /context, auto-routing, running local servers | Local model management |
Task / team / cron registries (task_*, team_*, cron_*) | Agent registries |
| 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 |
| Pasting, rendering, stealth, sessions, 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
