Skip to content

Isolation boundaries

Flow’s security model rests on hard isolation between four domains: User Interface, Host Process (orchestration), Execution (CLI and adapters), and Reasoning (AI). Compromise of any single domain does not grant access to the credentials or execution capability of the others.

Local AI models run in a managed llama-server subprocess. Flow reaches it over a loopback OpenAI-compatible API that binds to localhost only, so there is no external egress. Flow does not pass credentials, environment maps, filesystem handles, or child-process handles to the model. It sends only the prompt text needed for inference. The architecture provides local AI models with:

  • No network paths.
  • No file-system access.
  • No environment-variable exposure.
  • No credential access.
  • No child-process spawning.

Data processed by local models does not leave the user’s machine.

SubsystemResponsibilityCredential access?Network access?
User InterfaceCanvas, node palette, property editorNONO
Host ProcessFlow coordination, credential management, executionYES (sole custodian)YES (for CLI operations)
CLI toolsJob submission, downloads, dataset operationsYES (delegated)YES (to target systems)
Shell adapterCurated CLI tool nodes with capability-declarative sandboxingINHERITED (env scrubbed by default)Gated per node by capabilities.net
Reasoning Domain (local)Loads models, runs local inference, returns JSONNONO (zero network)
External AI (opt-in)Cloud-AI callsAPI key (keyring, env fallback)YES (HTTPS to provider)
PII SanitizerRedacts patterns before AI model input (local and cloud)NONO

The External AI row is a deliberate carve-out from Flow’s otherwise zero-egress posture, off by default and gated by settings. Cloud calls go through the same PII Sanitizer as local calls. See Cloud providers.

The local host process is the sole custodian of all credentials and the sole executor of privileged operations. When an AI model produces a text-based recommendation, the orchestration engine decides whether and how to execute it using the user’s authenticated session. The model does not make that decision. All privileged operations execute strictly in the user’s authenticated context. System authorization is fully respected, and audit trails reflect the actual user.

Flow has four logical domains, and each one has a narrow capability boundary.

DomainOwnsCannot
OrchestrationAuthenticated profiles via the OS credential store; issues scoped execution tokensPass raw credentials to other domains
ExecutionReceives scoped tokens; spawns CLI operationsRead or modify stored credentials; talk directly to Reasoning
ReasoningRuns local AI models via the managed subprocessAccess credentials, tokens, or the execution interface
AuthorityExercised by the user via the canvas approval UI; decisions logged as audit eventsBypass user approval in the human-review band

Compromising the AI runtime grants no credentials or execution capability. Compromising an execution step exposes no stored secrets.

If the Host Process is compromised, all three functions are exposed. Until full domain segmentation at the OS-process level, the mitigations are:

  • The Host Process runs with least-privilege OS permissions. It does not run as root or admin.
  • Credentials live in the OS-native credential manager (macOS Keychain, Windows Credential Manager, libsecret) and are retrieved at execution time, never cached beyond the active run.
  • The inference engine has no access to the credential retrieval API. Credential references are never passed on the inference call path.
  • All dependencies are pinned and audited for CVEs.

These controls reduce the practical attack surface to a level consistent with other developer desktop tooling that operates with user-context credentials.