Skip to content
sayedmahmodPublic

About

One VS Code chat panel for all your coding agents: Claude Code, Codex, MiniMax and any OpenAI/Anthropic-compatible API.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

PolyMoly logo

PolyMoly

One chat panel for all your coding agents. Claude Code, Codex, MiniMax and any OpenAI- or Anthropic-compatible API, side by side in VS Code. Switch models mid-conversation, keep one skill library for every agent, and see what every account costs in one place.

VS Code Marketplace Release License: MIT TypeScript Languages

claude-code · codex · minimax · mcp · agent-skills · multi-provider · llm · vscode-extension


PolyMoly chat: a finished agent turn, the empty state and the model menu

Contents

Why PolyMoly

Every coding agent ships its own UI, its own history and its own limits. When one runs out of quota in the middle of a task, you start over somewhere else. PolyMoly puts them behind one interface:

  • One chat, many agents. The local claude and codex CLIs and any HTTP API share the same transcript, tool timeline and composer.
  • Hand-off instead of dead ends. When a provider hits its limit, PolyMoly proposes an equivalent model at another provider and passes the conversation over.
  • Shared MCP servers and skills. Configure them once, every agent gets them.
  • One view for spend. Tokens, cost and subscription windows of every account on a single page.

Installation

Option A: install from the Marketplace (recommended)

Search PolyMoly in the VS Code Extensions view (⇧⌘X / Ctrl+Shift+X) and click Install, or install directly:

Option B: download the release

  1. Download polymoly-<version>.vsix from the latest release.
  2. Install it in one of two ways:
    • In VS Code: open the Extensions view (⇧⌘X / Ctrl+Shift+X), click the ··· menu in its title bar, choose Install from VSIX… and pick the file.
    • From a terminal:
      code --install-extension polymoly-0.1.0.vsix
  3. Run Developer: Reload Window. The PolyMoly icon appears in the activity bar.

The same .vsix works in Cursor, Windsurf and VSCodium (cursor --install-extension …, and so on).

Option C: build from source

Requires Node.js 20 or newer.

git clone https://github.com/sayedmahmod/polymoly.git
cd polymoly
npm install
npx @vscode/vsce package -o polymoly.vsix
code --install-extension polymoly.vsix

Agent CLIs (optional)

PolyMoly drives the agents you already have. Install the ones you want and log in once in a terminal:

Agent Install Log in
Claude Code npm i -g @anthropic-ai/claude-code claude
Codex npm i -g @openai/codex codex login

Claude Code and Codex are the two providers that are on out of the box. Every other provider is an API connector that ships switched off and only needs an API key (see below). No CLI needed.

First steps

  1. Open PolyMoly in the activity bar.
  2. Click the model chip in the composer and pick a model.
  3. For HTTP providers, add a key: action menu (/) → Providers & models → expand the provider → API key → Save. Keys are stored in VS Code's SecretStorage, never in settings.json.
  4. Type your task and press Enter. Shift+Enter inserts a new line.

Features

Chat, plan and ask

Three modes sit in the composer bar and decide how a message is treated.

Chat works as before: ask, change, run. When a message reads like a project rather than a question, PolyMoly offers to plan it first and switches by itself after 30 seconds unless you say otherwise.

Plan writes a plan instead of code. The provider runs read-only (--permission-mode plan for Claude, --sandbox read-only for Codex), reads the repository, and answers with a plan that is cut into atomic tasks: everything that can run in parallel does, and only what truly depends on another task is sequential. Each task carries its own goal, boundaries, files, context and acceptance checks, and is rated low, mid or hard. A weak model is a weak plan, so PolyMoly says so before planning and lets you switch to a top model at high effort first.

The plan is written to .polymoly/plans/<date>-<title>.md and appears as a preview card in the transcript. View full plan opens it in the editor area: a wave graph on top (columns are waves, everything in a column runs at the same time, arrows are dependencies), the plan document below, and one model dropdown per tier. Pick which of your models runs the hard, mid and low tasks, then run the whole plan, a Cmd-clicked selection, or a single task. The markdown file is the source of truth: edit it, hit Reload, and the next run uses your version.

