Avante

A local-first macOS writing assistant powered by on-device LLMs with recursive summarization.

2025 Swift · SwiftUI github.com/osbo/avante

Avante

A local-first macOS writing app that uses Apple's on-device foundation models to analyze the document you're editing in real time.

overview

How it works

Avante runs entirely on-device — no network calls, no third-party APIs. Apple's FoundationModels framework supplies the LLM; everything else is Swift / SwiftUI.

  1. Chunked analysis — the document is split into overlapping passages sized to the model's context window. Each chunk is summarized independently, with the surrounding summaries threaded in as conditioning so a chunk's interpretation is informed by what surrounds it.
  2. Recursive roll-up — chunk summaries are themselves summarized, recursively, so a single global summary covers a document longer than any single context. The hierarchy is cached per document and updated lazily as edits invalidate sub-trees.
  3. Per-passage metrics — the model emits novelty, clarity, and flow scores for each passage. Those scores drive the inline highlighting in the editor view (AIAnalysisTextView, HighlightingLayoutManager) and the rolling charts in the sidebar (MetricsSidebar).
  4. Debounced edit pipelineAnalysisJobProcessor and View+Debounce coalesce typing into batched jobs so analysis runs only after edits pause, keeping the editor latency-free.

metrics

Stack

  • Swift / SwiftUI — document-based app, MVVM
  • FoundationModels — Apple's on-device LLM framework
  • NaturalLanguage — tokenization for chunk boundaries
  • Combine — debounced job pipeline and reactive view bindings

Building

Open avante.xcodeproj in Xcode and run. Requires macOS 26 (Tahoe) and Apple Silicon for the on-device models.

focus

License

MIT — see LICENSE.