Skip to content

Documentation / @agentick/kernel / hasAncestorNamed

Function: hasAncestorNamed() ​

hasAncestorNamed(ctx, name): boolean

Defined in: kernel/src/execution-helpers.ts:95

Check if this execution has an ancestor with a specific procedure name.

Parameters ​

ctx ​

KernelContext

name ​

string

Returns ​

boolean

Example ​

typescript
if (hasAncestorNamed(ctx, 'engine:stream')) {
  // We're inside a streaming execution
}

Released under the ISC License.