For Browser Automation Agents
Everything you need to discover and use AgentReady widgets. Standard discovery methods, JavaScript API, and platform-specific integration guides.
Three steps to integration
Get started with AgentReady in any browser automation framework.
Fetch the well-known discovery endpoint to find AgentReady configuration.
/.well-known/ai-agent.json
Find and click elements with the data attribute to open the widget.
[data-open-modal]
Use the global API for programmatic control of the widget.
window.AgentReady
Find AgentReady on any site
Multiple discovery methods ensure compatibility with different agent architectures.
Standard discovery endpoint following the well-known URI convention.
// Fetch discovery endpoint
const response = await fetch('/.well-known/ai-agent.json');
const config = await response.json();
// Response contains:
// - widget_selector: "[data-open-modal]"
// - api_namespace: "AgentReady"
// - capabilities: ["prompt", "manifest", "discover"]
HTML meta tags for agents that parse document head.
// Look for meta tag in document head const meta = document.querySelector( 'meta[name="agent:discovery"]' ); const discoveryUrl = meta?.content; // Example meta tag: // <meta name="agent:discovery" // content="/.well-known/ai-agent.json">
Schema.org compatible structured data for semantic discovery.
// Parse JSON-LD scripts
const scripts = document.querySelectorAll(
'script[type="application/ld+json"]'
);
for (const script of scripts) {
const data = JSON.parse(script.textContent);
if (data['@type'] === 'AgentReadyWidget') {
// Found AgentReady configuration
}
}
Direct DOM queries for visual agent frameworks.
// Find widget trigger elements
const triggers = document.querySelectorAll(
'[data-open-modal]'
);
// Check for AgentReady API
if (window.AgentReady) {
const info = window.AgentReady.discover();
console.log(info);
}
window.AgentReady methods
Complete JavaScript API for programmatic widget control.
openModal()
Opens the onboarding modal
openModal()
Opens the onboarding modal
Opens the AgentReady modal dialog. Equivalent to clicking a [data-open-modal] element.
window.AgentReady.openModal(); // Modal opens with prompt and manifest download options
closeModal()
Closes the modal
closeModal()
Closes the modal
Closes the currently open modal dialog.
window.AgentReady.closeModal(); // Modal closes, returns to normal page view
copyFrom(id)
Copies text from element to clipboard
copyFrom(id)
Copies text from element to clipboard
Copies the text content of the specified element to the clipboard.
// Copy the prompt text
window.AgentReady.copyFrom('modalPrompt');
// Returns: Promise<void>
downloadManifest(payload)
Downloads manifest JSON
downloadManifest(payload)
Downloads manifest JSON
Triggers download of the agent manifest JSON file. Optionally accepts a custom payload object.
// Download default manifest
window.AgentReady.downloadManifest();
// Download with custom payload
window.AgentReady.downloadManifest({
name: "Custom Agent",
steps: ["step1", "step2"]
});
toast(msg)
Shows notification
toast(msg)
Shows notification
Displays a toast notification with the specified message.
window.AgentReady.toast('Copied to clipboard!');
// Shows toast for ~2 seconds then auto-hides
discover()
Returns discovery info
discover()
Returns discovery info
Returns an object with discovery information about the AgentReady installation.
const info = window.AgentReady.discover();
// Returns:
// {
// version: "1.0.0",
// capabilities: ["prompt", "manifest", "discover"],
// widget_selector: "[data-open-modal]",
// prompt_selector: "#modalPrompt"
// }
getPrompt()
Returns prompt text
getPrompt()
Returns prompt text
Returns the onboarding prompt text configured for this site.
const prompt = window.AgentReady.getPrompt(); // Returns the full prompt string configured // in the AgentReady widget
Platform-specific instructions
Step-by-step guides for popular browser automation frameworks.
Recommended
Claude in Chrome
Use Claude's browser automation tools to interact with AgentReady widgets.
// 1. Use read_page to find widget trigger // Look for elements with [data-open-modal] // 2. Click the widget trigger // Use computer tool to click the element // 3. Read the prompt from #modalPrompt // The prompt contains official onboarding steps // 4. Optionally download manifest via API // Execute: window.AgentReady.downloadManifest()
Antigravity
Configure Antigravity to discover and use AgentReady widgets.
# antigravity.config.yaml
discovery:
well_known: true
meta_tags: true
actions:
- name: open_agent_ready
selector: "[data-open-modal]"
action: click
- name: get_prompt
execute: "window.AgentReady.getPrompt()"
Playwright MCP
Use Playwright's MCP server for AgentReady integration.
// Discover AgentReady
const discovery = await page.evaluate(() => {
return window.AgentReady?.discover();
});
// Open widget
await page.click('[data-open-modal]');
// Get prompt text
const prompt = await page.textContent('#modalPrompt');
// Download manifest
await page.evaluate(() => {
window.AgentReady.downloadManifest();
});
Puppeteer
Puppeteer example for AgentReady widget interaction.
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
// Check for AgentReady
const hasAgentReady = await page.evaluate(() => {
return !!window.AgentReady;
});
if (hasAgentReady) {
// Open modal
await page.click('[data-open-modal]');
// Read prompt
const prompt = await page.$eval(
'#modalPrompt',
el => el.textContent
);
console.log('Agent prompt:', prompt);
}
Selenium
Selenium WebDriver example for Python.
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get("https://example.com")
# Check for AgentReady
has_agent_ready = driver.execute_script(
"return !!window.AgentReady"
)
if has_agent_ready:
# Open modal
trigger = driver.find_element(
By.CSS_SELECTOR, "[data-open-modal]"
)
trigger.click()
# Get prompt
prompt = driver.find_element(
By.ID, "modalPrompt"
).text
print(f"Agent prompt: {prompt}")
Copy-paste agent instructions
Use this prompt with any agent to enable AgentReady discovery and interaction.
You are navigating a website with AgentReady installed. DISCOVERY (try in order): 1. Fetch /.well-known/ai-agent.json 2. Look for <meta name="agent:discovery"> 3. Find elements with [data-open-modal] WIDGET INTERACTION: 1. Click [data-open-modal] to open widget 2. Read instructions from #modalPrompt 3. Download manifest via window.AgentReady.downloadManifest() GUARDRAILS: - Follow the official onboarding path - Ask before any destructive actions - Prefer official docs over blog posts
JSON Schema validation
Validate your AgentReady configuration against official schemas.