Skip to content

Toolchain

Status: Accepted

Four components implement the two-wall architecture. Each is accessed through a provider-agnostic Go interface — arpi is not tied to any specific tool.

LayerInterfaceCurrent toolRole
Secrets + identityIAMProviderInfisicalMachine identities, dynamic secrets, zero-disk injection
LLM + MCP gateway (Wall 1)GatewayProviderBifrostModel routing, tool RBAC, rate limiting, audit, virtual keys
Sandbox (Wall 2)SandboxProviderOpenSandboxgVisor/Kata/Firecracker isolation, credential proxy, egress filtering
Product auth(separate concern)Better AuthMIT, in-process, replaces Clerk for end-user auth in products

arpi interacts with each tool through a Go interface in cli/internal/:

  • IAMProvider — login, get token, fetch secrets, resolve uid/euid. First implementation: Infisical Machine Identities + infisical run.
  • GatewayProvider — configure routing, issue virtual keys, set tool RBAC per definition. First implementation: Bifrost.
  • SandboxProvider — create sandbox, mount project, inject env via credential proxy, set egress rules, start/stop. Implementation: OpenSandbox (via its 3 OpenAPI specs: lifecycle, execd, egress).

Infisical — OSS, self-hostable, dynamic secrets + Machine Identities. Vault is too heavy for a small team. 1Password lacks dynamic secrets. Doppler has no self-host.

Bifrost — Single control plane for LLM routing and MCP tool access. Go, <100us overhead. Replaces LiteLLM (which had a March 2026 supply chain incident and is Python/slower).

OpenSandbox — Apache 2.0, 3 OpenAPI specs (lifecycle, execd, egress), pluggable backends (gVisor, Kata, Firecracker, Apple Container). Our fork adds Apple Container backend, credential proxy, policy engine, and Go SDK. See sandbox-strategy.md.

Better Auth — MIT, in-process, TypeScript. Replaces Clerk (reliability issues). Handles end-user auth in products, not developer identity (that is Infisical’s domain).

Docker Sandboxes — Proprietary, no open API spec, vendor lock-in to Docker. OpenSandbox provides the same isolation with an open spec.

mise — Removed from the toolchain. Runtime management is not arpi’s job. The definition declares what runtimes are needed; the developer or container image provides them.

  • Define IAMProvider, GatewayProvider, SandboxProvider interfaces in the control plane.
  • First implementations wrap Infisical SDK, Bifrost API, and OpenSandbox API respectively.
  • arpi spawn (via the control plane API) calls providers through interfaces — swapping a tool means implementing the interface, not rewriting spawn logic.
  • Better Auth is used in product auth, not in the arpi control plane itself.
  • The CLI is a thin client to the control plane API. Provider interfaces live server-side. See template-schema.md for the revised architecture.
  • arpi spawn works with provider interfaces, not direct tool calls
  • Infisical: infisical run injects secrets without writing to disk
  • Bifrost: routes LLM calls with OpenAI-compatible API, exposes tool groups per definition
  • OpenSandbox: container blocks egress except to gateway, cannot read host filesystem outside project mount
  • Swapping a provider implementation does not require changes to spawn logic