docs: add Strands Shell SDK documentation section#2849
docs: add Strands Shell SDK documentation section#2849agent-of-mkmeral wants to merge 2 commits into
Conversation
Documentation Preview ReadyYour documentation preview has been successfully deployed! Changed pages:
Updated at: 2026-06-17T11:08:59.881Z |
|
Assessment: Comment (approve once the bind-default note is addressed or consciously deferred) Strong documentation PR. I verified every API surface against The timeout-default question you flagged in the description checks out: Review detail
Nicely researched, and flagging the timeout discrepancy proactively in the description made verification much faster. |
| Each bind has a mode that decides how host and sandbox relate: | ||
|
|
||
| - `copy` snapshots the host directory into the VFS at construction time. The agent's reads and writes stay inside the sandbox and never touch your host files. Use this for source code. | ||
| - `direct` passes reads and writes through to the host in real time. The agent can modify your live files, and host-side changes after construction are visible to the agent. Use this only for designated output directories. |
There was a problem hiding this comment.
Issue: The docs consistently frame copy as the safe default (security.mdx: "the safe choice is the default at every turn"; configuration.mdx line 163: "bind mode defaults to copy when omitted, which is the safe choice"). That is accurate for the TOML parser (default_mode() returns BindMode::Copy), but the programmatic constructors default to direct:
- Python
Binddataclass:mode: Literal["direct", "copy"] = "direct" - Node
BindConfig:mode?: 'direct' | 'copy'documented as'direct' passthrough (default)
So a reader who writes strands_shell.Bind("/host", "/dest") and omits mode= gets a live host-passthrough mount, the exact behavior the :::caution below warns against. Every example here passes mode explicitly, which hides the asymmetry.
Suggestion: Call out that the constructor default is direct (so omitting mode is not the safe choice in code, even though it is in TOML), or note the inconsistency for upstream to reconcile. A one-line note in the Binds section would prevent a reader from assuming the in-code default matches the TOML default.
The astro-broken-links-checker (throwError: true) failed the build on security.mdx: the mailto: link was rewritten by PageLink.astro into a bogus relative path /docs/user-guide/shell-sdk/mailto:... because isRelativeLink() in src/util/links.ts does not exempt the mailto: scheme. Render the address as inline code instead; HackerOne remains the linked reporting channel. Full npm run build now passes clean (689 pages, no broken links).
Description
Adds a dedicated Strands Shell SDK documentation section to the docs site, modeled on the existing Strands Evals SDK section: its own sidebar group with an overview, quickstart, and supporting reference pages.
Strands Shell is the in-process virtual shell sandbox for agents. It had a README but no presence on the docs site. This section gives it a proper home.
Pages added
All under
site/src/content/docs/user-guide/shell-sdk/:index.mdx(Overview)quickstart.mdxconfiguration.mdxcommands.mdxmcp-server.mdxsecurity.mdxNavigation entry added in
src/config/navigation.ymlas a new "Strands Shell SDK" group, placed after "Strands Evals SDK".Design decisions
.tssnippet files. The docs site type-checks every.tssnippet undercontent/docs/against@strands-agents/sdk(viatest-snippets/).@strands-agents/shellis not a dependency there, so adding.tssnippets would breaktypecheck:snippets. The Evals SDK section sets the precedent of inline Python; I followed it and used inline JavaScript for the Node tab, matching how the shell README presents Node usage.Shell/Bind/Cred/Limitsconstructor inpython/strands_shell/__init__.py, the NodeShell.createsurface inindex.d.ts, the MCP tool schemas insrc/mcp.rs, and the TOML schema insrc/vfs_config.rs.Accuracy note worth a reviewer's eye
The shell README states there is "no per-command timeout by default," but the config-driven constructors my docs cover default
timeoutto 30 seconds: the Nodeindex.d.tssays "Default 30," and the RustShellBuilder::default()setsSome(30s). The README's "no default" describes the lower-level Rust builder path. I documented the 30s default consistently since that is what PythonShell(...)and NodeShell.create(...)users actually get. Flagging in case the shell README should be reconciled separately.Related Issues
Requested by @mkmeral.
Documentation PR
This PR is documentation only. All changes live under
site/.Type of Change
Documentation update
Testing
npm run buildruns clean: 689 pages built,astro-broken-links-checker(withthrowError: true) reports no broken links. (The full static build needs a larger heap:NODE_OPTIONS="--max-old-space-size=7168" npm run build.)prettier --checkpasses on all six new pages.navigation.ymlparses as valid YAML; the new group resolves to existing content files.titleand a 140-160 chardescription.commands.mdx) avoids contractions per the voice guide..mdlinks and anchor targets checked against page headings.Pre-Open Review Loop Summary
This PR went through the
task-pr-gateMode A fresh-context pre-open review chain before being marked ready. Each iteration ran as a separate GitHub Actions process with fresh model state, re-deriving every claim against thestrands-agents/shellsource of truth rather than trusting the prior reviewer.mailto:link insecurity.mdxrewritten to a bogus relative path byPageLink.astro(isRelativeLink()does not exempt themailtoscheme), failingastro-broken-links-checker(throwError: true)src/shell.rsShellBuilder::default();Limitsdefaults, TOML schema (copydefault,deny_unknown_fields), cred schema, SSRF list, MCP tool schemas (timeout_ms30000 /offset1 /limit2000), Python/Node API surfaces, version requirements, SECURITY.md channel all match source; no style violations; nav wiring correct. 1 nice-to-have filed as inline comment.Convergence reached at iteration 2 of 3 (clean findings, 100% overlap with iteration 1's verification).
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.