Each task node also has View chat. It opens a task-local inspector beside the plan with the live thinking stream (when the provider exposes it), tool calls and results, notices, errors and final output. Follow-up messages stay attached to that task; CLI providers resume the task session when they support it.

Local repository map

PolyMoly indexes the workspace locally into a compact map of paths, top-level signatures and relative imports. For each prompt it ranks that map against the request and sends only the result within a fixed budget—never the complete repository. The index is invalidated when workspace files change. This gives a model orientation cheaply while its file tools can still read the exact source on demand.

Ask only reads and answers. If you ask for a change instead, PolyMoly offers to move the message to chat or plan mode.

Transcript with tool timeline

Thinking, every tool call (with input and output) and the final answer appear as one timeline. Click a tool call to expand its full output. Each answer shows its token usage and cost; bars under the composer show the current session and weekly limits.

Switch models mid-chat

Change the model at any time. A CLI agent that missed part of the conversation receives a compact transcript before the next prompt: tool calls are summarised, long outputs trimmed, and the oldest messages dropped if the transcript would take more than half of the target's context window. Each chat remembers the session ID per provider, so follow-up turns resume with claude --resume or codex exec resume instead of starting over.

Hand-off when a provider runs dry

Hand-off card after a quota hit

When a provider reports an exhausted limit (usage limit, rate limit, quota, empty balance), PolyMoly shows a card that proposes a model of the same class at another provider, with the same effort level.

The card is transparent about the cost of switching: approximate hand-off size in tokens, the target's context window, and the fact that the new provider starts with a cold cache. Yes, continue switches and lets the new model finish the interrupted task.

Providers without a key, or that are out of quota themselves, are never proposed. Model classes come from tier (fast, balanced, flagship, frontier); set a fixed order with polyagent.fallbackOrder.


Attachments

Drag files into the chat (hold Shift while dropping, a VS Code rule for webviews), paste screenshots with ⌘V, or use +. Each file chip tells you how the current model will receive it:

  • normal: the model reads the file directly
  • yellow: the agent only gets the path and opens the file itself
  • red: the model cannot take this file, so it is not sent

Action menu

Action menu

Press / in an empty composer, or click the / button. From here you attach or mention files, clear or rewind the conversation, switch model, set effort and thinking, toggle tool calls, and open MCP servers, skills, provider settings, usage and the provider status check.

Installed skills appear at the bottom; picking one inserts /skill-name into the composer.


MCP servers

Add stdio, HTTP or SSE servers once under Settings → MCP servers. Claude Code receives them via --mcp-config, Codex via -c mcp_servers.*.

Skills

Skills in the SKILL.md format live in one shared folder (~/.polyagent/skills by default) and work with every provider. Install from:

  • a GitHub link to a repo or subfolder, for example https://github.com/anthropics/skills/tree/main/skills/pdf
  • any Git URL, or a URL to a SKILL.md or ZIP archive
  • a local folder, SKILL.md, .zip or .skill file

Skills already in ~/.claude/skills, ~/.codex/skills or ~/.agents/skills can be imported with one click. Claude Code and Codex get the list of active skills and read one when it fits. Starting a message with /name loads the whole skill into the prompt, for any provider.

Settings in the panel

Providers & models settings   General settings with the language picker

Turn providers and single models on and off, test connections, fetch the model list of an API, add custom providers and set keys, all without editing JSON.

Languages

The whole interface is available in German, English, Spanish, French, Arabic (right-to-left) and Simplified Chinese. Pick one under Settings → General → Language, or set polyagent.language. auto follows the VS Code display language. Command titles and setting descriptions follow the VS Code display language.

The same conversation in all six languages

Providers

ID Type Connection
claude CLI claude -p --output-format stream-json
codex CLI codex exec --json
zai CLI claude CLI pointed at https://api.z.ai/api/anthropic with your Z.ai key

claude and codex are enabled by default. Everything below is off until you switch it on.

API connectors

Each of these is a ready-made template: switch the provider on, paste an API key, then press Fetch models to read the live model list from the endpoint. The seeded models are only a starting point.

