Sub-100ms Natural Language Browser Driver & Automation Framework
Powered by Jev AI (TypeSafe System One) with an intelligent OpenAI-compatible LLM fallback.
Modern AI browser drivers (Stagehand, Browserbase, Browser-Use, MultiOn) rely almost exclusively on Large Language Models (LLMs) or Vision Models (GPT 5.6 Terra, Claude 5 Sonnet, Gemini 3 Flash) for every single interaction:
- Massive Token Waste: Each step serializes 15,000 to 50,000 tokens of raw DOM trees or high-resolution screenshot images. A simple 10-step form submission consumes 200,000+ tokens ($0.50 β $2.00 per single run).
- Crippling Latency: Autoregressive LLMs take 3 to 8 seconds to generate tokens for trivial decisions like "which button is Submit?".
- Flaky Selectors & Hallucinations: Generative models often invent non-existent CSS selectors or hallucinate bounding boxes when DOM trees shift.
| Metric | Traditional LLM Driver (GPT 5.6 Terra / Claude 5 Sonnet) | JevBrow (Jev System One + Fallback) | Improvement |
|---|---|---|---|
| Latency per Action | 3,000 ms β 7,000 ms | 80 ms β 150 ms | ~30x Faster β‘ |
| Tokens per Step | 15,000 β 40,000 tokens | 0 LLM tokens (95% of routine actions) | 98%+ Reduction |
| Cost per 1,000 Actions | $15.00 β $40.00 | <$0.40 | 95%+ Savings π΅ |
| Page Readiness Checks | Arbitrary sleep(5000) or slow prompt |
Sub-100ms calibrated probability check | Instant & deterministic |
| Failure Recovery | Restarts whole prompt / session | Confidence-gated escalation | Graceful fallback |
JevBrow separates browser automation into two distinct cognitive systems:
Natural Language Intent
β
βΌ
βββββββββββββββββββββββββ
β Lean DOM Analyzer β Extracts visible interactive nodes
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββ
β Jev AI (System One) β Sub-100ms structured decision
β Choice / Score / Noul β Calibrated probability scores
βββββββββββββββββ¬ββββββββββββββββ
β
Confidence β₯ 0.65?
βββββββββββ΄ββββββββββ
β YES β NO
βΌ βΌ
βββββββββββββββ ββββββββββββββββ
β Execute β β LLM Fallback β (Text generation,
β Action β ββββββββ¬ββββββββ vision, ambiguity)
βββββββββββββββ β
Fallback ready?
ββββββββ΄βββββββ
β YES β NO
βΌ βΌ
ββββββββββββββ βββββββββββββββ
β LLM Action β β Jev Best β
ββββββββββββββ β Guess β
βββββββββββββββ
Jev is not a slow autoregressive LLM. It is a System One model engineered specifically for ultra-fast, structured classification and evaluation with calibrated probability outputs:
-
choice: Selects the exact target element index from candidates with a softmax probability distribution ($P(\text{element}_i \mid \text{intent})$). -
noul: Evaluates yes/no questions as true mathematical probabilities ($P(\text{condition} = \text{true})$), used for instant page readiness, error alert detection, and state verification. -
score: Ranks candidate elements (0β4) for complex multi-criteria relevance. - Parallel Batching: Can evaluate 5β10 conditions in a single sub-100ms API call.
π‘ What Jev AI Is (and Is Not): Jev AI operates strictly on text and structured DOM metadata (
tag,id,class,aria-label, visible text). Jev AI does NOT have computer vision and cannot see or process images. It does not generate freeform conversational text. Its superpower is sub-100ms structured decision-making over structured input.
The LLM only activates when genuinely required:
- Creative text generation for open-ended form fields
- Page summarization and structured data extraction (
aiSummarize,aiExtract) - Visual reasoning over screenshots when a vision model (e.g. GPT 5.6 Luna / Sol, Claude 5 Sonnet, or DeepSeek V4.1 Flash) is configured
- Ambiguous edge-cases where Jev confidence is below threshold
- ποΈ Sub-100ms Decision Speed: Powered by TypeSafe System One Jev primitives.
- π― Zero CSS Selector Fragility: Control the browser purely with natural language intents (
aiClick("sign in button"),aiType("email", "user@test.com")). - π‘οΈ Self-Healing Test Assertions (
aiAssert): Semantic E2E test assertions with calibrated probabilities that never break across CSS class or UI redesigns. - π Smart Profile Form Auto-Mapper (
aiAutoFillForm): Batch-maps and populates entire web forms from arbitrary JSON profiles in a single sub-100ms API call. - π§ Autonomous Goal-Seeking Crawler (
aiSeekGoal): Traverses unknown websites toward an objective without hardcoded navigation scripts. - β³ Smart AI Waiting (
aiWaitFor): Polls pages dynamically with Jev probability checksβsay goodbye to flakysleep(3000). - π Intelligent Page Summarization (
aiSummarize&aiExtract): Extract executive statistics, financial tables, and JSON schemas directly from live pages. - π Element Coordinates & Points (
aiFindElement): Retrieve bounding boxes and center points{ x, y, width, height, centerX, centerY }for vision models or custom click drivers. - π€ Agent Orchestrator Ready: Export standard OpenAI Function Calling / LangChain tool definitions (
getToolDefinitions(),executeAction()). - π§βπ» Human-in-the-Loop: Seamless
onPrompthook to pause and ask users for 2FA, OTPs, or verification inputs during automation. - πͺΆ Ultra-Lightweight & Multi-Engine: Supports Chromium, Firefox, WebKit, and native system browsers (Chrome, Edge). Blocks images, fonts, media, and trackers for minimum RAM usage.
- π Zero-Dependency Native HTTP Client: Works out-of-the-box via native
fetchβno externalopenaiSDK required. Compatible with Ollama, vLLM, DeepSeek, Groq, OpenRouter, and Azure.
npm install jevbrowZero Extra Binaries Required: On Windows, macOS, or Linux, JevBrow can directly use your existing system Google Chrome or Microsoft Edge browser without downloading large Playwright binaries!
import { JevBrow } from 'jevbrow';
// 1. Launch & navigate in a single call
const { browser, page } = await JevBrow.open('https://example.com/portal', {
logLevel: 'silent', // Clean, silent output
});
// 2. Natural language login
await page.aiType('username', 'demo_user');
await page.aiType('password', 'secure_password_123');
await page.aiClick('sign in');
// 3. Smart wait for dashboard (no hardcoded sleep!)
await page.aiWaitFor('the user dashboard has loaded');
// 4. Extract intelligent stats summary via LLM
const summary = await page.aiSummarize('Extract all account metrics and stats');
console.log(summary);
await browser.close();import { JevBrow } from 'jevbrow';
const { browser, page } = await JevBrow.open('https://example.com/login');
// Automatically locates username, password, and clicks submit
await page.aiLogin({ username: 'myuser', password: 'mypassword123' });
// Check post-login status
const loggedIn = await page.aiAsk('Is the user account dashboard visible?');
console.log('Login Success:', loggedIn.result);
await browser.close();Stop writing fragile await sleep(5000):
// Polls page state every 500ms using sub-100ms Jev probability checks
// Returns immediately when the condition passes with high confidence!
await page.aiWaitFor('the payment checkout confirmation is displayed');
// Check for error banners dynamically
const error = await page.aiAsk('Is there an invalid card error visible?');
if (error.result) {
console.error('Payment failed!');
}Retrieve element coordinates to feed into vision models or draw UI overlays:
const btn = await page.aiFindElement('submit order button');
if (btn) {
console.log(`Selector: ${btn.selector}`);
console.log(`Coordinates: (${btn.box.centerX}px, ${btn.box.centerY}px)`);
console.log(`Confidence: ${(btn.confidence * 100).toFixed(1)}% via ${btn.source}`);
}interface DashboardMetrics {
netSales: string;
netProfit: string;
totalOrders: number;
}
const metrics = await page.aiExtract<DashboardMetrics>(
'Extract net sales, net profit, and total orders as JSON'
);
console.log('Parsed Metrics:', metrics);Stop writing brittle test assertions that break whenever CSS class names or DOM hierarchies change:
// Validates page condition dynamically using sub-100ms Jev probability checks
// Throws an AssertionError if probability does not reach threshold within timeout
await page.aiAssert('The checkout completed successfully and an order confirmation is visible');
await page.aiAssert('No credit card validation errors are displayed');Pass an arbitrary JSON user profile to automatically match and populate all form fields in a single sub-100ms batched Jev query:
const userProfile = {
customerName: 'Marcus Vance',
telephone: '+1 (555) 987-6543',
deliveryTime: '20:15',
comments: 'Please leave package near the front porch door.',
};
// Maps inputs, textareas, and selects in 1 batch Jev call and populates them
const result = await page.aiAutoFillForm(userProfile, { submitAfter: true });
console.log(`Auto-filled ${result.filledFields.length} inputs!`);
console.log('Unmapped profile keys:', result.unmappedKeys);Instruct the browser to autonomously discover and navigate to deep pages across unknown websites without hardcoded selectors:
const result = await page.aiSeekGoal({
goal: 'Find the developer API documentation or pricing guide',
maxSteps: 4,
onStep: (step) => console.log(`Step ${step.stepNumber}: ${step.action} -> ${step.url}`),
});
console.log('Reached goal:', result.success);
console.log('Path traversed:', result.path);You can plug JevBrow directly into LangChain, OpenAI Function Calling, Vercel AI SDK, AutoGen, or custom agent loops:
import { JevBrow } from 'jevbrow';
const { browser, page } = await JevBrow.open();
// 1. Get standard OpenAI-compatible tool definitions
const tools = page.getToolDefinitions();
// 2. Pass tools to your LLM orchestrator:
const response = await openai.chat.completions.create({
model: 'gpt-5.6-luna',
messages: [{ role: 'user', content: 'Go to github.com and search for jevbrow' }],
tools: tools.map(t => ({ type: 'function', function: t })),
});
// 3. Execute tool call dynamically:
const toolCall = response.choices[0].message.tool_calls[0];
const result = await page.executeAction(
toolCall.function.name,
JSON.parse(toolCall.function.arguments)
);
console.log('Tool Action Result:', result);JevBrow automatically loads .env files in Node.js 20+.
const browser = new JevBrow({
// Jev AI (TypeSafe System One)
jev: {
apiKey: process.env.JEV_API_KEY || process.env.TYPESAFE_API_KEY,
model: 'jev-latest', // Default: 'jev-latest'
},
// OpenAI-Compatible LLM (Optional fallback)
llm: {
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-5.6-luna', // e.g. 'gpt-5.6-luna', 'gpt-5.6-terra', 'gpt-5.6-sol', or 'claude-5-sonnet'
baseUrl: 'https://openrouter.ai/api/v1', // Any custom endpoint
useHttp: true, // Force native fetch, zero OpenAI SDK required
isVisionCapable: true, // Enable if using multimodal vision models
},
// Browser Engine & Optimization
browser: {
headless: true,
lightweight: true, // Blocks images, fonts, media, and trackers
browserType: 'chromium', // 'chromium' | 'firefox' | 'webkit'
channel: 'msedge', // 'msedge' | 'chrome' (uses system browser)
autoInstall: true, // Auto-downloads Playwright binary if missing
},
// Telemetry & Logs
logLevel: 'info', // 'debug' | 'info' | 'warn' | 'error' | 'silent'
showSteps: true, // Colorized step terminal output
onStep: (step) => {
console.log(`[${step.type}] ${step.message} (${step.durationMs}ms)`);
},
// Human-in-the-loop / 2FA Hook
onPrompt: async (request) => {
// Called when automation encounters an interactive 2FA/OTP prompt
return promptUserForOtp(request.message);
},
});JevBrow works seamlessly with any OpenAI-compatible provider:
// π Claude 5 Sonnet (via OpenRouter or OpenAI-compatible proxy)
const browser = new JevBrow({
llm: {
apiKey: process.env.ANTHROPIC_API_KEY,
baseUrl: 'https://openrouter.ai/api/v1',
model: 'anthropic/claude-5-sonnet',
},
});
// π DeepSeek V4.1 Flash
const browser = new JevBrow({
llm: {
apiKey: process.env.DEEPSEEK_API_KEY,
baseUrl: 'https://api.deepseek.com/v1',
model: 'deepseek-v4.1-flash',
},
});
// β‘ Groq (Ultra-fast inference)
const browser = new JevBrow({
llm: {
apiKey: process.env.GROQ_API_KEY,
baseUrl: 'https://api.groq.com/openai/v1',
model: 'llama-3.3-70b-versatile',
},
});
// π¦ Ollama (Local LLM)
const browser = new JevBrow({
llm: {
baseUrl: 'http://localhost:11434/v1',
model: 'llama3.3',
},
});Automation shouldn't pretend to magically bypass enterprise security or multi-factor authentication. When an automated workflow encounters a 2FA prompt, OTP field, or manual confirmation dialog, JevBrow's onPrompt hook pauses automation and requests input from the user or developer:
const browser = new JevBrow({
// Intercept interactive 2FA/OTP or confirmation requests
onPrompt: async (request) => {
console.log(`\nπ Human intervention needed: ${request.message}`);
// Read from CLI terminal, SMS gateway, or webhook
return await readUserInputFromCli(request.message);
},
});static open(url?, config?): Promise<{ browser: JevBrow; page: JevPage }>β Launch and navigate in one line.launch(): Promise<void>β Initialize browser engine.newPage(): Promise<JevPage>β Create a new AI-enhanced page.close(): Promise<void>β Terminate browser and clean up resources.
-
aiNavigate(url: string)β Navigate to URL and ensure page is ready. -
aiClick(description: string)β Click an element using natural language intent. -
aiType(description: string, text: string)β Type into matching field. -
aiLogin(credentials: { username?, password, submitText? })β One-liner login helper. -
aiAssert(assertion: string, options?: AiAssertOptions)β Resilient semantic assertion; throwsAssertionErrorif condition fails. -
aiAutoFillForm(profile, options?: AutoFillOptions)β Single-batch automatic form field mapping & population. -
aiSeekGoal(options: SeekGoalOptions | string)β Multi-step autonomous goal-seeking navigation crawler. -
aiWaitFor(condition: string, options?)β Polls with Jev AI until condition is met. -
aiAsk(question: string)β Query page state with calibrated probability ($0.0 - 1.0$ ). -
aiSummarize(prompt?: string)β Intelligent markdown summary of page content via LLM. -
aiExtract<T>(prompt: string)β Structured JSON data extraction. -
aiFindElement(description: string)β Retrieve element selector and bounding box{ x, y, width, height, centerX, centerY }. -
aiScreenshot(options?: { fullPage?, base64?, path? })β Capture screenshot. -
getToolDefinitions()β Standard function-calling tool specifications. -
executeAction(action, params)β Dynamic tool execution handler. -
page: Pageβ Direct access to the raw Playwright Page instance.
- Error thrown by
page.aiAssert(...)with{ assertion, probability, threshold, url }.
MIT Β© SuparvaCode
