---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/orchestration/plan/functions/reachableFrom.md
---

# Function: reachableFrom()

```ts
function reachableFrom(
  view: RawPlanView | PlanGraphView,
  startId: string,
): Set<string>;
```

Defined in: [src/batteries/orchestration/plan.ts:168](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/plan.ts#L168)

The forward closure from a start node over ALL edge handles.

## Parameters

| Parameter | Type                                                                                                           | Description             |
| --------- | -------------------------------------------------------------------------------------------------------------- | ----------------------- |
| `view`    | | [`RawPlanView`](../../types/interfaces/RawPlanView.md) | [`PlanGraphView`](../interfaces/PlanGraphView.md) | The graph to search.    |
| `startId` | `string`                                                                                                       | The node to start from. |

## Returns

[`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)<`string`>

The set of node ids reachable from `startId`, including `startId` itself.

## Remarks

`error` and `default` edges are included: a node reachable only over an error edge is still
reachable, because the executor can still execute it. The closure is the set of nodes reachable
by following any outgoing edge transitively. The start node itself is included. A node with no
outgoing edges contributes nothing further.
