DocsAI Intelligencebrowser_ai_query

browser_ai_query

Browser Ai Query

Ask a natural language question about the current page. The AI analyzes the page and provides an intelligent answer. Example: 'Is there a login form on this page?'.

Usage Example

123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.ai_query(
context_id=context_id,
query="value"
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

querystringrequired

Natural language question about the page content

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}