AI Code Assistance — General Coding + Data + Data Science + AI EngineeringA Vibe Coding assistant for VS Code and Cursor that goes far beyond simple chat. AI Code Assistance turns your editor into a specialist across four full areas:
Powered by a local backend (a small FastAPI router you run on your machine) that talks directly to the model provider of your choice — bring your own keys for OpenRouter, OpenAI, Groq, Gemini, xAI or Ollama Cloud, or run fully local with Ollama, LM Studio or vLLM. No Colab, no tunnel, no third-party server in the middle. The assistant responds in whatever language you write in — English, Portuguese, Italian, Spanish, French, or any other. Just type naturally.
Architecture
Each task routes to one of six roles — Multi-agent orchestrationA simple request runs on a single agent. A request that spans several fronts is decomposed into a plan, and each step goes to the specialist it needs. Steps with no dependencies run at the same time.
That plan is not an illustration — it is what the orchestrator returns for that request. Two things it does on purpose:
You can watch this run, step by step, at ai-code-assistance.netlify.app#agentes. What you can do — the four areas🧑💻 General coding (works everywhere)
📊 Data analytics —
|
| Slash | What it does |
|---|---|
/explore |
Inventory a dataset, profile every column, surface quality blockers (nulls, duplicates, outliers), recommend feasible analyses |
/question |
Turn a vague business problem into 5-10 testable analytical questions ranked by Impact × Feasibility, with hypotheses for the top 3 |
/chart |
Generate Storytelling-with-Data styled charts — action titles, max 2 colors + gray, direct labels, no clutter |
/drill |
Root cause investigation with "peel the onion" methodology: confirm → decompose → isolate → repeat — until you find the specific actionable cause |
/report |
Consolidate the full analysis into a business-ready final_report.md + executable_analysis.ipynb |
🔬 Data Science (ML) — /engineer, /eda, /model, /explain
| Slash | What it does |
|---|---|
/engineer |
Data cleaning, missing values, outlier detection (IQR / Z-score), duplicates, feature engineering driven by business value |
/eda |
Exploratory analysis — descriptive stats, distributions, correlations (Pearson/Spearman), pattern discovery, hypothesis formulation |
/model |
Model selection (linear / trees / boosting / NN), train/val/test splits, hyperparameter tuning, evaluation metrics matched to the business goal |
/explain |
Multi-method feature importance: built-in + permutation + SHAP + LIME + Partial Dependence + interactions + stability checks |
🤖 AI Engineering — /rag, /prompt, /finetune, /eval, /agent
| Slash | What it does |
|---|---|
/rag |
Production RAG pipelines: chunking strategies, embedding selection, hybrid retrieval (semantic + BM25), reranking, prompt template, evaluation with Ragas |
/prompt |
Production prompt engineering — Chain-of-Thought, few-shot, structured outputs (JSON/XML), function calling schemas, anti-jailbreak, robustness testing |
/finetune |
LoRA / QLoRA fine-tuning end-to-end: dataset prep, Unsloth/transformers setup, hyperparams, eval against base, deployment as merged model or adapter, GGUF quantization |
/eval |
LLM evaluation systems: reference-based + rubric-based + reference-free, LLM-as-judge done right, Ragas / DeepEval / PromptFoo / LangSmith, CI integration |
/agent |
Agent architecture — tool catalog design, ReAct / plan-and-execute / reflexion, memory tiers, error handling, framework picking (LangGraph / LlamaIndex / AutoGen / CrewAI / Smolagents) |
🧭 Craft — /karpathy, /workflow
| Slash | What it does |
|---|---|
/karpathy |
Andrej Karpathy's four code-quality principles: think before coding, simplicity first, surgical changes, goal-driven execution |
/workflow |
Orchestrate several specialized agents in parallel for a complex task — each doing what it does best |
Type /skills or /help in the chat to list all 16 with descriptions.
The 16 tools
| Tool | What it does | Approval |
|---|---|---|
read_file |
Read a file from disk | read-only |
glob |
List files by glob pattern | read-only |
grep |
Regex search inside files | read-only |
write_file |
Create or overwrite a file | asks |
edit_file |
Replace an exact string — surgical edits, with LSP diagnostics returned after the change | asks |
edit_notebook |
Edit or append a cell in a Jupyter .ipynb |
asks |
bash |
Run a shell command (tests, git, npm, pip…) — optionally inside the container sandbox | asks |
web_search |
Search the web (DuckDuckGo) | read-only |
web_fetch |
Fetch a URL and convert it to text | read-only |
todo_write |
Keep a visible plan for tasks with 3+ steps | — |
memory_write / memory_read |
Persist and recall context across sessions | — |
inspect_data |
Profile a csv/tsv/parquet/xlsx/jsonl without pulling it into the conversation: shape, dtypes, nulls, cardinalities, statistics, a sample — and it flags identifier columns, constant columns and text that only looks like a date | read-only |
run_notebook |
Execute an .ipynb end to end and return the output cell by cell, including the traceback of the one that failed |
asks |
mlflow_query |
Read experiments, runs and metrics from MLflow so the agent can confirm what it logged instead of claiming it | read-only |
delegate |
Hand a sub-task to another role and return its result | — |
Observability (optional)
Point the backend at an MLflow server and every turn becomes a trace: the role that ran, why it was routed there, time to first token, tokens per second, token usage, the tool calls, and 👍/👎 feedback. Secrets are redacted before anything is written. It is entirely optional — without MLflow the assistant works the same.
Choose which model runs each task
AI Code Assistance routes every request to one of six roles — planner, coder, vision, general, agentic, datascience — and you decide which model each role uses. Three interchangeable ways, all sharing one config file and hot-reloaded with no restart:
- ⚙️ Configure Models panel (
AI Code Assistance: Configure Models) — a model dropdown per task, a token field per provider (saved to your local.env, never shared), and base-URL fields for Ollama / LM Studio / vLLM. - Chat commands —
/modelsto see assignments,/model coder openrouter qwen/qwen-2.5-coder-32b-instructto pin one,/model now <provider> <model>to force a model for the current chat. - Edit
ai-code-assistance.models.jsonby hand. It holds only model names (no secrets), so you can commit and share it; teammates add their own keys.
Ten providers are accepted, and roles can mix freely: openrouter, openai, groq, gemini, xai, ollama_cloud, ollama, lmstudio, vllm, docker.
Requirements
- VS Code 1.85+ or Cursor.
- Python 3.10+ to run the backend.
- At least one provider key, or a local engine (Ollama / LM Studio / vLLM) for zero cost.
- Access to the backend repository. It is private today. The extension is a client — without the backend it installs and opens, but it cannot answer. If you do not have access, ask for it before installing.
- Docker only if you want the container sandbox for
bash.
Quick start
Install — search AI Code Assistance in the Extensions panel (
Ctrl+Shift+X), or install the.vsix(Cursor does not read the Microsoft Marketplace).Run the backend locally (from the project repo):
cp .env.example .env # set AI_TOKEN + at least one provider key uvicorn backend.main:app --host 127.0.0.1 --port 8123Connect the two — Command Palette (
Ctrl+Shift+P) →AI Code Assistance: Quick Setup, which asks for the URL and the token. By hand, in Settings (Ctrl+,) → search AI Code Assistance:aiCodeAssistance.backendUrl→http://127.0.0.1:8123(must match the port uvicorn printed)aiCodeAssistance.token→ theAI_TOKENfrom your.env
Click the AI Code Assistance icon in the Activity Bar (left rail) — the chat opens in the sidebar. Confirm with Command Palette →
Check Backend Health.Type
/skillsto see everything you can do, and click the ⚙️ to pick your models.
Settings
| Setting | Default | Purpose |
|---|---|---|
aiCodeAssistance.backendUrl |
"" |
Backend URL — e.g. http://127.0.0.1:8123. Falls back to http://localhost:8001 when empty |
aiCodeAssistance.tunnelUrl |
"" |
Optional public URL (tunnel) used when the local backend is unreachable |
aiCodeAssistance.token |
"" |
Bearer token (AI_TOKEN), sent on every request (machine-scoped, not synced) |
aiCodeAssistance.toolsEnabled |
true |
Allow the model to call tools (file I/O, bash, web, MCP) |
aiCodeAssistance.permissionMode |
ask |
Tool-call approval mode: ask / auto-edit / auto / plan |
aiCodeAssistance.pathScope |
prompt |
What to do when a tool reaches outside the open folders: prompt / allow / deny |
aiCodeAssistance.hooks |
{} |
Your own commands to run before/after tool calls (PreToolUse / PostToolUse) |
aiCodeAssistance.lspFeedback |
true |
Return the language server's diagnostics to the model after an edit |
aiCodeAssistance.qualityGate |
true |
At the end of a turn that touched files, run the project's own checkers (ruff, tsc, and the tests that cover the touched files) and refuse to let the assistant claim it is done over red — it gets the failure and fixes it in the same turn. Only runs what the project already configures, and only the tests it finds by convention (test_x.py, x.test.ts) — never the whole suite. Prefers the project's own executables (.venv/bin/ruff, node_modules/.bin/tsc) and probes each one first: with the sandbox on, the container holds the project and nothing else, so a checker that cannot start is reported as "could not verify" rather than failing your work |
aiCodeAssistance.contextTokens |
128000 |
Token budget before the conversation is compacted |
aiCodeAssistance.shell |
auto |
Which shell runs commands: auto | bash | pwsh | powershell | cmd. On Windows auto picks PowerShell, never bash (which there is the WSL launcher) |
aiCodeAssistance.prices |
{} |
Price per million tokens per provider/model, e.g. {"ollama_cloud/glm-5.2": {"in": 0.6, "out": 2.2}}. Without an entry the meter shows measured tokens and no money |
aiCodeAssistance.healthPollSeconds |
10 |
How often to poll /health for the status bar indicator |
aiCodeAssistance.sandbox.enabled |
false |
Run bash inside a container instead of on the host |
aiCodeAssistance.sandbox.image |
ai-code-assistance-sandbox:latest |
Image used for the sandbox |
aiCodeAssistance.sandbox.allowNetwork |
false |
Give the sandbox network access |
aiCodeAssistance.sandbox.memory |
4g |
Sandbox memory limit |
aiCodeAssistance.sandbox.cpus |
2 |
Sandbox CPU limit |
MCP Servers
Create a .mcp.json file at your workspace root to connect external MCP servers:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "@my-org/mcp-server"],
"env": { "API_KEY": "your-key-here" }
},
"http-server": {
"url": "http://localhost:3000/mcp",
"headers": { "Authorization": "Bearer TOKEN" }
}
}
}
The ⚙️ Configure Models panel shows active MCP servers and has an "Edit .mcp.json" button.
Keybindings
| Action | Shortcut |
|---|---|
| Focus AI Code Assistance chat (sidebar) | Ctrl+Shift+M (Cmd+Shift+M) |
| Explain selection | Ctrl+Alt+E |
| Refactor selection | Ctrl+Alt+R |
Privacy & security
- Tools require explicit per-session approval. "Always" decisions live in RAM and reset when VS Code closes.
- The token is machine-scoped — it does not sync across devices via Settings Sync.
- The backend runs on your own machine and calls your own provider account with your own keys. No third-party server in the middle. Provider keys live in your local
.env(gitignored) — never in the shareable model config. - File system access and shell execution happen only on your machine — the backend just forwards the model's intent. With the sandbox enabled,
bashadditionally sees only your project, with no network. - Traces sent to MLflow are redacted for secrets, and MLflow is optional.
Why this stack?
- Your models, your bill. Mix cloud (OpenRouter / OpenAI / Groq / Gemini / xAI / Ollama Cloud) and local (Ollama / LM Studio / vLLM) per task.
- Right model per task. A cheap fast model for general chat, a strong coder for code, a data specialist for datasets, a vision model for screenshots — configured independently.
- Shareable, secret-free config. The model config file carries model choices; teammates plug in their own keys.
- Editor stays local. All file I/O and shell execution happen on your machine, behind a permission prompt.
- Multilingual. The assistant responds in the language you write in, automatically.
Limitations
- You run the backend yourself (a single
uvicorncommand) and supply at least one provider key, or a local engine. The extension does not include hosted inference. - The backend repository is private today — see Requirements.
- The AI Engineering skills are prompts, not pipelines: they tell you what to write and why. The agent can then run what it wrote —
bashexecutes it andrun_notebookexecutes notebooks — but no skill trains a model or builds an index on its own. - Nothing on the machine executes notebooks unless you install a runner (
papermill,nbclientornbconvert);run_notebookreports honestly when none is present.
Issues & contributing
Bug reports, feature requests and PRs: github.com/mendesalex89/AI_Assistance (private while the project is in development — ask for access).
License
MIT — see LICENSE.