Skip to main content

Kolega Code

Multi-agent coding in the terminal.

PyPI version Python versions License: Apache-2.0 CI Coverage Docs Changelog

Kolega Code is a local-first terminal coding agent built for work that is too wide for one loop: fan out specialized sub-agents with Gigacode, route different models to different jobs, search the web, drive a browser, and keep sessions, settings, permissions, and credentials on your machine.

Kolega Code in action

Built for work one agent cannot cover

Most terminal agents are strongest when one model can reason through one task at a time. Kolega Code keeps that familiar workflow, then adds orchestration for broad work: large audits, sweeping migrations, cross-file checks, adversarial reviews, and implementation plans whose pieces can run independently.

With Gigacode, Kolega Code can:

  • Fan out many sub-agents at once. Split a wide codebase review by package, assign independent implementation tasks, or run checks across many directories in parallel.
  • Use real workflow shapes. The agent can generate parallel phases, pipelines, loops, judge panels, and synthesis steps instead of only delegating one task at a time.
  • Keep orchestration visible. Workflow phase headers and progress lines appear in the transcript; the sub-agent inspector shows each agent's live trajectory.
  • Save inspectable artifacts. Each run keeps the generated workflow script, result files, a Markdown transcript, raw JSONL, a resume journal, and debug sub-agent transcripts under Kolega Code's state directory.
  • Run in either mode. In Plan mode, workflow sub-agents stay read-only for parallel investigation. In Build mode, they can use the full coding toolset.
  • Resume interrupted runs. Finished workflow steps are journaled so a deliberate resume does not have to restart the whole fan-out.

Use normal chat for focused changes. Turn on Gigacode when the problem is broad enough that one serial agent pass would be the bottleneck.

Features

  • Gigacode orchestration: parallel, pipelined, looped, judged, and synthesized multi-agent workflows with saved artifacts and resume support.
  • Specialized sub-agents: planning, building/coder, investigation, general, and browser agents, with live activity tracking in the TUI.
  • Repo tools: read and search code, create files, apply precise edits, and inspect session changes/diffs.
  • Terminal execution: run shell commands with streamed output and project-level permission controls.
  • Plan/build workflow: use read-only Plan mode for investigation and a reviewable task list, then Build mode to implement.
  • Web search and browsing: DuckDuckGo works by default with no key; Firecrawl, Tavily, and SearXNG are configurable search backends. Kolega Code can also fetch URLs directly and use a Playwright-powered browser agent for interactive sites.
  • MCP servers: connect verified streamable_http, sse, and stdio MCP servers (including OAuth-enabled HTTP servers) as permission-gated tools.
  • Model routing: choose provider/model combinations, set thinking effort, split long-context/fast/thinking roles, and override models per agent role.
  • Interactive or scriptable: use the Textual TUI, queue follow-up prompts while the agent is working, run kolega-code ask, request JSON output, list/export/resume sessions, and diagnose setup with doctor.
  • Extensibility: add agent skills, override prompts with project templates, run lifecycle hooks, and persist project permission rules.
  • Local-first state: sessions, settings, permissions, OAuth tokens, and API-key settings stay on your machine with restrictive permissions where applicable.

Quick start

1. Install with the script:

curl -fsSL https://kolega.dev/install-kolega-code.sh | sh

Or with uv (or pip):

uv tool install kolega-code
# or: pip install kolega-code

Verify the install:

kolega-code --version

2. Start a session in your project:

kolega-code .

3. Connect a model. Complete the first-run wizard with ChatGPT sign-in or an API key. Later, open the categorized Settings screen from the sidebar or with /settings. Use Shift+Tab to switch between Plan and Build mode, or run /gigacode on when a task is broad enough for fan-out.

Resume a previous conversation:

kolega-code . --resume            # latest session
kolega-code . --resume <id>       # a specific Resume ID from `sessions list`

Two ways to use it

Mode Command Best for
Interactive TUI kolega-code . Day-to-day development, exploration, orchestration
One-shot kolega-code ask "…" Scripting, automation, quick questions, CI

There are also helper commands for managing sessions and checking your setup:

kolega-code ask "summarize this repository" --project .
kolega-code sessions list --project .
kolega-code doctor --project .

Supported providers

Kolega Code supports a broad model-provider catalog and lets you route models by role instead of forcing one model to do every job.

