Infrastructure

The execution environments, storage, credentials, and network boundaries behind a Swirls project.

Your .swirls files declare resources and behavior. Swirls supplies the infrastructure behind those declarations. This page maps the parts of that infrastructure to the primitives that use them.

Execution environments

Different kinds of work run in different environments. Choose the primitive according to the work it needs to do.

WorkWhere it runsWhat to use it for
Workflow orchestrationThe hosted durable execution runtimeOrder steps, wait for inputs or reviews, checkpoint progress, and recover interrupted work.
Built-in nodes and hosted toolsSwirls execution workersModel calls, HTTP requests, integrations, database operations, and other supported node types.
code nodes and embedded @tsAn isolated JavaScript environmentTransform values, calculate inputs, and shape outputs with the supplied execution context.
Agent workspace toolsA managed Linux sandboxRead and write files, navigate a workspace, and run shell commands during an agent turn.
disk node commandsA Linux environment attached to the named diskRun a command against persistent files shared by the project.

Embedded TypeScript is not a general-purpose server process. It does not provide an operating-system shell or arbitrary npm installs. A command: @ts expression produces a command string; the disk environment executes that command afterward.

See node types, execution context, and agents for the contracts available in each environment.

Durable execution

Workflows execute a graph of dependent steps. The runtime records completed node outputs so interrupted work can resume from its checkpoints. Waits, reviews, and child workflows are part of that execution lifecycle.

Retries and failure handling still matter when a step calls an external service. Use the appropriate failure policy and design external writes for the retry behavior of that service.

How execution works explains the run lifecycle. Traces show what happened during a run.

Data and files

ResourceStorage responsibilityLearn more
StreamSwirls stores typed records produced by the system.Streams
ViewSwirls presents and computes over stream records.Views
Managed databaseSwirls provisions PostgreSQL from a declared schema. You review schema changes and data migrations.Databases
Existing PostgresYou supply the database and connection; workflows query it through a declared resource.Postgres
DiskPersistent files can be shared across workflows and agents.Disks

An agent's temporary sandbox workspace and a persistent disk have different lifecycles. Put files that need to survive sandbox replacement on persistent storage. Use streams or databases for structured records that other parts of the system need to query.

Credentials and identity

Declare secret names in source and configure their values in the platform. Execution receives the credentials its declarations require. For supported providers, a connection binds an OAuth account to a named slot and supplies tokens at run time.

Roles and policies determine which identities may invoke agents. Workflow and tool restrictions within a grant are declared but not yet enforced at those finer boundaries; use agent profiles to narrow tools. An organization's identity provider can supply the identity facts those rules match.

Networking and hosted interfaces

Apps, forms, webhooks, and chat channels provide entry points to the deployed system. A project network declares a private connectivity boundary: it identifies which resources may be exposed into that network and which outbound consumers need a private route.

Named network binding and live routing are not yet available. Read Project Networks for setup requirements, supported consumers, and current limitations.

Deployments and operations

A deployment is a version of the project definition. Persistent data and credentials belong to the project; redeploying the source does not recreate them. The active deployment selects the live resource definitions, while existing runs retain their original snapshot.

Use Cloud deployment controls to manage releases and rollback, playbooks to verify behavior, and traces to investigate runs. Billing describes hosted execution access and usage limits.

On this page