Knit: Giving AI Agents a Nervous System

How a local-first Go runtime bridges the sensory gap between human UI feedback and agentic code modification.

• View on GitHub • More from chadsly

A human looking at a detailed blueprint while a blindfolded robot tries to build a wall, representing the sensory gap between humans and AI.
The "Context Gap" occurs when humans can see a UI problem perfectly, but struggle to translate that visual intuition into a text prompt an agent can understand.
Portrait of chadsly

Knit sits between a running application and the systems you use to change it. Instead of asking people to write long tickets, annotate screenshots by hand, or reconstruct UI problems from memory, Knit lets them review software in context: point at the interface, speak about what should change, inspect the captured request, and send an approved package to a coding agent.

— chadsly, Project Creator (GitHub)
Key Takeaways

The Bandwidth Problem in AI Coding

The "Context Gap" is the silent killer of AI coding productivity. You tell an agent to "fix the padding on this button," and it spends highly expensive compute cycles grepping your codebase just to find which of the fourteen button components you mean. Humans operate in a high-bandwidth, visual world. Coding agents, despite their reasoning capabilities, are effectively blindfolded and forced to navigate via text streams.

Knit is an open-source project that treats the human developer as a high-fidelity sensor. By capturing voice, DOM metadata, and screen captures, it turns vague human intuition into a machine-readable specification. It is not just a bug reporter. It is a sensory organ for Large Language Models.

The Anatomy of a Canonical Package

The core innovation of Knit lies in its data structure, defined in internal/server/transmission_package.go. When a user points at a UI element and speaks, Knit bundles the transcribed voice note, a screenshot, and the precise DOM context into a single, cryptographically signed JSON payload called the "Transmission Package."

A flow diagram showing the state machine of a Knit Review Session. It starts with user interaction (Voice + Click) feeding into a "Local Daemon (SQLite)" node. The Daemon transforms this raw input into a "Transmission Package" containing Base64 images

This package gives the agent immediate grounding. Instead of searching for the button, the agent receives the exact CSS selector, the current ARIA roles, and the visual state of the element before and after the interaction. The agent no longer has to guess where to start.

Security as a First-Class Citizen

Because Knit captures sensitive DOM data and voice recordings, it cannot operate as a typical cloud SaaS tool. It is built as a local-first Go daemon. The architecture relies on an "explicit trust model" where data never leaves the local machine until the user explicitly approves a generated change request.

A needle and thread stitching heavy iron links together, representing the hash-chained audit logs in Knit.
Knit uses SHA-256 hash-chaining to ensure the integrity of its local audit logs.

The audit package implements hash-chained logging, literally "knitting" events together. Every action is hashed with the previous action's hash, creating a tamper-evident ledger. Combined with encrypted SQLite storage, this satisfies the strict compliance requirements of enterprise environments.

From Feedback to Implementation

The final piece of the puzzle is the Adapter pattern found in internal/agents. Knit does not try to be the AI model itself. Instead, it prepares the data and hands it off to specialized execution layers like Claude Code or OpenCode.

A split view showing the old way of typing bug reports versus the new way of pointing a laser to generate structured data.
Multi-modal capture replaces the tedious process of describing visual issues in text.
Feature Standard AI Chat Cloud Feedback Tools Knit
Input Method Text-only Screen Recording Multi-modal signed packages
Context Awareness File-only Visual-only Visual and DOM grounded
Privacy Cloud API Cloud SaaS Local-First Encrypted

By shifting the focus from "how do we generate code" to "how do we capture intent," Knit addresses a critical bottleneck in the agentic workflow. It transforms the traditional Jira ticket into an actionable, context-rich payload, allowing AI to finally see what the human sees.


Sources: Codebase analysis, architectural documentation, and the Knit GitHub repository.