ID Base URL API
zai-api https://api.z.ai/api/anthropic/v1 Anthropic Messages
zai-coding https://api.z.ai/api/coding/paas/v4 OpenAI
openai-api https://api.openai.com/v1 OpenAI
anthropic-api https://api.anthropic.com/v1 Anthropic Messages
minimax https://api.minimax.io/v1 OpenAI
openrouter https://openrouter.ai/api/v1 OpenAI
deepseek https://api.deepseek.com/v1 OpenAI
moonshot https://api.moonshot.ai/v1 OpenAI
moonshot-anthropic https://api.moonshot.ai/anthropic/v1 Anthropic Messages
xai https://api.x.ai/v1 OpenAI
mistral https://api.mistral.ai/v1 OpenAI
gemini https://generativelanguage.googleapis.com/v1beta/openai OpenAI
qwen https://dashscope-intl.aliyuncs.com/compatible-mode/v1 OpenAI
perplexity https://api.perplexity.ai OpenAI
groq https://api.groq.com/openai/v1 OpenAI
cerebras https://api.cerebras.ai/v1 OpenAI
together https://api.together.xyz/v1 OpenAI
fireworks https://api.fireworks.ai/inference/v1 OpenAI
deepinfra https://api.deepinfra.com/v1/openai OpenAI
nebius https://api.tokenfactory.nebius.com/v1 OpenAI
novita https://api.novita.ai/openai/v1 OpenAI
siliconflow https://api.siliconflow.com/v1 OpenAI
github-models https://models.github.ai/inference OpenAI
vercel-gateway https://ai-gateway.vercel.sh/v1 OpenAI
ollama http://localhost:11434/v1 OpenAI
lmstudio http://localhost:1234/v1 OpenAI

qwen points at the international DashScope region; mainland China is https://dashscope.aliyuncs.com/compatible-mode/v1. ollama and lmstudio talk to a local server and ignore the key, so any placeholder does.

Custom providers

Add providers in the settings panel, or in settings.json under polyagent.providers. An entry with an existing id overrides the built-in one field by field; any other id creates a new provider.

"polyagent.providers": [
  {
    "id": "groq",
    "label": "Groq",
    "kind": "http",
    "api": "openai",
    "baseUrl": "https://api.groq.com/openai/v1",
    "defaultModel": "llama-3.3-70b-versatile",
    "models": [
      { "id": "llama-3.3-70b-versatile", "label": "Llama 3.3 70B",
        "pricing": { "input": 0.59, "output": 0.79 } }
    ],
    "usage": { "kind": "none" }
  },
  {
    "id": "my-agent",
    "label": "My agent",
    "kind": "cli",
    "command": "/usr/local/bin/my-agent",
    "protocol": "claude-stream-json",
    "extraArgs": ["--no-color"]
  }
]
Kind Fields
cli command, protocol (claude-stream-json or codex-jsonl), extraArgs, env
http baseUrl, api (openai or anthropic), headers, maxTokens, systemPrompt
both models, defaultModel, supportsEffort, supportsThinking, usage

Per model: label, description, tier, efforts, defaultEffort, contextWindow, inputs (e.g. ["image", "pdf"]) and pricing (USD per million tokens).

Z.ai GLM (Coding Plan)

Three built-in providers use the GLM Coding Plan. All need a Coding Plan API key from z.ai/manage-apikey, saved in the provider's settings card.

  • zai runs the claude CLI with ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic and the key as ANTHROPIC_AUTH_TOKEN, as described in the Z.ai docs. Your normal Claude login is not touched. This is the agentic path: the CLI runs tools and edits files.
  • zai-api and zai-coding call the Coding Plan directly over HTTP, without a CLI. PolyMoly gives them local agent tools (see below), so GLM can read and edit files and run commands too.

Agent mode for API providers

HTTP providers have no agent runtime of their own, so PolyMoly runs one for them: the model gets run_command, read_file, write_file, edit_file, list_dir, glob and grep as function calls, executed locally in the workspace, with the same tool timeline in the transcript as the CLI agents. Three permission levels control what the model may do; the default comes from polyagent.http.permissionMode, the composer chip overrides it per chat.

Level What the model may do
readonly Read, list and search only — no writes, no shell
write Edit and create files freely; every shell command asks first
auto Everything without asking

