bitreka

Software Engineering Leader | AI-Assisted Development | .NET & C# | FinTech & Payments | E-Commerce | Architecture • Backend • Microservices • DevOps • Test Automation • AI Agents

All work

Kood

A local coding agent that runs on the user's own machine with any LLM they choose, followed and steered from a phone.

Status
prototypeAn exploration that proves the idea, not a finished product.
Role
Sole engineer: architecture, agent core, provider layer, desktop app, relay and mobile remote.
Started
Categories
Developer tools, AI and LLM
Parts
Desktop app, Mobile app

Purpose

Run a coding agent on one's own computer with any tool-calling model and one's own API key, keep every risky action under explicit approval, and follow or approve its work remotely.

The problem

Hosted coding agents tie the user to one vendor's models and run with broad access to files and the shell. Moving the agent onto one's own machine solves the lock-in, but only if every risky step stays visible, reversible and under the user's control — also away from the desk.

What I built

  • A headless .NET 10 agent core whose loop goes prompt, model, tool call, permission, execution and back, exposed over a WebSocket bound to localhost only.
  • A multi-LLM layer on raw HTTP with no external NuGet dependency: one Anthropic provider and one OpenAI-compatible provider covering OpenAI, DeepSeek, Qwen, Grok, Gemini and local Ollama, plus a model router.
  • Built-in file, search, git, GitHub CLI and shell tools, native screen tools for vision models and external MCP tools — each classified Safe, Caution or Dangerous and passed through a permission gate with a diff preview.
  • A safety net: an audit log of every tool call and decision, checkpoints with undo, and sessions that persist and export to a single HTML file.
  • An Electron and React desktop app with bring-your-own-key settings; keys live in the macOS Keychain or Windows Credential Manager and never leave the machine.
  • A Kestrel WebSocket relay that bridges NAT with a pairing code, and an Expo mobile remote for status, prompts and remote permission approval — with no agent or shell access on the phone.

Features

  • Pick one of seven LLM providers (Anthropic, OpenAI, DeepSeek, Qwen, Grok, Gemini, local Ollama) or let "auto" choose.
  • File, search, git, GitHub CLI and shell tools with permission cards and a line-level diff preview.
  • An audit log of every tool call, and checkpoints to undo file changes.
  • Saved sessions that resume, and export to a single HTML file.
  • External MCP tools, for example browser control.
  • Native screen tools on macOS for vision models.
  • A mobile remote with a pairing code and permission approval over a relay.
  • A token and USD counter for every run.
  • API keys entered in the interface go to the OS keychain.
  • Desktop installers built with Electron.

Stack

  • .NET
  • C#
  • Electron
  • React
  • Vite
  • TypeScript
  • Expo / React Native
  • WebSocket
  • Claude API
  • Ollama

AI in this project

In the product

  • The product is the LLM: an agent loop sends the prompt to the chosen model, runs the tool calls it returns once permission is given, and feeds the results back.
  • The router behind "auto" is a keyword and length heuristic, not a model: simple prompts go to the cheapest tool-calling model, complex ones to a top coding model.
  • Every tool that is not safe needs your approval. Denying returns control to the model, every action is logged, and file changes can be undone.
  • A pull-request review recipe sends the diff (cut at 40,000 characters) to the chosen model and posts a comment only when asked.
  • Screenshots go back to vision-capable models as images; screen tools are off for models without vision.
  • With no key configured the agent runs a scripted fake provider without any network. Keys stay in the OS keychain and never reach the relay.

In how it was built

  • All 25 commits carry a Claude co-author trailer.
  • The repository has no assistant rule file or gate scripts of its own; its checks are the CI build and tests, and the safety net lives in the product itself.

Key flows

Steps

From a prompt to an approved change

  1. Step 1 of 4: Choose a model

    The user enters their own API key in the desktop settings, where it is stored in the OS keychain, or picks a local Ollama model.

  2. Step 2 of 4: Prompt

    The task is described in the desktop app, or from the phone through the relay.

  3. Step 3 of 4: Approve

    Each risky tool call pauses with its risk level and, for file changes, a diff preview; it can be allowed once, always or denied — on the desktop or the phone.

  4. Step 4 of 4: Review and undo

    The transcript, the token and cost counter and the audit log show what happened, and the last prompt's file changes can be undone.

Limitations

  • Relay pairing still uses a plain code; pairing by QR with short-lived tokens is the next step.
  • Runs on macOS and Windows only, and native screen control is currently macOS-only.

Want something like this?

Tell me about your project — I reply within two working days.

Start a project