B4n1Web — Agentic Browser Engine
Ultra-lightweight headless browser for AI agents. Single Rust binary, 4 language SDKs. Navigate URLs, extract structured content (markdown, links, screenshots), and build autonomous agent workflows.
Quick Start
1. Install the binary
# One-liner (Linux/macOS/Windows via WSL)
curl -sL https://b4n1.com/install | bash
Or use your preferred package manager:
# Python
pip install b4n1-web
# JavaScript/TypeScript
npm install b4n1-web
# Java (Maven)
# Add to pom.xml:
# <dependency>
# <groupId>com.b4n1</groupId>
# <artifactId>b4n1-web</artifactId>
# <version>0.9.5</version>
# </dependency>
# C# .NET
dotnet add package B4n1Web
2. Extract content from any URL
from b4n1web import AgentBrowser
browser = AgentBrowser()
page = browser.goto("https://example.com")
print(page.url) # URL
print(page.markdown) # Clean markdown content
print(page.links) # All extracted links
print(page.screenshot) # Base64 PNG (if available)
print(page.js_output) # JavaScript output (if evaluated)
browser.close()
import { AgentBrowser } from 'b4n1-web';
const browser = new AgentBrowser();
const page = await browser.gotoAsync('https://example.com');
console.log(page.url);
console.log(page.markdown);
console.log(page.links);
await browser.close();
using B4N1Web;
var browser = new AgentBrowser();
var page = browser.Goto("https://example.com");
Console.WriteLine(page.Url);
Console.WriteLine(page.Markdown);
Console.WriteLine(page.Links);
browser.Close();
import com.b4n1.AgentBrowser;
import com.b4n1.Page;
AgentBrowser browser = new AgentBrowser();
Page page = browser.goto("https://example.com");
System.out.println(page.getUrl());
System.out.println(page.getMarkdown());
System.out.println(page.getLinks());
browser.close();
What You Get
| Feature | Description |
|---|---|
| Markdown | Clean, structured content from any page |
| Links | All internal/external links extracted |
| Screenshots | Full-page or viewport PNG (base64) |
| JavaScript | Execute custom JS and get results |
| Wait for selector | Wait until element appears |
| Click/Type | Interact with elements |
| MCP Server | 33 tools for AI agent workflows |
Browser Modes
| Mode | Description | RAM | Startup |
|---|---|---|---|
| Light | HTTP fetch + HTML parsing only | ~15MB | Instant |
| JS | Light + JavaScript extraction | ~15MB | Instant |
| Render | Full Chromium + screenshots | ~100MB | ~2s |
SDK Matrix
| Language | Package | Version | Binary Bundled |
|---|---|---|---|
| Python | b4n1-web | 0.9.5 | ✅ All platforms |
| JavaScript/TypeScript | b4n1-web | 0.9.5 | ✅ All platforms |
| Java (Maven) | com.b4n1:b4n1-web | 0.9.5 | ✅ All platforms |
| C# .NET (NuGet) | B4n1Web | 0.9.5 | ✅ All platforms |
All platforms = linux-amd64, linux-arm64, macos-x64, macos-arm64, windows-amd64, windows-arm64
Next Steps
- Installation — Detailed install instructions for each platform
- Browser Modes — Choose the right mode for your use case
- Python SDK — Complete Python API reference
- JavaScript SDK — Complete JS/TS API reference
- C# SDK — Complete C# API reference
- Java SDK — Complete Java API reference
- CLI Reference — Command-line interface
- MCP Integration — Use with AI agents via MCP