# How it works

What runs on your Mac when you use Kuvo Code, and how the pieces fit.

Kuvo Code is two things: the opencode engine, which is the agent, and a native Mac app around it. The engine talks to models, runs tools and keeps your sessions and accounts. Kuvo Code starts it, shows you what it does, and adds a few things of its own, like the browser in the side panel.

## The engine

The engine is [opencode](https://github.com/anomalyco/opencode), the official build, unmodified. Kuvo Code downloads it on first launch, checks that it's the genuine, signed file, and runs it as a private server only Kuvo Code can talk to. It exits when Kuvo Code does.

Because it's opencode itself, the providers, models and tools are opencode's. Its data lives in Kuvo Code's own folder, apart from any opencode you've installed.

## The app

Kuvo Code is written in Swift with SwiftUI and AppKit. It follows the engine's live events to show each step as it happens, reads git directly for the Changes tab, and serves the agent's browser tools itself, on your Mac only.

The usage item in the menu bar is a fork of [OpenUsage](https://github.com/robinebers/openusage), built in.

## Built with

[opencode](https://github.com/anomalyco/opencode), [Textual](https://github.com/gonzalezreal/textual), [SwiftTerm](https://github.com/migueldeicaza/SwiftTerm), [Prism](https://prismjs.com), [browser-use](https://github.com/browser-use/browser-use)'s page reader, [OpenUsage](https://github.com/robinebers/openusage), [Sparkle](https://sparkle-project.org) and [KeyboardShortcuts](https://github.com/sindresorhus/KeyboardShortcuts). Their licenses are in [THIRD_PARTY_LICENSES.txt](https://github.com/serhatandic/kuvo-code/blob/main/THIRD_PARTY_LICENSES.txt).