@@ -2607,6 +2607,35 @@ class EvaluationRunAgentConfigDict(TypedDict, total=False):
26072607]
26082608
26092609
2610+ class GeminiAgentConfig(_common.BaseModel):
2611+ """Config for scraping a Gemini Agent.
2612+
2613+ A Gemini Agent is a Vertex AI Agent resource scraped via the Vertex
2614+ Interactions API.
2615+ """
2616+
2617+ gemini_agent: Optional[str] = Field(
2618+ default=None,
2619+ description="""The resource name of the Gemini Agent.
2620+ Format: `projects/{project}/locations/{location}/agents/{agent}`.""",
2621+ )
2622+
2623+
2624+ class GeminiAgentConfigDict(TypedDict, total=False):
2625+ """Config for scraping a Gemini Agent.
2626+
2627+ A Gemini Agent is a Vertex AI Agent resource scraped via the Vertex
2628+ Interactions API.
2629+ """
2630+
2631+ gemini_agent: Optional[str]
2632+ """The resource name of the Gemini Agent.
2633+ Format: `projects/{project}/locations/{location}/agents/{agent}`."""
2634+
2635+
2636+ GeminiAgentConfigOrDict = Union[GeminiAgentConfig, GeminiAgentConfigDict]
2637+
2638+
26102639class AgentRunConfig(_common.BaseModel):
26112640 """Configuration for an Agent Run."""
26122641
@@ -2622,6 +2651,11 @@ class AgentRunConfig(_common.BaseModel):
26222651 Contains configuration for a user simulator that
26232652 uses an LLM to generate messages on behalf of the user.""",
26242653 )
2654+ gemini_agent_config: Optional[GeminiAgentConfig] = Field(
2655+ default=None,
2656+ description="""Config for scraping a Gemini Agent (Vertex AI Agent resource).
2657+ Used to target a Gemini agent for an evaluation run.""",
2658+ )
26252659
26262660
26272661class AgentRunConfigDict(TypedDict, total=False):
@@ -2638,6 +2672,10 @@ class AgentRunConfigDict(TypedDict, total=False):
26382672 Contains configuration for a user simulator that
26392673 uses an LLM to generate messages on behalf of the user."""
26402674
2675+ gemini_agent_config: Optional[GeminiAgentConfigDict]
2676+ """Config for scraping a Gemini Agent (Vertex AI Agent resource).
2677+ Used to target a Gemini agent for an evaluation run."""
2678+
26412679
26422680AgentRunConfigOrDict = Union[AgentRunConfig, AgentRunConfigDict]
26432681
@@ -3370,6 +3408,38 @@ class ResponseCandidateDict(TypedDict, total=False):
33703408ResponseCandidateOrDict = Union[ResponseCandidate, ResponseCandidateDict]
33713409
33723410
3411+ class InteractionsDataSource(_common.BaseModel):
3412+ """Source for populating agent data from an Interactions API interaction."""
3413+
3414+ gemini_agent_config: Optional[GeminiAgentConfig] = Field(
3415+ default=None,
3416+ description="""The Gemini Agent (Vertex AI Agent resource) that produced the
3417+ interaction.""",
3418+ )
3419+ interaction: Optional[str] = Field(
3420+ default=None,
3421+ description="""The interaction to evaluate. Required by the backend.
3422+ Format:
3423+ `projects/{project}/locations/{location}/interactions/{interaction}`.""",
3424+ )
3425+
3426+
3427+ class InteractionsDataSourceDict(TypedDict, total=False):
3428+ """Source for populating agent data from an Interactions API interaction."""
3429+
3430+ gemini_agent_config: Optional[GeminiAgentConfigDict]
3431+ """The Gemini Agent (Vertex AI Agent resource) that produced the
3432+ interaction."""
3433+
3434+ interaction: Optional[str]
3435+ """The interaction to evaluate. Required by the backend.
3436+ Format:
3437+ `projects/{project}/locations/{location}/interactions/{interaction}`."""
3438+
3439+
3440+ InteractionsDataSourceOrDict = Union[InteractionsDataSource, InteractionsDataSourceDict]
3441+
3442+
33733443class EvalCase(_common.BaseModel):
33743444 """A comprehensive representation of a GenAI interaction for evaluation."""
33753445
@@ -3414,6 +3484,10 @@ class EvalCase(_common.BaseModel):
34143484 default=None,
34153485 description="""This field is experimental and may change in future versions. The user scenario for the evaluation case.""",
34163486 )
3487+ interactions_data_source: Optional[InteractionsDataSource] = Field(
3488+ default=None,
3489+ description="""This field is experimental and may change in future versions. Source for populating agent data from an Interactions API interaction. When set, the backend fetches the interaction (and the Gemini Agent config) and parses it into agent data for evaluation; agent_data must not also be set.""",
3490+ )
34173491 # Allow extra fields to support custom metric prompts and stay backward compatible.
34183492 model_config = ConfigDict(frozen=True, extra="allow")
34193493
@@ -3454,6 +3528,9 @@ class EvalCaseDict(TypedDict, total=False):
34543528 user_scenario: Optional[evals_types.UserScenario]
34553529 """This field is experimental and may change in future versions. The user scenario for the evaluation case."""
34563530
3531+ interactions_data_source: Optional[InteractionsDataSourceDict]
3532+ """This field is experimental and may change in future versions. Source for populating agent data from an Interactions API interaction. When set, the backend fetches the interaction (and the Gemini Agent config) and parses it into agent data for evaluation; agent_data must not also be set."""
3533+
34573534
34583535EvalCaseOrDict = Union[EvalCase, EvalCaseDict]
34593536
@@ -4593,6 +4670,13 @@ class EvaluationInstance(_common.BaseModel):
45934670 default=None,
45944671 description="""Named groups of rubrics associated with this prompt. The key is a user-defined name for the rubric group.""",
45954672 )
4673+ interactions_data_source: Optional[InteractionsDataSource] = Field(
4674+ default=None,
4675+ description="""Source for populating agent data from an Interactions API
4676+ interaction. If set, no other agent data source may be set. The backend
4677+ fetches the interaction (and the agent that produced it) and parses it
4678+ into agent data for grading.""",
4679+ )
45964680
45974681
45984682class EvaluationInstanceDict(TypedDict, total=False):
@@ -4616,6 +4700,12 @@ class EvaluationInstanceDict(TypedDict, total=False):
46164700 rubric_groups: Optional[dict[str, "RubricGroupDict"]]
46174701 """Named groups of rubrics associated with this prompt. The key is a user-defined name for the rubric group."""
46184702
4703+ interactions_data_source: Optional[InteractionsDataSourceDict]
4704+ """Source for populating agent data from an Interactions API
4705+ interaction. If set, no other agent data source may be set. The backend
4706+ fetches the interaction (and the agent that produced it) and parses it
4707+ into agent data for grading."""
4708+
46194709
46204710EvaluationInstanceOrDict = Union[EvaluationInstance, EvaluationInstanceDict]
46214711
0 commit comments