Skip to content

Open source · AGPL-3.0

Khadim

A local-first terminal coding agent. Interactive or headless, with a typed SDK and JSON event stream, 19+ providers, and tools that run locally. Desktop Agents (Alpha) and Studio (Beta) are in progress — not shipped yet.

  • Local-first
  • Interactive + headless
  • Typed SDK
  • WASM plugins
  • 19+ providers
A contained local workspace of modular tools, layered context, and an explicit approval marker
Khadim / Local context studyCLI shipped · desktop in progress
19+
AI providers
2
Run modes
Local
Workspace tools
AGPL-3.0
License

What Khadim does today

The CLI coding agent is the stable entry point today. The same agent engine and event stream power the CLI, SDK, plugins, and desktop prototypes.

Interactive terminal + headless exec

Streaming terminal UI with slash commands, saved sessions, and provider/model switching. Or run a single task headless with --prompt and exec, and stream JSON events with --json for scripts and CI.

khadim — local
$ khadim run "refactor auth module"

context    reading 12 files
editing    src/auth/session.ts
verify     pnpm test

done       3 edits · 0 errors

LOCAL ACTION · STREAMED EVENTS · REVIEWABLE CHANGE

Typed SDK and JSON events

Embed Khadim in Node.js apps with runAgentStream. The same normalized event stream — text_delta, step_start, step_update, step_complete, question, done, error — drives the CLI, desktop, and web.

runAgentStream()

01step_startstreamed
02text_deltastreamed
03step_updatestreamed
04questionawaiting input
05step_completestreamed
06donestreamed

19+ providers, including local

OpenAI, Anthropic, Gemini, Groq, xAI, OpenRouter, Mistral, Cerebras, Copilot, Codex, and local-compatible options. Credentials are read from environment variables or the interactive settings panel.

Provider registry19+ available
OpenAIAnthropicGeminiGroqxAIOpenRouterMistralCerebrasCopilotCodexLocal / compatible+ 8

WASM plugin sandbox

Plugins are sandboxed WebAssembly modules that expose tools to the agent. A manifest requests fs, http, store, and desktop UI capabilities. Tools run locally, on your machine, unless you opt into a remote runner.

plugin.tomlWASM / sandbox

namerepository-toolsloaded locally

01fs.readrequested

02fs.writerequested

03httpnot granted

04storenot granted

05desktop-uinot granted

Platform direction and status

One shared agent engine. The CLI is the workhorse today; desktop and web are active build surfaces — tracked as Alpha/Beta, not as finished products.

  • 01
    CLI coding agent

    apps/khadim-cli — interactive terminal UI, headless exec, SDK, and npm package.

    Shipped
  • 02
    Agent engine & providers

    crates/khadim-ai-core and khadim-coding-agent — provider integrations, model registry, agent loop, sessions.

    Shipped
  • 03
    Documentation

    Astro Starlight docs site at unravelaidk.github.io/khadim.

    Shipped
  • 04
    Desktop — Agents

    Electron desktop prototype for agent runs and local projects. Under active development.

    Alpha
  • 05
    Desktop — Studio

    Artifact workspace for documents, React sites, and canvases in the desktop prototype.

    Beta
Khadim

Start with the CLI today

Khadim runs locally and calls the provider you configure. Install the npm package or use the installer script — desktop and web arrive incrementally.