Execution Environment Toolset¶
The Execution Environment toolset provides tools for executing code and shell commands within a configured environment.
Basic Usage¶
Environment Types¶
The toolset supports various execution environments:
Local¶
Execute on the local machine:
Docker¶
Execute in a Docker container:
tools:
- type: process_management
environment:
type: docker
image: python:3.12
volumes:
/workspace: /app
Remote¶
Execute on remote machines via SSH or other protocols.
Available Tools¶
Process Tools
start_process
Start a command in the background and return process ID.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
command |
string | ✓ | Command to execute |
args |
array | Command arguments | |
cwd |
string | Working directory | |
env |
object | Environment variables (added to current env) | |
output_limit |
integer | Maximum bytes of output to retain |
Hints: open-world
Category: execute
get_process_output
Get current output from a background process.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
process_id |
string | ✓ | Process identifier from start_process |
filter_lines |
string | Optional regex pattern to filter output lines (only matching lines returned) |
Hints: read-only, idempotent
Category: execute
wait_for_process
Wait for background process to complete and return final output.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
process_id |
string | ✓ | Process identifier from start_process |
filter_lines |
string | Optional regex pattern to filter output lines (only matching lines returned) |
Hints: read-only, idempotent
Category: execute
kill_process
Terminate a background process.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
process_id |
string | ✓ | Process identifier from start_process |
Hints: destructive
Category: execute
release_process
Release resources for a background process.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
process_id |
string | ✓ | Process identifier from start_process |
Category: execute
list_processes
List all active background processes.
Hints: read-only, idempotent
Category: search
Tool Selection¶
You can limit which tools are exposed:
Configuration Reference¶
Process management Toolset¶
Configuration for process management toolset (code + process management).
Security Considerations¶
- Use Docker or sandboxed environments for untrusted code
- Limit available tools to only what's needed
- Set appropriate working directories and permissions