Managoat Runtimes banner
managoat managoat

Managoat Runtimes

Design community

Description

How a coding agent CLI (claude, codex, gemini, opencode) gets into a sandbox and comes up speaking ACP: the adapter pins, the file layout, the instructions file, the credential env vars, the skills tree, and the per-runtime workarounds with their deletion conditions.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Managoat.Runtimes

How a coding agent CLI — claude, codex, gemini or opencode — gets into a sandbox and comes up speaking the [Agent Client Protocol](https://agentclientprotocol.com). The protocol session itself is [`managoat_acp`](https://hex.pm/packages/managoat_acp); the sandbox it runs in is [`managoat_sandbox`](https://hex.pm/packages/managoat_sandbox). This package is what has to have happened on the sandbox *before* a peer can open a session: which adapter to install and at what version, where the runtime keeps its files, the instructions file that carries the agent's system prompt, the credential env vars, the skills tree, and the per-runtime workarounds with the condition for deleting each one.

alias Managoat.Runtimes
alias Managoat.Runtimes.{ACP, Instructions, Skills}

{:ok, handle} = Managoat.Sandbox.create("my-agent", provider: :sprites)
{:ok, runtime} = Runtimes.for_runtime("claude")

agent = %{
  name: "reviewer",
  model: "anthropic/claude-sonnet-4-6",
  system: "You review pull requests. Be brief.",
  mcp_servers: %{"gh" => %{"command" => "gh-mcp", "env" => %{"GITHUB_TOKEN" => token}}}
}

# 1. The credential env for this runtime, from the credentials the host holds.
env = runtime.default_env(agent, %{anthropic_api_key: key})

# 2. Files: the runtime's own config (claude's .mcp.json), the system prompt,
#    the skills.
:ok = runtime.write_config(handle, agent)
:ok = Instructions.write(handle, "claude", agent)
:ok = Skills.install(handle, [%{"name" => "house-style", "content" => skill_md}], runtime: "claude")

# 3. The ACP adapter, pinned, then whatever bootstrap the runtime needs.
:ok = ACP.install(handle, "claude", env)
:ok = runtime.prepare_sandbox(handle, agent, env)

# 4. Spawn it and hand the process to Managoat.ACP.Peer.
{bin, args} = ACP.command("claude")
{:ok, command} = Managoat.Sandbox.spawn(handle, bin, args, env: env, dir: ACP.cwd("claude"), stdin: true)

{:ok, peer} =
  Managoat.ACP.Peer.start(
    owner: self(),
    writer: