> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# CustomOrchestrationExecutor

Contains details about the Lambda function containing the orchestration logic carried out upon invoking the custom orchestration.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`bedrock/agents/orchestration-executor.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/agents/orchestration-executor.ts#L26)

## Example

```ts
const orchestrationFunction = new lambda.Function(this, 'OrchestrationFunction', {
  runtime: lambda.Runtime.PYTHON_3_10,
  handler: 'index.handler',
  code: lambda.Code.fromAsset('lambda/orchestration'),
});

const agent = new bedrock.Agent(this, 'CustomOrchestrationAgent', {
  instruction: 'You are a helpful assistant with custom orchestration logic.',
  foundationModel: bedrock.BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
  customOrchestrationExecutor: bedrock.CustomOrchestrationExecutor.fromLambda(orchestrationFunction),
});
```

## Properties

- `lambdaFunction`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) — The Lambda function that contains the custom orchestration logic.

  This function is called when the agent needs to make decisions about action execution.

- `type`: [OrchestrationType](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.OrchestrationType.html) — The type of orchestration this executor performs.

## Methods

- `fromLambda(lambdaFunction: IFunction): CustomOrchestrationExecutor // chainable` (static) — Defines an orchestration executor with a Lambda function containing the business logic.

  **Parameters**

  - `lambdaFunction` — - Lambda function to be called by the orchestration.
