> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/subapp.md).

# Sub-app

> Use a published application as a module: its exposed terminals become this node's ports, pinned to one version.

Runs another published application inside this one, as a single node.

Born unresolved: the inspector's picker fills `applicationId` and `version`, and the ports arrive from the chosen snapshot's exposures (`deriveSubAppPorts`), never from a default table — so a SubApp's ports are whatever the child application chose to expose. Durable only.

## At a glance

|                          |                        |
| ------------------------ | ---------------------- |
| Module type              | `SubApp`               |
| Category                 | Intelligence           |
| Default tier             | `durable`              |
| Runs on                  | `durable`              |
| Starts a flow            | no                     |
| Holds a body             | yes                    |
| Keeps state between runs | no                     |
| Available in             | every application type |

## Parameters

### `applicationId`

`string` · required · defaults to `""`

The published application to run.

### `version`

`string` · required · defaults to `""`

Which of its versions to pin to.

### `embedPageIds`

`string[]` · required · defaults to `[]`

Pages of the child to embed in this application's dashboard.

## Inputs

| Port | Kind    | Required | Description                                                                                                                           |
| ---- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on` | `event` | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |

## Outputs

*Derived, not fixed: this module takes the ports of whatever it resolves to, so a freshly dropped one has none yet.*

***

[← All application modules](/more-details/applications/application-modules.md)
