diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 0000000..5a86d2a --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +build/ +dist/ +coverage/ +.DS_Store +*.log +.env* +!.env.example diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..1a54892 --- /dev/null +++ b/website/index.html @@ -0,0 +1,22 @@ + + +
+ + + ++ {description} +
+ +
+ {children}
+
+ );
+}
diff --git a/website/src/components/Logo.tsx b/website/src/components/Logo.tsx
new file mode 100644
index 0000000..d6a20e3
--- /dev/null
+++ b/website/src/components/Logo.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+
+export function Logo({ className = '' }: { className?: string }) {
+ return (
+
+ );
+}
diff --git a/website/src/components/ThemeProvider.tsx b/website/src/components/ThemeProvider.tsx
new file mode 100644
index 0000000..a5e9d4b
--- /dev/null
+++ b/website/src/components/ThemeProvider.tsx
@@ -0,0 +1,60 @@
+import React, { createContext, useContext, useEffect, useState } from 'react';
+
+type Theme = 'dark' | 'light';
+
+interface ThemeProviderProps {
+ children: React.ReactNode;
+}
+
+interface ThemeProviderState {
+ theme: Theme;
+ setTheme: (theme: Theme) => void;
+}
+
+const initialState: ThemeProviderState = {
+ theme: 'dark',
+ setTheme: () => null,
+};
+
+const ThemeProviderContext = createContextBridging large language models and Android WebViews.
+ ++ Traditional WebViews are hostile to automated agents. The Agentic WebView SDK gives + LLM-powered agents real web-browsing capabilities inside Android applications. It accomplishes this by injecting + an orchestration engine that parses, simplifies, and translates the DOM into an + accessibility tree designed specifically for LLM token-efficiency. +
++ Simultaneously, the library captures hardware-accelerated viewport screenshots for vision models, + resolves framework-specific interactivity barriers (such as React, Vue, or Angular event systems), and maps LLM tool + calls into native, simulated touch coordinates. +
+
+ The SDK establishes a bidirectional bridge over the
+ The API abstracts coordinate mathematics and frame polling. The state capture mechanism + returns a structural representation capable of being fed directly into the system prompt of modern LLMs. +
+
+ The
+ The
+ Once your agent decides on an action, execute it using
+ You can observe
+ For
+ Understanding the
| State | +Description | +
|---|---|
| Initial state before any navigation has started. | |
| Page is currently loading. | |
| DOM is ready, but sub-resources (images, scripts) might still be loading. | |
| Page is fully settled and stable. Capture state now. | |
| A navigation error occurred (e.g., 404, DNS). | |
| The WebView renderer process crashed. |
+ The SDK uses
| Error Type | +Description | +
|---|---|
| The requested agentId does not exist in the current DOM. | |
| The element is covered by a modal, overlay, or another element. | |
| Page failed to load. Includes the httpCode if available. | |
| The internal JS engine failed. | |
| JavaScript execution exceeded the configured timeout. | |
| Screenshot capture failed (e.g., PixelCopy error). | |
| The page is not in a valid state for the operation. | |
| Clicking a file input is blocked. | |
| GoBack/GoForward called with no history. | |
| The operation exceeded the config timeout. | |
| The renderer process died. |
+ Set
+ Since the SDK uses a standard WebView, you can inspect the page using Chrome DevTools. +
+
+ You can customize the SDK's behavior using
| Option | +Default | +Description | +
|---|---|---|
| Capture screenshots during state capture. | ||
| JPEG compression quality (0-100). | ||
| Max width/height of captured screenshots. | ||
| Limit the number of nodes in the tree. | ||
| Hide WebDriver flags. | ||
| Px to capture outside viewport (-1 for full page). | ||
| Timeout for JavaScript execution. | ||
| Max wait time for page complete state. | ||
| Debounce delay before declaring page settled. | ||
| Wait time for element positions to stabilize. | ||
| Throttle interval for DOM mutation callbacks. | ||
| Number of retry attempts for failed actions. | ||
| Enable detailed SDK logs under AgenticSDK:* tags. | ||
| Custom User-Agent string (uses system default if null). | ||
| Specific HTML attributes to include in tree serializer. |
+ For production apps, you should restrict where the agent can navigate using domain allow-lists or deny-lists. +
+