Skip to content

Commit c1f6274

Browse files
authored
Add support for Agent Browser Automation tool (#36462)
1 parent d70ea25 commit c1f6274

File tree

2 files changed

+189
-0
lines changed

2 files changed

+189
-0
lines changed

specification/ai/Azure.AI.Agents/tools/models.tsp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,31 @@ model AzureFunctionToolDefinition extends ToolDefinition {
208208
azureFunction: AzureFunctionDefinition;
209209
}
210210

211+
@doc("The input definition information for a Browser Automation Tool, as used to configure an Agent.")
212+
@added(Versions.v2025_05_15_preview)
213+
model BrowserAutomationToolDefinition extends ToolDefinition {
214+
@doc("The object type, which is always 'browser_automation'.")
215+
type: "browser_automation";
216+
217+
@doc("The Browser Automation Tool parameters.")
218+
@encodedName("application/json", "browser_automation")
219+
browserAutomation: BrowserAutomationToolParameters;
220+
}
221+
222+
@doc("Definition of input parameters for the Browser Automation Tool.")
223+
@added(Versions.v2025_05_15_preview)
224+
model BrowserAutomationToolParameters {
225+
@doc("The connection parameters associated with the Browser Automation Tool.")
226+
connection: BrowserAutomationToolConnectionParameters;
227+
}
228+
229+
@doc("Definition of input parameters for the connection used by the Browser Automation Tool.")
230+
@added(Versions.v2025_05_15_preview)
231+
model BrowserAutomationToolConnectionParameters {
232+
@doc("The ID of the connection to your Azure Playwright resource.")
233+
id: string;
234+
}
235+
211236
/**
212237
* Ranking options for file search.
213238
*/
@@ -513,6 +538,52 @@ model RunStepAzureAISearchToolCall extends RunStepToolCall {
513538
azureAISearch: Record<string>;
514539
}
515540

541+
@doc("""
542+
A record of a call to a Browser Automation tool issued by the Agent.
543+
""")
544+
@added(Versions.v2025_05_15_preview)
545+
model RunStepBrowserAutomationToolCall extends RunStepToolCall {
546+
@doc("The object type, which is always 'browser_automation'.")
547+
type: "browser_automation";
548+
549+
@doc("Details of the browser automation tool call.")
550+
@encodedName("application/json", "browser_automation")
551+
browserAutomation: BrowserAutomationToolCallDetails;
552+
}
553+
554+
@doc("""
555+
Details of a Browser Automation tool call.
556+
""")
557+
@added(Versions.v2025_05_15_preview)
558+
model BrowserAutomationToolCallDetails {
559+
@doc("The input provided to the Browser Automation tool.")
560+
input: string;
561+
562+
@doc("The output returned by the Browser Automation tool.")
563+
output: string;
564+
565+
@doc("The steps the Browser Automation tool executed.")
566+
steps: BrowserAutomationToolCallStep[];
567+
}
568+
569+
@doc("""
570+
Describes a single step of a Browser Automation tool execution.
571+
""")
572+
@added(Versions.v2025_05_15_preview)
573+
model BrowserAutomationToolCallStep {
574+
@doc("The result of the last step executed with the Browser.")
575+
@encodedName("application/json", "last_step_result")
576+
lastStepResult: string;
577+
578+
@doc("The current state of execution with the Browser.")
579+
@encodedName("application/json", "current_state")
580+
currentState: string;
581+
582+
@doc("The next step to execute with the Browser.")
583+
@encodedName("application/json", "next_step")
584+
nextStep: string;
585+
}
586+
516587
@doc("""
517588
A record of a call to a MCP tool, issued by the model in evaluation of a defined tool, that represents
518589
executed MCP actions.

specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,6 +3643,104 @@
36433643
],
36443644
"x-ms-discriminator-value": "bing_grounding"
36453645
},
3646+
"BrowserAutomationToolCallDetails": {
3647+
"type": "object",
3648+
"description": "Details of a Browser Automation tool call.",
3649+
"properties": {
3650+
"input": {
3651+
"type": "string",
3652+
"description": "The input provided to the Browser Automation tool."
3653+
},
3654+
"output": {
3655+
"type": "string",
3656+
"description": "The output returned by the Browser Automation tool."
3657+
},
3658+
"steps": {
3659+
"type": "array",
3660+
"description": "The steps the Browser Automation tool executed.",
3661+
"items": {
3662+
"$ref": "#/definitions/BrowserAutomationToolCallStep"
3663+
}
3664+
}
3665+
},
3666+
"required": [
3667+
"input",
3668+
"output",
3669+
"steps"
3670+
]
3671+
},
3672+
"BrowserAutomationToolCallStep": {
3673+
"type": "object",
3674+
"description": "Describes a single step of a Browser Automation tool execution.",
3675+
"properties": {
3676+
"last_step_result": {
3677+
"type": "string",
3678+
"description": "The result of the last step executed with the Browser.",
3679+
"x-ms-client-name": "lastStepResult"
3680+
},
3681+
"current_state": {
3682+
"type": "string",
3683+
"description": "The current state of execution with the Browser.",
3684+
"x-ms-client-name": "currentState"
3685+
},
3686+
"next_step": {
3687+
"type": "string",
3688+
"description": "The next step to execute with the Browser.",
3689+
"x-ms-client-name": "nextStep"
3690+
}
3691+
},
3692+
"required": [
3693+
"last_step_result",
3694+
"current_state",
3695+
"next_step"
3696+
]
3697+
},
3698+
"BrowserAutomationToolConnectionParameters": {
3699+
"type": "object",
3700+
"description": "Definition of input parameters for the connection used by the Browser Automation Tool.",
3701+
"properties": {
3702+
"id": {
3703+
"type": "string",
3704+
"description": "The ID of the connection to your Azure Playwright resource."
3705+
}
3706+
},
3707+
"required": [
3708+
"id"
3709+
]
3710+
},
3711+
"BrowserAutomationToolDefinition": {
3712+
"type": "object",
3713+
"description": "The input definition information for a Browser Automation Tool, as used to configure an Agent.",
3714+
"properties": {
3715+
"browser_automation": {
3716+
"$ref": "#/definitions/BrowserAutomationToolParameters",
3717+
"description": "The Browser Automation Tool parameters.",
3718+
"x-ms-client-name": "browserAutomation"
3719+
}
3720+
},
3721+
"required": [
3722+
"browser_automation"
3723+
],
3724+
"allOf": [
3725+
{
3726+
"$ref": "#/definitions/ToolDefinition"
3727+
}
3728+
],
3729+
"x-ms-discriminator-value": "browser_automation"
3730+
},
3731+
"BrowserAutomationToolParameters": {
3732+
"type": "object",
3733+
"description": "Definition of input parameters for the Browser Automation Tool.",
3734+
"properties": {
3735+
"connection": {
3736+
"$ref": "#/definitions/BrowserAutomationToolConnectionParameters",
3737+
"description": "The connection parameters associated with the Browser Automation Tool."
3738+
}
3739+
},
3740+
"required": [
3741+
"connection"
3742+
]
3743+
},
36463744
"CodeInterpreterToolDefinition": {
36473745
"type": "object",
36483746
"description": "The input definition information for a code interpreter tool as used to configure an agent.",
@@ -6213,6 +6311,26 @@
62136311
],
62146312
"x-ms-discriminator-value": "bing_grounding"
62156313
},
6314+
"RunStepBrowserAutomationToolCall": {
6315+
"type": "object",
6316+
"description": "A record of a call to a Browser Automation tool issued by the Agent.",
6317+
"properties": {
6318+
"browser_automation": {
6319+
"$ref": "#/definitions/BrowserAutomationToolCallDetails",
6320+
"description": "Details of the browser automation tool call.",
6321+
"x-ms-client-name": "browserAutomation"
6322+
}
6323+
},
6324+
"required": [
6325+
"browser_automation"
6326+
],
6327+
"allOf": [
6328+
{
6329+
"$ref": "#/definitions/RunStepToolCall"
6330+
}
6331+
],
6332+
"x-ms-discriminator-value": "browser_automation"
6333+
},
62166334
"RunStepCodeInterpreterImageOutput": {
62176335
"type": "object",
62186336
"description": "A representation of an image output emitted by a code interpreter tool in response to a tool call by the model.",

0 commit comments

Comments
 (0)