Skip to content

Shell and system

Optional extra for use_computer:

bash
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ "elsai-agents-tools[use-computer]==0.3.0"

Tools

environment

Read, set, and unset environment variables so the agent can inspect or configure its runtime

Environment variables

VariableRequiredDefaultDescription
ENV_VARS_MASKED_DEFAULToptionaltrueHide sensitive values when listing environment variables

Also respects BYPASS_TOOL_CONSENT (see Tool consent).

shell

Run shell commands in a working directory with stdout/stderr capture — useful for builds, git, and system tasks

Gate commands with execution_permissions on AgentConfig (tools=("shell",)).

Notes: On A2A servers, PER_CONTEXT — scoped work_dir per context_id.

Environment variables

VariableRequiredDefaultDescription
SHELL_DEFAULT_TIMEOUToptional900How long a shell command may run (seconds) before timing out
ELSAI_NON_INTERACTIVEoptionalunsetSet to true to run the shell without interactive prompts

Also respects BYPASS_TOOL_CONSENT (see Tool consent).

cron

Add, list, and remove cron jobs to schedule recurring scripts or maintenance tasks on the host

Environment variables

No dedicated environment variables beyond:

use_computer

Desktop automation — control mouse, keyboard, and screen OCR to interact with GUI applications

Extra: use-computer

Notes: On A2A servers, PER_CONTEXT — isolated screenshot storage per context_id.

Environment variables

No dedicated environment variables beyond:

Examples

Requires OPENAI_API_KEY. Sensitive tools prompt for consent — for demos set BYPASS_TOOL_CONSENT=true (see Tool consent).

bash
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents==0.3.1
pip install --extra-index-url https://core-packages.elsai.ai/root/ "elsai-model[openai]==2.1.0"
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents-tools==0.3.0
python
import os

from elsai import Agent
from elsai.agent import AgentConfig
from elsai_model.openai import OpenAIModel
from elsai_tools.environment import environment
from elsai_tools.shell import shell

agent = Agent(
    model=OpenAIModel(
        model_id="gpt-4o-mini",
        client_args={"api_key": os.environ["OPENAI_API_KEY"]},
    ),
    tools=[environment, shell],
    system_prompt=(
        "Use shell and environment to inspect the local system. "
        "After using tools, answer the user clearly in plain text."
    ),
    config=AgentConfig(name="shell_assistant"),
)

result = agent(
    "List the files in the current directory with `ls -la`, "
    "then tell me how many entries you see."
)
print(result)

Parameter reference: Shell and system API.

See also

Copyright © 2026 elsai foundry.