kdeps-commands-prompt
v2.0.0kdeps command: prompt
set commands / shelf agent
PurposeShow the exact messages+tools sent to the LLM on the last call, with token estimates
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.
- you type /name in kdeps
- the command runs: built in, or its declared stepscommands/prompt
- 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.
Also installs what it requires, when missing or older: tools/session_ops.
Pin a version with kdeps install commands/prompt@<version>.
Contents
- order
- 100
/promptShow the exact messages+tools sent to the LLM on the last call, with token estimates/prompt rawSame, as raw JSON (exact request wire format, full tool schemas)/prompt- 1
Calls a kdeps API tool
session_opsoperation: last_requestprints
{{if not .messages}}No LLM call has been made yet this session.{{else}}**Last request sent to the LLM ({{len .messages}} messages, {{len .tools}} tools, ~{{.tokens}} tokens estimated):** {{range .messages}} **[{{.index}}] {{.role}} (~{{.tokens}} tokens):** ``` {{.content}} ```{{end}}{{if .tools}} **Tools ({{len .tools}}, ~{{.tool_tokens}} tokens):** {{range .tools}} - `{{.name}}` (~{{.tokens}} tokens) {{.description}}{{end}}{{end}} Token counts are local tiktoken estimates of what was actually sent (post-fold, post-turo) -- they will not exactly match the provider's billed count for non-OpenAI-family models, but explain the relative weight of each part of the request. (use `/prompt raw` for exact JSON, including full tool schemas){{end}}
/prompt raw- 1
Calls a kdeps API tool
session_opsoperation: last_request raw: "true"prints
{{if not .messages}}No LLM call has been made yet this session.{{else}}**Last request sent to the LLM (raw JSON):** ```json {{.raw}} ```{{end}}
requires:
tools/session_ops: ""
version: 2.0.0
# kdeps update installs these with this command: what its run steps use
requires:
tools/session_ops: ""
name: prompt
order: 100
usage:
- args: ""
help: "Show the exact messages+tools sent to the LLM on the last call, with token estimates"
- args: raw
help: "Same, as raw JSON (exact request wire format, full tool schemas)"
subcommands:
"":
run:
- tool: session_ops
args: {operation: last_request}
print: |-
{{if not .messages}}No LLM call has been made yet this session.{{else}}**Last request sent to the LLM ({{len .messages}} messages, {{len .tools}} tools, ~{{.tokens}} tokens estimated):**
{{range .messages}}
**[{{.index}}] {{.role}} (~{{.tokens}} tokens):**
```
{{.content}}
```{{end}}{{if .tools}}
**Tools ({{len .tools}}, ~{{.tool_tokens}} tokens):**
{{range .tools}}
- `{{.name}}` (~{{.tokens}} tokens) {{.description}}{{end}}{{end}}
Token counts are local tiktoken estimates of what was actually sent (post-fold, post-turo) -- they will not exactly match the provider's billed count for non-OpenAI-family models, but explain the relative weight of each part of the request.
(use `/prompt raw` for exact JSON, including full tool schemas){{end}}
raw:
run:
- tool: session_ops
args: {operation: last_request, raw: "true"}
print: |-
{{if not .messages}}No LLM call has been made yet this session.{{else}}**Last request sent to the LLM (raw JSON):**
```json
{{.raw}}
```{{end}}
Versions
| Version | Published | Status |
|---|---|---|
| 2.0.0 | 10/24/2026 | active |
| 1.0.1 | 10/21/2026 | active |
| 1.0.0 | 10/12/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 2.0.0
- Published
- 10/12/2026