Layers

Layers are imported project references in a Full Stack application. Each layer is an existing Loom project — a Mesa model, Weave AI agent, server graph, or any other project type — that runs as part of the composite application.

Importing a Layer

  1. Open the Layers panel in the left sidebar
  2. Click Add Layer
  3. Select any saved project from the import modal
  4. The layer appears in the panel and a Layer Reference node is placed on the canvas

You can import projects of any type — Mesa models, Weave AI agents, server graphs, NetworkX projects, or even other Full Stack projects. The only requirement is that the project exists and is saved.

Layer Reference Node

Each imported layer appears on the canvas as a Layer Reference node. This node has:

  • Exec portsRun (exec in) and Done (exec out) for controlling when the layer starts
  • Dynamic contract ports — Derived from the imported project's Named Variables:
    • The project's output variables become input ports on the layer ref (data flowing into the composite)
    • The project's input variables become output ports on the layer ref (data the composite feeds to the layer)
  • Layer label — A user-assigned name like "Backend" or "Frontend"

Contract Snapshots

When you import a project, Loom takes a contract snapshot — a frozen copy of the project's variable interface at that moment. If the source project changes later (variables added, renamed, or removed), the layer ref node shows a stale indicator. Click Refresh to pull the latest contract.

Wiring Between Layers

The power of Full Stack is cross-layer wiring. Connect output ports from one layer to input ports of another:

Layer: Backend (output: api_url)
  → wire to →
Layer: Frontend (input: api_base)

These wires become environment variable bindings in the generated runner.py. The runner sets FRONTEND_API_BASE to the value of BACKEND_API_URL before starting the frontend process.

Removing a Layer

Remove a layer from the Layers panel. This also removes the corresponding Layer Reference node and any edges connected to it from the canvas.