Table of Contents

Class BrowserTools

Namespace
JD.AI.Core.Tools
Assembly
JD.AI.Core.dll

Browser automation tools for web interaction, navigation, and capture. Uses system browser for simple ops and headless Chrome/Edge for advanced ops.

[ToolPlugin("browser")]
public sealed class BrowserTools
Inheritance
BrowserTools
Inherited Members

Methods

CapturePdfAsync(string, string?)

[KernelFunction("browser_pdf")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> CapturePdfAsync(string url, string? outputPath = null)

Parameters

url string
outputPath string

Returns

Task<string>

GetBrowserStatus()

[KernelFunction("browser_status")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string GetBrowserStatus()

Returns

string

GetConsoleOutputAsync(string, string?, int)

[KernelFunction("browser_console")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> GetConsoleOutputAsync(string url, string? script = null, int waitMs = 3000)

Parameters

url string
script string
waitMs int

Returns

Task<string>

GetContentAsync(string, int)

[KernelFunction("browser_content")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> GetContentAsync(string url, int maxChars = 10000)

Parameters

url string
maxChars int

Returns

Task<string>

OpenInBrowser(string)

[KernelFunction("browser_open")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static string OpenInBrowser(string url)

Parameters

url string

Returns

string

ScreenshotAsync(string, string?, int, int, int)

[KernelFunction("browser_screenshot")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> ScreenshotAsync(string url, string? outputPath = null, int width = 1280, int height = 720, int waitMs = 2000)

Parameters

url string
outputPath string
width int
height int
waitMs int

Returns

Task<string>