A turn is bounded no matter how chatty the model gets: after 24 tool rounds the tools are withdrawn and the model must deliver a final answer, every command has a hard timeout (60 s default, 10 min maximum), and tool output is capped. In write mode the confirmation dialog has Always in this chat, so a trusted command kind asks only once. Plan and ask mode force readonly, matching the CLI providers.

Accounts & usage

Accounts & usage view

Open it with PolyMoly: Accounts & usage or from the action menu. Each provider card queries that provider's own usage API with an admin key, set via PolyMoly: Set usage admin key for provider.

Source Endpoint
anthropic-admin /v1/organizations/usage_report/messages and /cost_report (admin key)
openai-admin /v1/organization/usage/completions and /v1/organization/costs (admin key)
minimax-token-plan /v1/token_plan/remains (Token Plan key sk-cp-…)
custom-http any request, mapped into the report with dot paths
"usage": {
  "kind": "custom-http",
  "url": "https://api.example.com/v1/usage?from={{start}}&to={{end}}",
  "headers": { "authorization": "Bearer {{key}}" },
  "map": {
    "inputTokens": "data.total.input_tokens",
    "outputTokens": "data.total.output_tokens",
    "costUsd": "data.total.cost_usd",
    "balanceUsd": "data.balance"
  }
}

Placeholders: {{start}}, {{end}} (ISO 8601), {{startUnix}}, {{endUnix}} and {{key}}.

Note

Billing APIs only report API traffic. Usage through a Claude or ChatGPT subscription does not show up there. For Claude Code, PolyMoly also records the rate_limit_event messages of the CLI and shows the 5-hour and 7-day windows from the last chat turn.

Settings

Key Default Effect
polyagent.language auto UI language: auto, de, en, es, fr, ar, zh
polyagent.defaultProvider claude Provider preselected in new chats
polyagent.providers [] Custom providers and overrides
polyagent.mcpServers {} MCP servers shared by all CLI providers
polyagent.skills.directory "" Skills folder, empty means ~/.polyagent/skills
polyagent.skills.disabled [] Skills that are switched off
polyagent.fallbackOrder [] Hand-off targets, provider or provider/model
polyagent.claude.permissionMode acceptEdits --permission-mode of the Claude CLI
polyagent.codex.sandbox workspace-write --sandbox of codex exec
polyagent.http.permissionMode write Local agent tools of API providers: readonly, write, auto
polyagent.plan.maxParallelTasks 4 Independent plan tasks allowed to run simultaneously (1–8)
polyagent.context.tokenBudget 1400 Upper limit for the query-ranked local repository map (400–8000)
polyagent.usage.days 30 Days queried by the usage view
polyagent.usage.autoRefreshMinutes 0 Auto-refresh of the usage view, 0 is off

Important

acceptEdits lets the Claude CLI edit files in your workspace without asking, because nobody can confirm prompts in headless mode. Use plan for read-and-plan only. bypassPermissions also runs shell commands without asking, so only use it in a sandbox.

Development

npm install
npm run watch        # rebuilds dist/ on change

Press F5 in VS Code to start an Extension Development Host with PolyMoly loaded.

src/extension.ts            activation, commands, key management
src/i18n.ts                 all UI strings in six languages
src/providers/              registry, CLI adapter, HTTP adapter
src/chat/                   conversation store, turn controller, hand-off planning
src/skills/skills.ts        skill store, installation, delivery to providers
src/usage/                  usage reports and live limits per provider
src/views/                  chat view and usage panel (webviews)
media/                      webview UI: chat.css/js, usage.css/js, logo

Every adapter emits the same event stream (text_delta, thinking_delta, tool_start, tool_end, usage, rate_limit, error, done), so a new provider only has to produce that stream; the UI stays unchanged.

Adding a language

Add a column to the rows in src/i18n.ts, add the code to LANGS, LOCALES and LANGUAGE_NAMES, and create a package.nls.<code>.json for command and setting titles.

License

MIT

PolyMoly is an independent project and is not affiliated with Anthropic, OpenAI or MiniMax. Product names belong to their owners.

About

One VS Code chat panel for all your coding agents: Claude Code, Codex, MiniMax and any OpenAI/Anthropic-compatible API.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages