madewithlaya

Catalog / Tools & apps

0077GitHub

FluidUse: local computer use on Apple Silicon with Laya and CUA-S1-FORMS

Swift package that reads a form in a running Mac app through the Accessibility API, asks an on-device model what belongs in each field, and types it in. ~1 ms per decision.

Open source ↗ github.comcostfree, on-devicetime~1 ms / decision on ANE
FluidInference/FluidUseREADME ↗
# FluidUse

Local computer use on Apple silicon. FluidUse reads a form in a running Mac
app or browser through the Accessibility API, asks a small on-device model
what belongs in each field, and types the answer into the real app. About
1 ms per decision on the Neural Engine, nothing leaves the machine.

The first model is [CUA-S1-FORMS](https://huggingface.co/FluidInference/cua-s1-forms-coreml),
a 706K-parameter form specialist from [Cua](https://github.com/trycua/cua),
converted to Core ML and served by [FluidAudio](https://github.com/FluidInference/FluidAudio).

## Demo video



https://github.com/user-attachments/assets/a0b31285-05be-4bcf-a645-4283eb327c35



## Use

```swift
.package(url: "https://github.com/FluidInference/FluidUse.git", from: "0.2.0")
```

```swift
import FluidAudio
import FluidUse

let model = try await CuaS1FormsManager.load()
let driver = AccessibilityFormDriver(application: safari)   // any NSRunningApplication
let page = try await driver.snapshot()                       // fields, labels, values
let options = FormSchema.renderOptions(entities: profile)    // "fill Email: …", check, click, skip

for field in page.elements where field.isActionable {
    let context = FormSchema.renderContext(formTitle: page.title, element: field)
    let decision = try await model.score(context: context, options: options)
    // decode with FormSchema.decode, then driver.type / driver.click
}
```

`WebFormDriver` does the same for an embedded `WKWebView`. `DocumentEntities`
turns a PDF or text file of `Label: value` lines into the profile; an optional
`PredeterminedAnswer` sheet covers question-style fields the model does not decide.

## laya typed decisions

[laya](https://github.com/NandhaKishorM/laya) (Convai Innovations, Apache-2.0) is an open
Jev-style dec

Also filed under Tools & apps

  1. 0005

    laya-mlx plays Snake at 60 decisions per second

    介绍比Jev快50倍,在你设备上跑的laya-mlx! 只在你的设备上占用最高1G内存 Laya是一个开源的类似于Jev的,基于文本输出概率的分类系统 我将其移植到MLX,并且做了一些性能优化! 视频中就是这个模型在我的本地M3Max上玩贪吃蛇 这个模型能够以每秒决策60次的速度玩贪吃蛇! https://t.co/31KGUiNunb

    @mizorewww · Tools & apps · free, local · 60 decisions/s

  2. 0112

    Laya on Axera AX650 and AX8850 edge NPUs, under 70 ms

    AXERA-TECH's conversion of all three Laya checkpoints for its edge AI chips, reported at latency under 70 ms per decision on AX650/AX8850.

    AXERA-TECH · Tools & apps · free, on-device · < 70 ms on AX650 / AX8850

  3. 0099

    laya-mcp (PerryLink): a warm sidecar that fixes Laya's silent truncation and constant noul

    MCP server plus HTTP sidecar: token-budget preflight that reports what would be cut, a persisted calibration store, structured errors, and a noul fix (P(true) 0.5 → 1.0).

    @PerryLink · Tools & apps · free, local

  4. 0097

    Gomoku against Laya-MLX: you play black, the model picks white's move from six candidates

    Local 15x15 Gomoku on Apple Silicon. Rules in Python, board in the browser, every AI move one real Laya choice over up to six candidates, probabilities shown. No Gomoku training.

    smile-magic · Tools & apps · free, local