Sanctum Code
A sovereign, multi-provider coding agent that runs entirely inside VS Code —
over your own API keys. No backend service, no telemetry, no middleman: your
editor talks straight to the provider you choose, and your keys never leave your
machine.
Describe a task in plain language in a side panel, and Sanctum Code reads your
code, proposes edits behind a diff preview, and runs commands — with you
approving each step, or letting it run on auto.
Install
- Extensions view (
Ctrl+Shift+X) → search Sanctum Code → Install
- or from a terminal:
code --install-extension devjustin.byok-code-agent
Quick start
Ctrl+Shift+P → Sanctum Code: Add API Key — pick a provider and paste
your key. It's stored in your OS keychain. Add more keys for the same
provider to rotate / fail over when one gets rate-limited.
Ctrl+Shift+P → Sanctum Code: Open Panel
- Describe a task. Watch it read, edit (with diffs), and run commands.
Bring any provider
Anthropic (with prompt caching), Groq, NVIDIA NIM, OpenRouter — or any
OpenAI-compatible endpoint via a custom base URL. Point it at a
LiteLLM proxy to reach ~100
providers (Bedrock, Vertex, Azure, DeepSeek, …) through one endpoint, or
straight at Ollama / LM Studio / vLLM for fully local models — no key
required.
Features
- Agentic tool-use loop — streamed responses, visible reasoning, and
parallel tool calls, run until the task is done.
- Safe edits — every write shows a native VS Code diff preview before it's
applied; edits land in the editor and are a single undo away. Work in
manual (confirm each change), auto (apply silently), or plan
(read-only) mode.
- Command approval — shell commands ask first, with a persistent "always
allow
npm / git" so you approve a tool once, not on every run.
- Multi-key failover — pool several keys per provider; Sanctum rides one
until it's rate-limited, then fails over automatically and respects
Retry-After.
- Live model lists & cost readout — the model picker is populated from each
provider, and the stats line shows a per-turn cost estimate and how full the
context window is.
- Make it yours — project instructions, reusable skills, slash commands,
persistent memory, lifecycle hooks, and MCP servers (see below).
- Private by design — keys live in the OS keychain (never in settings or
files), requests go straight to the provider, and there's no telemetry or
backend.
Settings
| Setting |
What it does |
byokAgent.provider |
Which LLM provider to use |
byokAgent.model |
Model identifier sent to the provider |
byokAgent.customBaseUrl |
Base URL for the custom OpenAI-compatible provider |
byokAgent.mode |
manual · auto · plan |
byokAgent.keyStrategy |
sticky-failover · round-robin |
byokAgent.maxIterations |
Cap on agent loop steps per task |
byokAgent.maxTokens |
max_tokens per model call |
Make it yours (optional)
Drop any of these in your workspace to extend the agent — all optional:
| Path |
Purpose |
CLAUDE.md, AGENTS.md |
project instructions the agent always follows |
.agent/skills/*.md |
on-demand instruction packs |
.agent/commands/*.md |
slash-command prompt macros |
.agent/memory/*.md |
facts the agent remembers across sessions |
.agent/hooks.json |
shell commands fired around tool use (e.g. auto-format) |
.agent/mcp.json |
MCP servers to connect |
Privacy
Your API keys are stored with VS Code SecretStorage (DPAPI / Keychain /
libsecret) and are sent only to the provider you configured. Sanctum Code has no
backend and collects no telemetry.
Building from source
Contributor setup, the test suite, and architecture notes live in
DEVELOPMENT.md. Sibling project:
byok-ai-workspace (the
chat workspace).
License
MIT