Agent Shell for AI Agents
agentsh, pronounced agent shell, is an execution-layer security gateway for AI agents. It wraps an agent process, intercepts file, network, and process activity at runtime, and enforces deterministic policy before the operation can complete.
What an Agent Shell Does
An agent shell gives AI agents the operating-system boundary that ordinary prompts cannot provide. Instead of asking the model to behave, agentsh evaluates the actual syscall-level work the agent and its subprocesses attempt.
Intercepts real activity
File reads, writes, process launches, network egress, signals, and tool-driven subprocesses are observed as runtime events, not as model intentions.
Enforces policy
Rules decide whether an operation is allowed, denied, sent for approval, or steered to a safer destination before the agent can proceed.
Leaves evidence
Each decision is written to audit logs and session reports so security teams can review exactly what the agent attempted and what agentsh did.
Why Not Just Prompt Guardrails?
Prompt guardrails depend on the model following instructions. An agent shell operates below the model, below tool descriptions, and below MCP prompts. It governs the process tree that actually touches files, networks, package managers, and shells.
Prompt-only controls
- Can be bypassed by prompt injection or hostile tool output.
- Usually miss behavior hidden inside subprocesses.
- Do not produce deterministic proof that an operation was blocked.
Agent shell controls
- Apply to real file, network, and command operations.
- Follow the agent into subprocesses and package installers.
- Create auditable policy decisions that can be replayed and reviewed.
Agent Shell, Agentshell, and Agent-Shell
People search for this category as agent shell, agentshell, and agent-shell. The product name is agentsh: a short Unix-style name for an agent shell that protects AI agents at execution time.
Where agentsh Fits
Use agentsh when an AI coding agent, MCP server, sandbox, CI worker, or hosted development environment can run commands or reach sensitive data. Start with observe mode, generate a policy from a known-good workflow, then enforce the policy in production.
Policy reference
Define file, network, command, signal, and resource rules for the exact agent workload you want to allow.
Examples
See complete integrations for Vercel, E2B, Daytona, Cloudflare, Modal, Runloop, Freestyle, and more.
Mitigations
Review demos showing how agentsh policies close exploit setup paths before an agent can trigger them.
Start With the Agent Shell
Install agentsh locally or wrap a hosted sandbox with the secure sandbox SDK. Then run the same agent workflow through the enforcing shell and inspect the session report.
curl -fsSL https://www.agentsh.org/install.sh | sh agentsh wrap --pack code-edit -- claude code "fix the failing test"
For the deeper model, read What Is Execution-Layer Security?, then follow the setup guide.