Skip to content

start_recommendation

Operation

start_recommendation

start_recommendation(request: StartRecommendationInput | StartRecommendationInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartRecommendationInputDict]) -> StartRecommendationOutput

Starts a recommendation job that analyzes agent traces and generates optimization suggestions for system prompts or tool descriptions to improve agent performance.

Parameters:

Name Type Description Default
request StartRecommendationInput | StartRecommendationInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StartRecommendationInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartRecommendationOutput

An instance of StartRecommendationOutput.

start_recommendation async

start_recommendation(request: StartRecommendationInput | StartRecommendationInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartRecommendationInputDict]) -> StartRecommendationOutput

Starts a recommendation job that analyzes agent traces and generates optimization suggestions for system prompts or tool descriptions to improve agent performance.

Parameters:

Name Type Description Default
request StartRecommendationInput | StartRecommendationInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StartRecommendationInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartRecommendationOutput

An instance of StartRecommendationOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

StartRecommendationInputDict

Bases: TypedDict

Dictionary form of StartRecommendationInput.

Attributes

client_token instance-attribute
client_token: str | None

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

This field is autopopulated if not provided.

description instance-attribute
description: str | None

The description of the recommendation.

kms_key_arn instance-attribute
kms_key_arn: str | None

The ARN of the KMS key used to encrypt recommendation data. If provided, customer data is encrypted at rest with the specified key.

name instance-attribute
name: Required[str]

The name of the recommendation. Must be unique within your account.

recommendation_config instance-attribute

The configuration for the recommendation, including the input to optimize, agent traces to analyze, and evaluation settings.

tags instance-attribute
tags: Mapping[str, str] | None

A map of tag keys and values to associate with the recommendation.

type instance-attribute
type: Required[str]

The type of recommendation to generate. Valid values are SYSTEM_PROMPT_RECOMMENDATION for system prompt optimization or TOOL_DESCRIPTION_RECOMMENDATION for tool description optimization.

StartRecommendationInput dataclass

Bases: _SerdeShape

Dataclass for StartRecommendationInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

This field is autopopulated if not provided.

description class-attribute instance-attribute
description: str | None = ...

The description of the recommendation.

kms_key_arn class-attribute instance-attribute
kms_key_arn: str | None = ...

The ARN of the KMS key used to encrypt recommendation data. If provided, customer data is encrypted at rest with the specified key.

name class-attribute instance-attribute
name: str | None = ...

The name of the recommendation. Must be unique within your account.

recommendation_config class-attribute instance-attribute
recommendation_config: RecommendationConfig | None = ...

The configuration for the recommendation, including the input to optimize, agent traces to analyze, and evaluation settings.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

A map of tag keys and values to associate with the recommendation.

type class-attribute instance-attribute
type: str | None = ...

The type of recommendation to generate. Valid values are SYSTEM_PROMPT_RECOMMENDATION for system prompt optimization or TOOL_DESCRIPTION_RECOMMENDATION for tool description optimization.

Output

StartRecommendationOutput dataclass

Bases: _SerdeShape

Dataclass for StartRecommendationOutput structure.

Attributes

created_at instance-attribute
created_at: datetime

The timestamp when the recommendation was created.

description class-attribute instance-attribute
description: str | None = ...

The description of the recommendation.

name instance-attribute
name: str

The name of the recommendation.

recommendation_arn instance-attribute
recommendation_arn: str

The Amazon Resource Name (ARN) of the created recommendation.

recommendation_config instance-attribute
recommendation_config: RecommendationConfig

The configuration for the recommendation.

recommendation_id instance-attribute
recommendation_id: str

The unique identifier of the created recommendation.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status instance-attribute
status: str

The status of the recommendation.

type instance-attribute
type: str

The type of recommendation.

updated_at instance-attribute
updated_at: datetime

The timestamp when the recommendation was last updated.