Coding agent for VS Code and Cursor. Chat from the right Secondary Side Bar (same strip as Claude Code / Codex), edit your workspace with permission controls, and use OpenAI, Anthropic, Gemini, or local OpenAI-compatible models (including Ollama).
Requirements
- VS Code 1.85+ (or Cursor)
- Python 3.11+ on your PATH (or set
clawagents.pythonPath) - clawagents ≥ 6.20.48 (Context Observatory, artifact security, raw tool archival, workspace-scoped turns)
- A provider credential for at least one model provider
Quick start
- Install this extension from the Marketplace (or a
.vsix). - Open a folder / Remote SSH window. On first start the extension auto-installs Python packages into
clawagents.pythonPath:
clawagents[gemini,anthropic,bedrock,mcp,media]>=6.20.8 fastapi uvicorn pydantic python-dotenv
You can also run ClawAgents: Install/Upgrade Python Dependencies from the Command Palette.
-
Add credentials: Command Palette → ClawAgents: Set API Key (OpenAI / Anthropic / Gemini / Bedrock / Tavily), or put keys in a workspace
.env. For browser tools: Settings → Enable browser tools, thenpip install 'clawagents[browser]' && playwright install chromium. -
Open the right Secondary Side Bar and click ClawAgents, or run ClawAgents: Open Chat (
⌘⇧'/Ctrl+Shift+'). -
Start in Plan / ask mode if you want confirmations. Turn on Auto-approve → Edit / Execute only when you trust the agent for that workspace.
Features
- Multi-turn chats with history, regenerate, and live token usage
- Permission modes: ask · read-only · auto · full access
- Opt-in auto-approve for edits, shell, and web
- Checkpoints before writes (diff / restore)
- Skills folders, MCP servers (
.clawagents/mcp.json), optional Context Mode - Local sidecar process (loopback only) with a per-session bearer token
Settings
| Setting | Default | Description |
|---|---|---|
clawagents.pythonRuntime |
managed |
Isolated extension-owned virtualenv; choose custom to use pythonPath directly |
clawagents.pythonPath |
python3 |
Base interpreter for the managed environment, or the exact custom interpreter |
clawagents.model |
(empty) | Model override |
clawagents.provider |
auto |
Preferred provider for credential selection |
clawagents.defaultMode |
auto |
Default permission mode |
clawagents.includeContextByDefault |
false |
Start with Context checked (editor snippets; not shown in history; secrets omitted) |
clawagents.contextMode |
true |
Context Mode tools (context-mode ≥1.0.169) |
clawagents.graphify |
false |
Graphify knowledge-graph MCP (graphifyy[mcp] ≥0.9.20 + workspace graph) |
clawagents.ensureCompanions |
false |
Offer companion installs on sidecar start after confirmation (context-mode, rtk, graphifyy); default is probe-only |
clawagents.syncPathPythons |
false |
Offer (with confirmation) to upgrade other PATH Pythons below the floor; default manages only pythonPath |
clawagents.advanced.enableContextObservatory |
false |
Record context events during agent runs to .clawagents/context-observatory/<chat_id>/; import session.json into the standalone Observatory UI for analysis. |
Sidebar Settings cover provider, model, base URL, skills, MCP, Graphify, browser tools, and telemetry (stored under .clawagents/ in the workspace). Use composer Goal for long-horizon autopilot (start_goal / verifier).
For multi-root workspaces, run ClawAgents: Select Workspace Root. Switching roots restarts the sidecar and opens a fresh chat so paths, .env, history, and trust approvals stay scoped to one folder.
Companions (lockstep with clawagents ≥6.20.32)
| Companion | Floor | Auto-ensure | Manual |
|---|---|---|---|
| Context Mode | 1.0.169 | npm install -g context-mode@latest |
Node ≥ 22.5 |
| RTK | 0.43.0 | brew install rtk / brew upgrade rtk |
PATH rtk |
| Graphify | 0.9.20 (graphifyy) |
pip install 'graphifyy[mcp]' into sidecar Python |
Extract via ClawAgents: Graphify — Extract Workspace |
| Caveman | vendored skill | composer toggle | JuliusBrussee/caveman |
Command Palette → ClawAgents: Ensure Companions forces a re-probe/upgrade.
Security
- Sidecar binds to loopback only; every HTTP endpoint requires a session bearer token
- Provider credentials stay in VS Code SecretStorage or your workspace env file — not written to disk by the extension
- Workspace
.envonly forwards API key / model vars (noPYTHONPATH/ base-URL redirection) - File restore, snapshots, and chat IDs are confined under the workspace /
.clawagents/ - Mutating tools are gated by mode + Auto-approve toggles (defaults: off)
- MCP is off by default; workspace
mcp.jsonrequires an explicit trust toggle; only allowlisted launchers (npx,uvx, …) and loopback URLs full_accessmode requires Settings → Allow Full Access; stale permission IDs cannot create wildcard grants
Troubleshooting
- Sidecar health check timed out — open ClawAgents Sidecar output. Usually missing pip packages or a bad
clawagents.pythonPath. - provider_auth — invalid credential. Precedence: SecretStorage → workspace
.env→ shell. Path-like values (python.exe) are ignored/purged so a real key elsewhere can win. - Gemini — set the Gemini/Google provider credential;
pip install 'clawagents[gemini]'. - MCP — enable MCP in Settings, optionally trust workspace config, and check
~/.clawagents/mcp.json. - Restart — Command Palette → ClawAgents: Restart Sidecar.
Optional tools
- Companions above (optional; enable
clawagents.ensureCompanionsor run Ensure Companions) - Browser tools: Playwright Chromium via clawagents browser extras
Source & development
- Source: github.com/x1jiang/clawagents-vscode
- Runtime: github.com/x1jiang/clawagents_py
npm run install:all
npm run build
# F5 → Run ClawAgents Extension
npm run package