A local-first AI coding agent for VS Code with repository-aware context, controlled execution, and flexible model providers.
AI coding agent · VS Code · local-first · MCP · Ollama · TypeScript
Mitii understands a repository before it changes it. It combines local indexing, Ask/Plan/Agent workflows, approval-aware tools, checkpoints, memory, and session logs in one VS Code experience. Use a local OpenAI-compatible model for privacy, or any OpenAI-compatible cloud endpoint when more capability is required.
- Repository-aware context — SQLite FTS5, symbols, vectors, repo maps, diagnostics, Git state, and explicitly attached files.
- Clear operating modes — Ask for read-only analysis, Plan complex work, Agent applies changes, and Review inspects results.
- Controlled execution — configurable approvals, dangerous-command blocking, workspace trust checks, and pre-write checkpoints.
- Model flexibility —
echo(local stub) and OpenAI-compatible endpoints (Ollama, LM Studio, OpenRouter, OpenAI, Azure OpenAI, DeepSeek, and similar/v1APIs). Native Anthropic, Gemini, and Bedrock adapters are not shipped yet. - Extensible workflows — built-in tools, MCP servers (VS Code), project rules, and reusable skills.
- Local evidence — session logs and a basic audit-pack export from the VS Code host (settings redacted). Org SSO/RBAC, SIEM webhooks, and managed enterprise policy packs are not implemented yet.
flowchart LR
User[Developer] --> UI[VS Code webview]
UI --> Controller[Runtime controller]
Controller --> Context[Hybrid context engine]
Context --> Index[(SQLite FTS5 + symbols)]
Context --> Vectors[(LanceDB or SQLite vectors)]
Controller --> Pipeline[Classify → route → depth → skills]
Pipeline --> Loop[Ask / Plan / Agent loop]
Loop --> Policy[Tool policy + approvals]
Policy --> Tools[Files, shell, Git, MCP]
Loop --> State[(Plans, memory, logs, checkpoints)]
Loop --> Provider[Local or cloud model]
The extension and CLI talk to the agent through @mitii/sdk → @mitii/v8. See packages/v8/ARCHITECTURE.md for component boundaries, request flows, storage, security, and an end-to-end example.
- VS Code 1.85 or newer
- Node.js 20 or newer
- pnpm 10.13 or newer for source development
git clone https://github.com/Mitii-dev/Mitii.git
cd Mitii
pnpm run setupPress F5 in VS Code to open an Extension Development Host. Open a project, select the Mitii icon, wait for indexing to complete, and choose a provider in Settings.
For Cursor development on macOS:
pnpm run setup:cursorRun an OpenAI-compatible endpoint such as Ollama, then configure:
{
"mitii.provider.type": "openai-compatible",
"mitii.provider.baseUrl": "http://localhost:11434/v1",
"mitii.provider.model": "qwen3-coder:30b",
"mitii.safety.autonomyPreset": "guided",
"mitii.safety.approvalMode": "review_all"
}API keys for hosted providers are stored in VS Code SecretStorage rather than workspace settings.
Ask Mitii:
Plan a safe migration of the user cache to Redis. Identify affected files,
tests, rollback steps, and configuration changes. Do not edit files yet.
Review the generated plan, switch to Agent mode, and send:
Implement the approved plan and run the relevant tests.
Mitii retrieves relevant context, selects the required capabilities, requests approval for protected actions, checkpoints affected files, applies scoped edits, and runs configured or discovered verification commands.
pnpm run build:cli
node apps/cli/bin/mitii.js ask "Summarize the authentication flow" --echo
node apps/cli/bin/mitii.js index --cwd /path/to/project
node apps/cli/bin/mitii.js status --jsonSee apps/cli/README.md for ask, session, index, status, and export-session. Daemon / mitii serve is deferred.
@mitii/v8, @mitii/sdk, @mitii/host, and @mitii/cli publish to npm on v* release tags (see docs/RELEASE.md). For local development, consume them from this monorepo workspace.
import { createMitiiClient, EchoLlmPort } from '@mitii/sdk';
const client = createMitiiClient({
understandingLlm: /* host LlmPort */,
runLlm: new EchoLlmPort(),
workspaceRoot: process.cwd(),
defaultMode: 'ask',
});
const run = client.start({
prompt: 'Summarize the authentication flow',
mode: 'ask',
});
for await (const event of run.events) {
if (event.type === 'model_delta' && event.preview) {
process.stdout.write(event.preview);
}
}
await run.result;The live surface is createMitiiClient / start / resume — not a legacy query() helper or DaemonClient. More detail: packages/sdk/README.md.
Mitii keeps indexes, plans, memory, logs, and checkpoints local by default. Only context sent to the configured model provider crosses that provider boundary.
What exists today:
- approval presets and workspace trust enforcement
- SecretStorage for API keys (VS Code)
- session logs and a basic audit-pack export (redacted settings + run events)
- OpenAI-compatible local endpoints (Ollama / LM Studio) for privacy-sensitive work
Not yet product features: mitii.enterprise.localProvidersOnly, signed SIEM/webhook delivery, SSO/OIDC, RBAC, or a dedicated docs/enterprise/ pack.
mitii-ai-agent/
├── packages/
│ ├── v8/ # @mitii/v8 — host-neutral agent runtime
│ └── sdk/ # @mitii/sdk — public API over V8
├── apps/
│ ├── vscode/ # VS Code extension (F5 target)
│ └── cli/ # headless CLI
├── tests/ # architecture + consumer suites + solid benchmark
├── docs/ # developer and release guides
└── scripts/ # build, release, and audit automation
See docs/REPO_LAYOUT.md. Canonical architecture: packages/v8/ARCHITECTURE.md.
pnpm run build:all # build all packages + Electron SQLite for F5 / indexes
pnpm run build # packages only (v8 + sdk + cli + vscode)
pnpm run typecheck # typecheck v8 + sdk + cli + vscode
pnpm test # architecture + selected Vitest suites
pnpm run package # build the target-specific VSIX (apps/vscode)
pnpm run package:preflight # release checks, tests, and packageNative modules target different runtimes. rebuild:native stages the Electron
binding for F5 and restores the Node ABI in node_modules, so tests keep working:
pnpm run rebuild:native # Electron → dist/native, then restore Node ABI
pnpm run rebuild:node # Node-only (tests/CLI)
pnpm run rebuild:all # alias of rebuild:native (both targets ready)Vitest scripts auto-heal ABI mismatches via scripts/ensure-node-native.mjs.
See CONTRIBUTING.md for coding conventions and pull request guidance.
- Architecture
- Repository layout
- Release / publish units
- User and developer guides
- Solid benchmark
- Tests layout
- Website
- Hosted documentation
Contributions are welcome. Keep changes focused and run pnpm run typecheck and pnpm test before opening a pull request.
- Issues: github.com/Mitii-dev/Mitii/issues
- Author: @codewithshinde
- Email: codewithshinde@gmail.com
Mitii AI Agent is licensed under AGPL-3.0-or-later. Contact the maintainer for commercial licensing outside the AGPL terms.

