Skip to content

Built-in tools ​

The agent loop has access to a set of built-in tools that the LLM can call without any YAML configuration. Tools that require credentials are only registered when the relevant environment variable is set. Workflow tools: blocks are function calling, a different page.

FamilyToolsPage
Filesread_file, write_file, edit_file, list_files, md5_file, tail_fileFile tools. Edit file
Memory and identitymemory_save, memory_search, memory_delete, memory_query, identity_getMemory and identity
Shellbash_exec, bash_job_list, bash_job_waitShell execution
Web and searchweb_search, wikipedia, web_scraper, plus keyed search APIsWeb and search
Datacalculator, sql_*, embeddings, rerankData tools
Actionshttp_request, search_local, load_document, transcribe_audio, ocr_image, Zapier, Google cacheAction tools
Codecode_search, code_definition, and the other LSP toolsCode intelligence

Permission modes and lean mode stay on this page. The calling rules are their own pages: Fenced tools, Harness reminders, Session-integrity handshake.

Parameter-name synonyms ​

A model sometimes names a tool's argument something plausible but not exact - grep's pattern instead of search_local's query, cat's path instead of read_file's file_path. These synonym keys are normalized to the key the tool actually expects before dispatch, without clobbering a real key already present. This is scoped to parameter names only: kdeps does not maintain a separate table of alternate tool names (e.g. routing a call to grep as if it were search_local) - the tool list already tells the model the real name to call, and a second, silently-redirecting name for the same tool added maintenance cost without fixing the cases where a model loses track of what tools it has.

Failed tool calls are fed back to the model ​

Every tool failure is returned to the model as {"error": ...} plus a [TOOL FAILED] banner ("nothing changed - fix the cause and retry, or say it failed"), so a skimmed error is hard to miss. The turn will not end on a "done" claim made right after a work tool failed: the loop pushes back for a real success or an honest "it failed" - up to twice, with the second push-back reading as a repeat, same bound as the other corrective nudges. If the model still has not acknowledged the failure after both, the turn does not settle on the bald claim unflagged: the response is followed by a notice naming the tool and its error, so the claim is kept but clearly marked unresolved. An honest admission at any point (in whatever words) is accepted immediately, no nudge needed. With a goal active, task_complete on such a task is refused, and a prose "done" records the task failed, not done.

Loop-generated notices - goal transitions, budget changes, forced task failures, context-window trims - are injected into the model's context as [kdeps] ... messages, since the human at the REPL cannot act on them but the model can adjust.

Permission modes ​

Set KDEPS_PERMISSION_MODE to restrict which tools the agent may call:

bash
KDEPS_PERMISSION_MODE=read-only ./kdeps          # reads, searches, lookups only
KDEPS_PERMISSION_MODE=workspace-write ./kdeps    # adds file writes and bash_exec
KDEPS_PERMISSION_MODE=danger-full-access ./kdeps # no restrictions (default)

Blocked calls return a permission denied tool error to the model, which explains the restriction instead of executing. Tools not in the built-in policy - including workflow, component, and agency tools - require workspace-write, so read-only blocks anything that could mutate state.

Lean mode ​

The full tool catalog (~55 tools - bash_exec, web_search, web_scraper, wikipedia, http_request, external API tools, plus the lean set below) is on by default for every session. Trim it down when you want less prompt weight (each tool costs tokens twice - once as a native tool schema, once as prose in the tool-use guidance) or a restricted surface for CI/automation:

/tools lean     # this session only, switch back any time
/tools full     # switch back
/tools          # show current mode and tool count

The choice persists automatically across sessions - no flag needed - the same way /model tool set settings do. Lean mode keeps read_file, write_file, edit_file, list_files, code_search, code_definition, code_references, code_symbols, code_hover, code_diagnostics, search_local, load_document, calculator, embedding_vectorize, embedding_search, transcribe_audio (~16 tools).

KDEPS_LEAN_MODE/KDEPS_AGENT_PRESET (below) start a session already in lean mode and take priority over the persisted /tools choice.

Agent presets ​

KDEPS_AGENT_PRESET combines lean mode with a permission mode in one flag for common workflows:

bash
KDEPS_AGENT_PRESET=audit       # read-only, lean tools
KDEPS_AGENT_PRESET=explain     # read-only, lean tools
KDEPS_AGENT_PRESET=implement   # workspace-write, lean tools
PresetPermission modeTool set
auditReadOnlyLean (no bash, no network)
explainReadOnlyLean (no bash, no network)
implementWorkspaceWriteLean + file writes

IsLeanOrPreseted() returns true when either KDEPS_LEAN_MODE or KDEPS_AGENT_PRESET is set.

See also ​

Released under the Apache 2.0 License.