AiBrowserKit provides SwiftUI + WKWebView browser components for macOS agent applications. Embed a full multi-tab browser panel, pinned-site sidebar, bookmarks, JS console capture, and screenshot tooling — or pull in the WebKit primitives alone and build custom chrome around your own automation bridge.
BrowserView + BrowserViewModel + BrowserTab give you a tab bar, load progress, and a smart URL bar — inject a shared BrowserEnvironment at app root and drop in BrowserView.
A folder-tree bookmark system with JSONL persistence and a slide-out panel, plus a pinned-sites sidebar with groups, SF Symbols, favicons, auto-refresh, and localhost reachability checks.
Intercepts console.log/info/warn/error/debug into a ring buffer, viewable in a detached panel or inline — useful for debugging pages an agent is driving.
Visible-area snapshot or drag-select region, routed to clipboard, file, or a host clipboard callback (onAddToClipboard) that plugs screenshots straight into your app's own clipboard or memory pipeline.
For apps that drive the browser via tools (browserNavigate, browserGetContent, browserExecute), skip BrowserView entirely — use WebViewFactory.makeWebView and register the active WKWebView with your own host controller.
Built entirely on system frameworks (SwiftUI, WebKit, AppKit) — nothing to resolve, nothing to audit beyond Apple's own frameworks.
.package(url: "https://github.com/NerdSnipe-Inc/AiBrowserKit.git", from: "1.0.0").target(name: "MyApp", dependencies: ["AiBrowserKit"])The full browser UI (BrowserView, pinned sites, screenshots, console panel) is macOS-only. iOS and visionOS get the cross-platform WebKit primitives — WebViewFactory, WebViewRepresentable, WebViewState, BookmarkService — for building custom chrome.
Apps that want a complete browser panel use BrowserView and BrowserEnvironment directly. Agent apps that already have their own automation bridge can use WebViewFactory and WebViewRepresentable alone and build custom chrome around them — both paths share the same underlying WebKit state.
No — BrowserView, the pinned-sites UI, screenshots, and the console panel are macOS-only (#if canImport(AppKit)). iOS and visionOS get the cross-platform WebKit primitives (WebViewFactory, BookmarkService, ConsoleLogView) for custom integrations.
A document-start script that reduces automation fingerprinting when a web view is being driven by an agent — see the Security & Privacy section of the repo's README for details.
Yes — most APIs are standard WebKit/SwiftUI and work on earlier macOS versions. The default target matches Apple Intelligence / Tahoe SDK apps in the NerdSnipe stack; lower it in Package.swift if you need broader support.
Drop in BrowserView for a complete multi-tab browser panel, or use the WebKit primitives alone to build custom chrome around your own automation bridge.