Real-time visual plumbing for agents: one core behind a frozen C ABI that connects any model to live cameras, video, clips and screens, and lets it draw and act back into the frame.
Install · What you get · SDKs · Contributing
Point it at a camera, a clip or a screen and it tells you what is in every frame. Draw on what it hands back and it composites your work into the picture. One compiled core does the tracking, the segmentation, the retouching and the capture, on iOS, Android and the web, and nothing ever leaves the device.
iOS and Android carry the compiled engine inside the package - an XCFramework, a
.so - so you add a coordinate and never run a build step. On web you add the
wrapper and host the prebuilt wasm engine from the release. Either way there is
no toolchain.
iOS - Swift
In Xcode, File > Add Package Dependencies, and paste the repository URL:
https://github.com/myzonerocks/gosslens
Xcode fills in the newest release for you. In a Package.swift, ask for the
same thing by naming the oldest version you support; SwiftPM resolves forward
to the newest release on its own:
// Package.swift
.package(url: "https://github.com/myzonerocks/gosslens", from: "0.14.0")Android - Kotlin
// build.gradle.kts
implementation("io.github.avosa:gosslens:0.14.0")Web - TypeScript
bun add @myzonerocks/gosslensThen wire the render loop with the guide for your platform: iOS, Android, Web, or the C SDK for any other language with a C FFI.
- For agents - one versioned record of everything the engine sees, an event stream, budgeted frame egress, and annotations an agent draws back into the frame. An MCP server makes all of it tools a model can call.
- What the frame says - text detection and recognition on the engine's own ONNX rail: oriented regions, reading order, and a track id that survives a frame.
- Screens - a display or a window is a source like any other, with the scale factor and desktop origin that put a coordinate back on a real pixel: ScreenCaptureKit, MediaProjection, or getDisplayMedia.
- Spatial state - which surface is the floor, where a thing fits and how much of that surface it leaves, a distance with the uncertainty its inputs carried, and the transform between two devices' origins.
- Memory - an on-device index over embeddings with the keyframe selection that decides what was worth remembering, and the search that finds it again.
- Beauty and makeup - smooth, whiten, reshape, lipstick, and blush, each a live 0-to-1 control.
- Tracking - multi-face, hands with gestures, and full-body pose, plus selfie segmentation for virtual backgrounds.
- Lenses - the
.glensformat: scripted triggers, shader passes, glTF models, and physics, authored once and run on every platform. - Your own models - a lens bundles a TFLite or ONNX net and binds its outputs to parameters, masks, depth, or a drawn image; the ONNX engine is written from scratch here, with quantization, control flow, and inference that allocates nothing after load.
- World and AR - anchor content in space from ARKit, ARCore, or WebXR frames, and raycast a tap onto a scanned world mesh.
- Capture - photos, video, and multi-source compositing through each platform's native media APIs.
Every capability targets all three platforms; docs/PARITY.md is the honest table of what is proven where.
| SDK | For | Package |
|---|---|---|
| Swift | iOS | SwiftPM, a checksummed XCFramework |
| Kotlin | Android | Maven Central io.github.avosa:gosslens |
| TypeScript | Web | npm @myzonerocks/gosslens |
| C | any language with a C FFI | libgosslens, static and shared |
The platform SDKs are thin wrappers over the same C ABI and share one operation contract, so an effect behaves identically everywhere. Full install and render-loop steps live in each platform's guide above.
- API.md, the operation contract every SDK wraps
- ARCHITECTURE.md, what owns what and why
- LENS-FORMAT.md and PERCEPTION-FORMAT.md, the two formats published for forking
- MCP.md, the engine as tools a model calls
- PARITY.md, what is proven on which platform
- ROADMAP.md and CHANGELOG.md
Note
Everything runs on device. The engine makes no network calls and carries no analytics. A camera frame never leaves the process.
Apache 2.0. See LICENSE.md. Third-party components retain their own
licenses, recorded per component under third_party/ and summarized in
NOTICE.md.
With Nix the repository's flake gives zig 0.17.1, bun, a JDK and ffmpeg at the pinned version, the same on a developer's machine and the runner, while the Swift SDK builds with the system's Xcode: nix/ensure.sh develop opens it, installing Nix first when the machine has none, nix develop -c zig build gate runs the gate the way CI does, and direnv opens the shell on cd through the tracked .envrc. flake.lock pins nixpkgs; move it with nix flake update. Without Nix, tools/toolchain-sync still pins zig by .zigversion.