AgentsforBedrockRuntime / Client / start_flow_execution

start_flow_execution

AgentsforBedrockRuntime.Client.start_flow_execution(**kwargs)

Starts an asynchronous execution of an Amazon Bedrock flow. Unlike synchronous flows that run until completion or time out after five minutes, you can run asynchronous flows for longer durations. Asynchronous flows also yield control so that your application can perform other tasks.

This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow’s async execution.

Note

Asynchronous flows is in preview release for Amazon Bedrock and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.start_flow_execution(
    flowAliasIdentifier='string',
    flowExecutionName='string',
    flowIdentifier='string',
    inputs=[
        {
            'content': {
                'document': {...}|[...]|123|123.4|'string'|True|None
            },
            'nodeInputName': 'string',
            'nodeName': 'string',
            'nodeOutputName': 'string'
        },
    ],
    modelPerformanceConfiguration={
        'performanceConfig': {
            'latency': 'standard'|'optimized'
        }
    }
)
Parameters:
  • flowAliasIdentifier (string) –

    [REQUIRED]

    The unique identifier of the flow alias to use for the async execution.

  • flowExecutionName (string) – The unique name for the async execution. If you don’t provide one, a system-generated name is used.

  • flowIdentifier (string) –

    [REQUIRED]

    The unique identifier of the flow to execute.

  • inputs (list) –

    [REQUIRED]

    The input data required for the async execution. This must match the input schema defined in the flow.

    • (dict) –

      Contains information about an input into the prompt flow and where to send it.

      • content (dict) – [REQUIRED]

        Contains information about an input into the prompt flow.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: document.

        • document (document) –

          The input to send to the prompt flow input node.

      • nodeInputName (string) –

        The name of the input from the flow input node.

      • nodeName (string) – [REQUIRED]

        The name of the flow input node that begins the prompt flow.

      • nodeOutputName (string) –

        The name of the output from the flow input node that begins the prompt flow.

  • modelPerformanceConfiguration (dict) –

    The performance settings for the foundation model used in the async execution.

    • performanceConfig (dict) –

      The latency configuration for the model.

      • latency (string) –

        To use a latency-optimized version of the model, set to optimized.

Return type:

dict

Returns:

Response Syntax

{
    'executionArn': 'string'
}

Response Structure

  • (dict) –

    • executionArn (string) –

      The Amazon Resource Name (ARN) that uniquely identifies the async execution.

Exceptions