kdeps-tools-python
v1.0.0Run a Python script and return its result: stdout parsed as JSON when possible, otherwise the raw text. Use through the python component for pipeline steps written in Python. Give either script (inline source) or scriptFile (a .py file). Optional: args, env, timeout, venvName, pythonVersion, packages.
set tools / shelf tools
LLM context: ~316 tokens when loaded (prompt or tool definition)
Where it runs
Part of the tools set, used in workflow and agent mode. What the model is told about each built-in tool: its description, usage notes and parameters. kdeps runs the tool itself.
- the agent loop builds the request
- the tool definitions are sent to the modeltools/python
- the model calls a tool
- kdeps runs it
- the result goes back to the model
Loaded by: kdeps (agent loop), /update, /settings, kdeps run, kdeps install, kdeps list, kdeps uninstall, kdeps update
In the code: kdeps (agent loop)agent.RegisterBuiltinToolsagent.definedAs
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.
Pin a version with kdeps install tools/python@<version>.
Contents
Run a Python script and return its result: stdout parsed as JSON when possible, otherwise the raw text. Use through the python component for pipeline steps written in Python. Give either script (inline source) or scriptFile (a .py file). Optional: args, env, timeout, venvName, pythonVersion, packages.
| Parameter | Type | Description |
|---|---|---|
| args | array | Arguments passed to the script after the script path or -c. |
| env | object | Extra environment variables as key-value pairs; the process environment is inherited. |
| packages | array | Python packages installed into the venv before the script runs. |
| pythonVersion | string | Python version for the venv. Default: KDEPS_PYTHON_VERSION, then 3.12. |
| script | string | Inline Python source. Use scriptFile instead to run a file. |
| scriptFile | string | Path to a .py file. Relative paths resolve against the kdeps process working directory. |
| timeout | string | Hard stop for the script, e.g. '30s'. Default comes from kdeps defaults, then KDEPS_PYTHON_TIMEOUT. |
| venvName | string | Name of a dedicated virtual environment; omit to share the default one. |
version: 1.0.0
description: 'Run a Python script and return its result: stdout parsed as JSON when possible, otherwise the raw text. Use through the python component for pipeline steps written in Python. Give either script (inline source) or scriptFile (a .py file). Optional: args, env, timeout, venvName, pythonVersion, packages.'
parameters:
args:
type: array
description: Arguments passed to the script after the script path or -c.
env:
type: object
description: Extra environment variables as key-value pairs; the process environment is inherited.
packages:
type: array
description: Python packages installed into the venv before the script runs.
pythonVersion:
type: string
description: 'Python version for the venv. Default: KDEPS_PYTHON_VERSION, then 3.12.'
script:
type: string
description: Inline Python source. Use scriptFile instead to run a file.
scriptFile:
type: string
description: 'Path to a .py file. Relative paths resolve against the kdeps process working directory.'
timeout:
type: string
description: 'Hard stop for the script, e.g. ''30s''. Default comes from kdeps defaults, then KDEPS_PYTHON_TIMEOUT.'
venvName:
type: string
description: Name of a dedicated virtual environment; omit to share the default one.
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.0 | 10/21/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 10/21/2026