@@ -2101,6 +2101,7 @@ def create_evaluation_run(
21012101 name : Optional [str ] = None ,
21022102 display_name : Optional [str ] = None ,
21032103 agent_info : Optional [evals_types .AgentInfoOrDict ] = None ,
2104+ agent : Optional [str ] = None ,
21042105 user_simulator_config : Optional [evals_types .UserSimulatorConfigOrDict ] = None ,
21052106 inference_configs : Optional [
21062107 dict [str , types .EvaluationRunInferenceConfigOrDict ]
@@ -2118,6 +2119,10 @@ def create_evaluation_run(
21182119 display_name: The display name of the evaluation run.
21192120 agent_info: The agent info to evaluate. Mutually exclusive with
21202121 `inference_configs`.
2122+ agent: The agent engine resource name in str type, with format
2123+ `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine_id}`.
2124+ If provided, runs inference with the deployed agent to get agent responses
2125+ for evaluation. This is required if `agent_info` is provided.
21212126 user_simulator_config: The user simulator configuration for agent evaluation.
21222127 If `agent_info` is provided without `inference_configs`, this config is used
21232128 to automatically construct the inference configuration. If not specified,
@@ -2158,7 +2163,7 @@ def create_evaluation_run(
21582163 candidate_name : types .EvaluationRunInferenceConfig (
21592164 agent_configs = parsed_agent_info .agents ,
21602165 agent_run_config = types .AgentRunConfig (
2161- agent_engine = parsed_agent_info . agent_resource_name ,
2166+ agent_engine = agent ,
21622167 user_simulator_config = parsed_user_simulator_config ,
21632168 ),
21642169 )
@@ -2181,9 +2186,7 @@ def create_evaluation_run(
21812186 resolved_inference_configs = _evals_common ._resolve_inference_configs (
21822187 self ._api_client , resolved_dataset , inference_configs , parsed_agent_info
21832188 )
2184- resolved_labels = _evals_common ._add_evaluation_run_labels (
2185- labels , parsed_agent_info
2186- )
2189+ resolved_labels = _evals_common ._add_evaluation_run_labels (labels , agent )
21872190 resolved_name = name or f"evaluation_run_{ uuid .uuid4 ()} "
21882191 return self ._create_evaluation_run (
21892192 name = resolved_name ,
@@ -3307,6 +3310,7 @@ async def create_evaluation_run(
33073310 name : Optional [str ] = None ,
33083311 display_name : Optional [str ] = None ,
33093312 agent_info : Optional [evals_types .AgentInfo ] = None ,
3313+ agent : Optional [str ] = None ,
33103314 user_simulator_config : Optional [evals_types .UserSimulatorConfigOrDict ] = None ,
33113315 inference_configs : Optional [
33123316 dict [str , types .EvaluationRunInferenceConfigOrDict ]
@@ -3324,6 +3328,10 @@ async def create_evaluation_run(
33243328 display_name: The display name of the evaluation run.
33253329 agent_info: The agent info to evaluate. Mutually exclusive with
33263330 `inference_configs`.
3331+ agent: The agent engine resource name in str type, with format
3332+ `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine_id}`.
3333+ If provided, runs inference with the deployed agent to get agent responses
3334+ for evaluation. This is required if `agent_info` is provided.
33273335 user_simulator_config: The user simulator configuration for agent evaluation.
33283336 If `agent_info` is provided without `inference_configs`, this config is used
33293337 to automatically construct the inference configuration. If not specified,
@@ -3364,7 +3372,7 @@ async def create_evaluation_run(
33643372 candidate_name : types .EvaluationRunInferenceConfig (
33653373 agent_configs = parsed_agent_info .agents ,
33663374 agent_run_config = types .AgentRunConfig (
3367- agent_engine = parsed_agent_info . agent_resource_name ,
3375+ agent_engine = agent ,
33683376 user_simulator_config = parsed_user_simulator_config ,
33693377 ),
33703378 )
@@ -3387,9 +3395,7 @@ async def create_evaluation_run(
33873395 resolved_inference_configs = _evals_common ._resolve_inference_configs (
33883396 self ._api_client , resolved_dataset , inference_configs , parsed_agent_info
33893397 )
3390- resolved_labels = _evals_common ._add_evaluation_run_labels (
3391- labels , parsed_agent_info
3392- )
3398+ resolved_labels = _evals_common ._add_evaluation_run_labels (labels , agent )
33933399 resolved_name = name or f"evaluation_run_{ uuid .uuid4 ()} "
33943400
33953401 result = await self ._create_evaluation_run (
0 commit comments