Supported model providers:

  • Anthropic
  • OpenAI API
  • OpenAI via ChatGPT subscription sign-in
  • Google
  • Groq
  • Together.ai
  • Fireworks.ai
  • xAI / Grok
  • DashScope / Qwen
  • Moonshot / Kimi
  • DeepSeek
  • Z.AI / GLM Coding Plan
  • Kimi Coding Plan
  • Ollama Cloud
  • local Llama

Supported web-search backends:

  • DuckDuckGo — default, no key required
  • Firecrawl
  • Tavily
  • SearXNG — self-hosted option

See Providers & Models for model IDs, role configuration, API-key variables, and thinking-effort options.

Model routing

Kolega Code can assign different models to different operational roles: a strong long-context model for the main coding loop, a faster model for utility calls, and a dedicated model for extended thinking. You can also override models per agent role — planning, building, investigation, general, and browser — so wide workflows can use cheaper models where they fit and stronger models where they matter.

Sign in with ChatGPT

If you have a paid ChatGPT plan (Plus, Pro, or Business), you can use it to run OpenAI models instead of a separate API key. Run /login chatgpt in the TUI, complete the browser sign-in, and Kolega Code switches to the OpenAI (ChatGPT subscription) provider (default gpt-5.6-sol). Tokens are stored locally (chmod 600) and refreshed automatically; /logout chatgpt removes them. See Sign in with ChatGPT.

Configuration

Set your provider, model, and API keys from first-run onboarding or the full-screen Settings editor in the UI, or via environment variables and flags for non-interactive use:

export KOLEGA_CODE_PROVIDER=deepseek
export DEEPSEEK_API_KEY=...
kolega-code ask "summarize this repository" --project . --provider deepseek --model deepseek-v4-pro

API key variables only provide credentials — pick a provider/model explicitly or save one in Settings. Local session state lives under your platform's state directory unless KOLEGA_CODE_STATE_DIR is set. See the Configuration docs for the full story.

The web_search tool uses DuckDuckGo by default without a key. To choose another backend, set it in Settings or export KOLEGA_CODE_WEB_SEARCH_BACKEND as firecrawl, tavily, or searxng; use FIRECRAWL_API_KEY, TAVILY_API_KEY, or SEARXNG_BASE_URL as needed.

Projects can override Kolega Code's base prompts with uppercase Markdown templates in .kolega/prompts/. Generate editable starters with Jinja replacement tags using /prompts dump in the TUI or kolega-code prompts dump --project . in a terminal. To dump only selected starters, pass prompt names such as coder, planning, or compaction (filename aliases like CODER.md work too). Validate existing overrides with /prompts validate or kolega-code prompts validate --project ..

Requirements

  • Python 3.11+
  • An API key, ChatGPT sign-in, or local model for at least one supported model provider
  • A terminal that supports a modern TUI (most do)

Documentation

Full documentation lives at kolega-ai.github.io/kolega-code:

Project resources

Contributing

Contributions are welcome. See CONTRIBUTING.md for local setup, running the test suite, and building the docs site. Please report security issues privately per SECURITY.md.

License

Released under the Apache License 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kolega_code-0.23.0.tar.gz (11.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolega_code-0.23.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file kolega_code-0.23.0.tar.gz.

File metadata

  • Download URL: kolega_code-0.23.0.tar.gz
  • Upload date:
  • Size: 11.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for kolega_code-0.23.0.tar.gz
Algorithm Hash digest
SHA256 a2e939a8e313a41e422bec07564b4a56d4c2d6926fe32ecea7a5e95a5332da36
MD5 336602c849f4ccef73193d89d9a34bd1
BLAKE2b-256 708d01f0e45340c6788c1a9fa8a0ac708b52245658ba7a81de1ccb1cbf8debf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.23.0.tar.gz:

Publisher: release.yml on kolega-ai/kolega-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kolega_code-0.23.0-py3-none-any.whl.

File metadata

  • Download URL: kolega_code-0.23.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for kolega_code-0.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79c14a72e17fb4b34444d7bff0c0558b9cbd0399c8e32ff877fb07b47edd0c09
MD5 a32bcb808a6ed48639be63b17d775a2a
BLAKE2b-256 88fe4c7edd6d99535d1b5690000f334336b794a2d247e5d71bb6bf9b147f4ed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.23.0-py3-none-any.whl:

Publisher: release.yml on kolega-ai/kolega-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page