Skip to content

What is Polyglot?

Polyglot is a coding-agent CLI - you talk to it in a terminal, it reads and writes files, runs commands, and searches the web to get work done. What makes it different is that it works the same way regardless of which model is answering: Claude, GPT, or an open-weight model like Qwen, DeepSeek, GLM, or Llama running locally via Ollama, vLLM, LM Studio, or any other OpenAI-compatible server.

Most agent CLIs lean on a provider’s native function-calling API and assume the model produces near-perfect JSON against its exact tool-call schema. Open-weight models frequently don’t - malformed arguments, missing fields, trailing commas, single quotes, near-miss tool names, or defaulting to OpenAI-style {"name": ..., "arguments": ...} when they were taught a different format. When that happens, the whole agent loop stalls.

Tools are described to the model in the system prompt, and a fault-tolerant streaming parser extracts and repairs the tool call from whatever text comes back. The same parser and executor run underneath every provider, so behavior doesn’t silently diverge between “well-behaved” and “flaky” models. A model that isn’t reliably producing valid calls is detected and the turn is stopped, rather than looping on garbage.

For local servers that support grammar-constrained decoding, there’s an optional structured-output mode that makes malformed syntax impossible in the first place.

  • Any provider, same behavior - Anthropic, or any OpenAI-compatible endpoint.
  • Permission modes - manual asks before every write or command, auto runs freely with allow/deny rules, plan explores read-only until you approve what it’s about to do.
  • MCP servers - connect any MCP server over stdio; its tools go through the same text-parsed grammar as the built-ins.
  • Multi-agent - the task tool delegates to a fresh sub-agent with its own tools and context.
  • Web search - built in, no API key needed by default.
  • Scriptable - a non-interactive -p mode for pipes and CI.
  • A full TUI - streaming responses, inline tool-call cards, inline approval prompts, Shift+Tab to cycle permission mode mid-session.