Skip to content

Shell and System

Shell execution, environment variables, scheduling, and desktop automation. Gate shell with execution_permissions.

← Prebuilt Tools overview

ToolExtraDescription
environmentbaseRead, set, and unset environment variables.
shellbaseExecute shell commands with stdout/stderr capture.
cronbaseAdd, list, and remove cron jobs.
use_computeruse-computerDesktop automation — mouse, keyboard, and OCR.

environment

Read, set, and unset environment variables.

python
from elsai_tools.environment import environment
ParameterTypeRequiredDescription
actionstrYeslist, get, set, delete, or validate
namestrNoVariable name
valuestrNoValue to set
prefixstrNoFilter by prefix (list)
maskedboolNoMask sensitive values

shell

Execute shell commands with stdout/stderr capture.

python
from elsai_tools.shell import shell
ParameterTypeRequiredDescription
commandUnion[str, List[Union[str, Dict[str, Any]]]]YesCommand string, list of commands, or command objects
parallelboolNoRun commands in parallel
ignore_errorsboolNoContinue on failure
timeoutintNoTimeout in seconds
work_dirstrNoWorking directory
non_interactiveboolNoSkip confirmation prompt

A2A isolation

On A2A servers, shell declares PER_CONTEXT scope. Each context_id receives its own ShellTool instance via clone_for_a2a_context(). When work_dir is omitted, the default working directory is scoped to:

$ELSAI_A2A_SESSION_DIR/<context_id>/shell/

Using on an A2A server

python
from elsai import Agent

# Register the tool on the template agent; PER_CONTEXT cloning is automatic.
agent = Agent(tools=[...])  # e.g. tools=[python_repl], tools=[graph], …

Full A2AServer + session-manager wiring lives in Concepts — see Stateful prebuilt tools — examples.

  • When work_dir is omitted, defaults to $ELSAI_A2A_SESSION_DIR/<context_id>/shell/.
  • Each context_id gets its own ShellTool instance.

See Stateful tools on A2A and Stateful prebuilt tools — examples.

cron

Add, list, and remove cron jobs.

python
from elsai_tools.cron import cron
ParameterTypeRequiredDescription
actionstrYesadd, list, or remove
schedulestrNoCron expression
commandstrNoCommand to run
job_idintNoJob ID (remove)
descriptionstrNoHuman-readable description

use_computer

Desktop automation — mouse, keyboard, and OCR.

python
from elsai_tools.use_computer import use_computer

Extra: use-computer

ParameterTypeRequiredDescription
actionstrYesAction type (click, type, screenshot, etc.)
xintNoScreen X coordinate
yintNoScreen Y coordinate
textstrNoText to type
keystrNoKey to press
regionList[int]NoScreen region [x, y, w, h]
app_namestrNoTarget application
click_typestrNoClick type

A2A isolation

On A2A servers, use_computer declares PER_CONTEXT scope. Each context_id gets its own tool instance; screenshots are stored under:

$ELSAI_A2A_SESSION_DIR/<context_id>/use_computer/screenshots/

Using on an A2A server

python
from elsai import Agent

# Register the tool on the template agent; PER_CONTEXT cloning is automatic.
agent = Agent(tools=[...])  # e.g. tools=[python_repl], tools=[graph], …

Full A2AServer + session-manager wiring lives in Concepts — see Stateful prebuilt tools — examples.

  • Requires elsai-agents-tools[use-computer] and a GUI desktop on the host.
  • Screenshots are stored under $ELSAI_A2A_SESSION_DIR/<context_id>/use_computer/screenshots/.

See Stateful tools on A2A and Stateful prebuilt tools — examples.

Copyright © 2026 elsai foundry.