Give your agent a shell without giving it the keys to your machine.

★ 301⑂ 41👁 0⑃ 283● 24▤ 9
RustApache-2.0Created 2026-02-27strandsagents.com
More from this author
Download: v0.6.0v0.6.0 ↓0.6.02026-11-04
+2
Daily
301
stars
41
forks
0
watchers
283
prs
24
issues
9
releases

README

Strands Shell
  

  
    Give your agent a shell without giving it the keys to your machine.
  

  
    
    
    
    
  

  
    Documentation
    ◆ MCP Server
    ◆ Python
    ◆ Node.js
  


---

Agents run shell commands in tight loops: Install deps, run tests, grep for errors, iterate. Those loops need speed and isolation. 

Strands Shell is a Bourne-compatible shell that runs in-process. grep, sed, jq, curl, find, 50+ commands and it does this without fork, exec, syscalls, or cold starts. You declare what the agent can reach (files, URLs, credentials) and everything else doesn't exist to the agent.

| | Docker | Cloud sandbox | Strands Shell |
|---|---|---|---|
| Cold start | ~200ms | ~1s (network) | |"MCP / Python / Node.js"| shell

    subgraph shell ["Strands Shell"]
        direction TB
        subgraph kernel ["Kernel (mediation boundary)"]
            vfs["VFS: isolated filesystem"]
            net["Network: SSRF guard + allowlist"]
            creds["Credentials: injected per-URL"]
            limits["Limits: timeout, output, fds"]
        end
        engine["Shell engine: parser, 25 builtins, 33 commands, Lua 5.4"]
    end


Written in Rust, with native bindings for Python (PyO3) and Node.js (napi-rs). State persists across run() calls (env vars, working directory, functions). The filesystem is shared.

 Configuration

python
shell = strands_shell.Shell(
    binds=[
        strands_shell.Bind("/host/project", "/workspace", mode="copy"),
        strands_shell.Bind("/tmp/output", "/output", mode="direct"),
    ],
    credentials=[
        strands_shell.Cred("https://api.example.com/", env_var="API_TOKEN"),
    ],
    allowed_urls=["https://api.example.com/", "https://pypi.org/"],
    timeout=30.0,
    env={"PROJECT": "demo"},
    limits=strands_shell.Limits(
        max_output=1  ⚠️ mode: "direct" mounts are live. The agent can read and modify host files in real time. Use only for designated output directories. Never direct-bind directories containing secrets, credentials, or configuration you don't want the agent to modify.

 Inspecting configuration

A constructed shell exposes a read-only snapshot of how it was configured. This
is useful when you embed Strands Shell as a sandbox in a larger framework and
need to build tool descriptions, surface the network allowlist, or report the
active resource caps from a shell object you were handed.

python
shell = strands_shell.Shell(
    allowed_urls=["https://api.example.com/"],
    credentials=[strands_shell.Cred("https://api.example.com/", env_var="API_TOKEN")],
    timeout=30.0,
)

cfg = shell.config            a frozen ShellConfig snapshot
cfg.allowed_urls              ('https://api.example.com/',)
cfg.timeout                   30.0
cfg.credentials[0].url        'https://api.example.com/'
cfg.credentials[0].env_var    'API_TOKEN'  (the secret value is never exposed)


javascript
const shell = await Shell.create({
  allowedUrls: ['https://api.example.com/'],
  credentials: [{ url: 'https

Top issues

Latest release

v0.6.0 v0.6.0 2026-11-04
v0.6.0

 🚀 Features

- feat: let a kernel run commands Shell doesn't implement (190) (da522f9)
- feat: make the interactive CLI an optional default feature (172) (924927a)
- feat: add the builtin builtin (174) (a202be8)
- feat: accept legacy -N line counts in head and tail (171) (07df899)

 🐛 Fixes

- fix: fail a write that goes past max_file_size (198) (f5b232d)
- fix: run break, continue and exit inside command substitution (189) (77b6309)
- fix(rm): report removal refusals, including under -f (180) (e77c26b)
- fix: apply the input size limit to multiline input (178) (cff867b)

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON