ag2-shell-tool
Installation
SKILL.md
Shell tools
When to use
Two distinct tools, both named "shell" — pick deliberately:
| Need | Use | Why |
|---|---|---|
| Works with any model provider; full control over what runs and where | LocalShellTool |
Client-side subprocess. You own the sandbox. |
| Provider-managed sandbox (container, network policy) on Anthropic / OpenAI | ShellTool |
Server-side execution. No local subprocess. |
LocalShellTool is the workhorse. Reach for it unless you specifically need provider-managed isolation and you're on Anthropic or OpenAI.
60-second recipe — LocalShellTool
from autogen.beta import Agent
from autogen.beta.config import AnthropicConfig
from autogen.beta.tools import LocalShellTool