Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Mi CodeNew to Visual Studio Code? Get it now.
Mi Code

Mi Code

glenn-young

|
46 installs
| (1) | Free
Local-first agent runtime for private coding, document work, and controlled workspace automation in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mi Code

Local workspace work-agent runtime for private coding, evidence, and controlled execution

Mi Code is public preview software. It is a local-first VS Code agent runtime for evidence-based execution, verification-first workflows, and bounded workspace automation across code, local files, documents, PDFs, spreadsheets, and browser evidence.

Mi Code is meant for users who want a model to work inside a real workspace while keeping inspected evidence, applied changes, verification results, blockers, and remaining risk visible. It is not production-ready software, a broad RPA/crawler, a general business portal, or a claim that every local/private model combination works.

Why Mi Code?

Many coding agents assume a powerful hosted model with large context and reliable tool use. Mi Code is designed for messier local and enterprise environments: Ollama, OpenAI-compatible endpoints, vLLM, internal gateways, smaller context windows, strict data boundaries, and models that need help staying inside tool and verification contracts.

The practical product shape is:

workspace + evidence + controlled execution + task continuity

Evidence assists. Runtime guards. The model leads.

Core Principles

  • Local-first by default: the default provider is local Ollama, while remote providers are explicit user choices.
  • Evidence before trust: file reads, git state, diagnostics, document structure, browser snapshots, command output, and verification results should support user-visible claims.
  • Controlled execution: edits, commands, document/spreadsheet actions, browser actions, and service-like actions are bounded by approval policy, tool policy, blockers, and verification.
  • Honest verification: Mi Code should say when checks passed, failed, were not run, were stale after later writes, or did not cover the whole change.
  • Bounded autonomy: runtime-specific pipelines keep quick chat, multi-step engineering work, and document work separate instead of pretending one universal loop is reliable everywhere.
  • Public-preview humility: local/private model behavior varies, and Profile Check or dogfood evidence is not known-good certification for a backend, model, or profile.

Quick Start

  1. Install the current public-preview build.

    For maintainer builds or pre-Marketplace public-preview builds, install a packaged VSIX:

    code --install-extension mi-code-*.vsix
    

    If a Marketplace listing is actually available for the version you want, open VS Code Extensions, search for "Mi Code", and install it there instead.

    If code is not on your PATH, use VS Code's Extensions: Install from VSIX... command.

  2. Configure the first-run essentials:

    {
      "mi-code.provider": "ollama",
      "mi-code.modelProfile": "auto",
      "mi-code.model": "gemma4:e4b-coder",
      "mi-code.backendUrl": "http://127.0.0.1:11434"
    }
    

    Use Mi Code: Set API Key when your provider needs credentials. The main setup settings are mi-code.provider, mi-code.modelProfile, mi-code.model, mi-code.backendUrl, mi-code.apiKey, and mi-code.userId.

  3. Open a repository in VS Code.

  4. Open the Mi Code sidebar.

  5. Run /doctor, then /check simple, then try one narrow task with focused verification:

    Inspect the failing test, fix the smallest related issue, run the focused check, and summarize changed files, verification, and remaining risk.
    

Advanced tuning such as temperature, top-p/nucleus sampling, embeddings, inline completion, debug logging, or browser executable settings should not be needed to prove basic connectivity. If setup fails, start with /doctor before changing advanced settings.

Public Preview Notes

  • Verification remains the user's responsibility. Mi Code can surface evidence and checks, but it does not prove semantic correctness or safety.
  • Sensitive workspaces require careful provider and API-key choices. Remote providers or remote backendUrl values may receive prompts, code context, and tool results.
  • Local/internal model results are configuration-specific evidence, not known-good certification for a backend, model, or profile.
  • Profile Check is diagnostic-only for the active configuration; it is not a benchmark, leaderboard, release gate, or model certification.
  • Delete Conversation clears the selected conversation record. Mi Code: Reset Workspace Data deletes this workspace's Mi Code data root under ~/.mi-code/workspaces/<workspace-key>.
  • Reset clears persisted conversation records, workspace memory, project profile and repo-map data, host-browser workspace profiles, browser evidence, visual evidence, semantic-search indexes, debug logs, and other Mi Code artifacts under that root.
  • Reset does not delete actual workspace files, API keys, VS Code Secret Storage, global VS Code settings, ~/.mi-code/config.json, other workspace data roots, or generated VSIX/package artifacts outside the current workspace data root.
  • Mi Code intentionally blocks or defers broad hosted automation, automatic login, credential handling, payments, purchases, reservations, email/service automation, live production database work, OCR/layout reconstruction, PDF editing, and broad office automation unless their evidence, approval, verification, and blocker contracts are explicitly designed.

