start_recommendation¶
Operation¶
start_recommendation
async
¶
start_recommendation(input: StartRecommendationInput, plugins: list[Plugin] | None = None) -> 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 |
|---|---|---|---|
input
|
StartRecommendationInput
|
An instance of |
required |
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
|
Returns:
| Type | Description |
|---|---|
StartRecommendationOutput
|
An instance of |
Input¶
StartRecommendationInput
dataclass
¶
Dataclass for StartRecommendationInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = 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.
description
class-attribute
instance-attribute
¶
description: str | None = None
The description of the recommendation.
kms_key_arn
class-attribute
instance-attribute
¶
kms_key_arn: str | None = 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 = None
The name of the recommendation. Must be unique within your account.
recommendation_config
class-attribute
instance-attribute
¶
recommendation_config: RecommendationConfig | None = 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 = None
A map of tag keys and values to associate with the recommendation.
type
class-attribute
instance-attribute
¶
type: RecommendationType | None = 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
¶
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 = None
The description 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.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when the recommendation was last updated.