Skip to main content

Interactive Examples

agentvisor exec mode bridges your terminal directly into the sandbox, letting you run any interactive command — Claude Code, Aider, a shell, or a custom script — with the same policy-enforced HTTP proxying and credential substitution that serve mode provides.

Prerequisites​

  • No Temporal required
  • No HTTP API configuration needed
  • Just agentvisor exec . (or --command to override)

The framework configuration (mav-agent-config.yaml) selects the interactive provider and uses framework.command to specify what runs inside the sandbox:

framework:
provider: interactive
command: ["claude", "--dangerously-skip-permissions"]

How It Differs from serve/run​

Aspectagentvisor serveagentvisor exec
Entry pointLangGraph graph via HTTP APIAny command (shell, AI coding tool, etc.)
Temporal requiredYesNo
HTTP API exposedYes (port 8090)No
Session typeNon-interactive, API-drivenInteractive, TTY-attached
CheckpointingYes (Temporal)No
SSE streamingYesNo

When to Use exec Mode​

  • Running Claude Code or another AI coding assistant inside an isolated sandbox
  • Running Aider, Cursor (CLI), or similar tools that need network access restricted to specific APIs
  • Dropping into a bash shell inside the sandbox for debugging or exploration
  • Executing a custom one-shot script that needs the proxy or MCP gateway but not Temporal

Available Downcalls​

FeatureAvailable
HTTP proxy (with credential substitution)Yes
MCP gatewayYes
A2A gatewayYes
Key-value storeYes
Log forwardingYes
CheckpointingNo
SSE streamingNo

Checkpointing and SSE streaming require Temporal workflows and the HTTP API, which exec mode intentionally omits.

Key Concepts​

The example pages below use a few terms without re-explaining them each time:

ConceptWhat It Is
DowncallA host-initiated RPC into the guest (the reverse of the guest-initiated calls that carry HTTP proxying, MCP/A2A gateway access, the key-value store, and log forwarding). The Available Downcalls table above lists which of these host-to-guest operations apply in exec mode.
--mountA CLI flag that bind-mounts a host directory into the sandbox for the session, e.g. --mount $PWD:/work:rw:cwd (path:mountpoint:ro|rw[:cwd]). Absent by default — without it, the sandbox has no access to your project files at all. See Simple Shell: Coding Agent with Project Access for the full syntax and read-only vs. read-write tradeoffs.
Sandbox templating{{.Image}} and similar {{.Xxx}} placeholders in a project's Dockerfile, resolved at build time to the correct base image and variant so a custom Dockerfile doesn't have to hardcode a version tag. See exec reference — Customizing the Sandbox Environment for the full variable list.

Examples​

ExampleDescription
Simple ShellThe minimum interactive provider config — a plain /bin/sh shell with an Ollama-only HTTP policy, no credential brokering
Claude CodeSandboxed Claude Code CLI with credential brokering and Anthropic-only HTTP policy
VS Code TunnelFull VS Code IDE connected via Microsoft's tunnel relay, sandboxed with a GitHub + VS Code infrastructure HTTP policy

See Also​