Example Workflows

  • Explain a function or module using current workspace evidence.
  • Fix a failing test and report the verification command output.
  • Refactor a small module while preserving unrelated user changes.
  • Review current changes without claiming commit execution.
  • Create, inspect, summarize, or edit a DOCX document through Document Runtime.
  • Read text-layer evidence from a PDF and report extraction limitations.
  • Inspect spreadsheet structure, formulas, bounded .xlsx edits, CSV/HTML exports, and preview/formula verification with explicit limitations.
  • Inspect a user-approved host browser page with bounded snapshots, high-level actions, and blockers for sensitive flows.

Runtime Modes

Mi Code uses runtime-specific pipelines instead of a single universal agent loop.

General Runtime optimizes for speed. Autonomous Runtime optimizes for multi-step engineering execution. Document Runtime optimizes for structured document creation and editing. Document Runtime is a separate document-specific pipeline, not General Runtime with document tools added.

  • General Runtime is the fast path for lightweight chat, code explanation, narrow edits, reviews, and ordinary repository questions.
  • Autonomous Runtime plans and executes larger engineering tasks with evidence, verification, repair attempts, blockers, and residual-risk reporting.
  • Document Runtime supports DOCX creation/editing, document summaries, table updates, text-based PDF export, PDF evidence reading, and bounded spreadsheet evidence.

Supported Models

Mi Code is local-first by default and supports multiple deployment shapes:

  • Cloud: OpenAI through the built-in OpenAI-compatible adapter.
  • Local: Ollama, LM Studio or other OpenAI-compatible local servers, and vLLM.
  • Enterprise: OpenAI-compatible internal endpoints and AIOps-style internal gateways.

Current provider settings are ollama, openai, vllm, and aiops. Model behavior is selected with mi-code.modelProfile, including auto, llama3, qwen2, qwen3, qwen35, gemma4, gpt-oss, glm52, and generic.

For GLM-5.2 / GLM-5.2-FP8 served through local vLLM, set mi-code.provider to vllm, mi-code.model to the vLLM served model name, and mi-code.modelProfile to glm52. That profile support is a runtime/profile path, not a known-good certification for every GLM local environment. Validate the endpoint with /doctor, then use /check simple or one narrow verified task before broad autonomous work.

Profile Check

Run /check from chat or choose Run Profile Check from the Settings menu. Use /check simple after /doctor when you only need a shorter first-run diagnostic.

Profile Check exercises bounded synthetic mini tasks for direct answers, conversation context, risk/approval classification, planning shape, verification choice, completion-claim discipline, review behavior, tool-call formatting, and sandbox-labeled prompts. Treat the result as diagnostic evidence for the active provider/model/profile/settings combination only.

Architecture Overview

VS Code sidebar and commands
  -> runtime mode router
     -> General Runtime: fast model/tool loop
     -> Autonomous Runtime: planner, workers, verification, blockers
     -> Document Runtime: document orchestrator, structure tools, repair flows
  -> typed runtime events and evidence summaries
  -> final answer with evidence, changes, verification, and risk

Mi Code keeps evidence, tool execution, verification choice, UI observability, and final-answer synthesis in runtime-owned structures instead of relying only on model prose.

Documentation

The VSIX package excludes docs/**, so documentation links below point at the repository and remain usable from packaged README views.

  • Configuration Surface: full setting tiers and setup priority.
  • Local Model Configs: local/OpenAI-compatible setup patterns.
  • Approval Mode Public Default: current prompt default and when to opt in to auto.
  • Evidence Contracts Guide: domain evidence boundaries and unsupported claims.
  • Public Channel Readiness: repo, VSIX, and Marketplace channel boundaries.
  • Public Preview Rehearsal: first-run rehearsal checklist.
  • Product Strategy, Open Items, and Version Line Process: planning detail.
  • Development Guide and Documentation Map: contributor documentation.

Security and Data Handling

  • The default ollama provider sends model requests to your local Ollama server.
  • Remote providers or remote backendUrl values may send prompts, code context, and tool results to external or enterprise APIs.
  • API keys can be stored with Mi Code: Set API Key or supplied through MI_CODE_API_KEY.
  • High-impact tools are governed by approval mode and tool-specific safety policy.
  • Browser, database, spreadsheet, PDF, and external-service capabilities are intentionally bounded by evidence and approval contracts.

Do not include API keys, credentials, private tokens, proprietary source, sensitive browser/session data, private documents, or production service data in public issues. For vulnerabilities, credential exposure, or boundary bypasses, use the private path in Security Policy.

Contributing

Contributions are welcome. Keep changes focused, preserve local/private model support, and describe the verification you ran. See Contributing for pull request guidance.

Useful entry points:

  • Support
  • Security Policy
  • Contributing
  • Changelog

License

Mi Code is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft