Skip to main content

Multi-agent coding in the terminal

Project description

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. Add a provider key. Open the Settings tab to pick a provider/model and save your API key. 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 thread or session

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.5). 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 the Settings tab 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.

Project details


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.13.0.tar.gz (9.8 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.13.0-py3-none-any.whl (526.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kolega_code-0.13.0.tar.gz
Algorithm Hash digest
SHA256 71151275ed4262ff6f16d7bfa8113d0415b2d3f264f974b8a21d24784acc1a75
MD5 db1d63d24e1e18521b882197ce49fcac
BLAKE2b-256 5134fe51dccaa886d70cec966203100a3c5d20fa005aa0d35ceeeceef61c4c2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.13.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.13.0-py3-none-any.whl.

File metadata

  • Download URL: kolega_code-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 526.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kolega_code-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04d4f529e20b023b600cb3bc94c4254451ba91045d9dd6f4e705897917fe9de2
MD5 879bacab60b1989a6f44afe9e8c977bd
BLAKE2b-256 482feb2f05bde6aaafb06d24732964a4076721080219ac74aad1ad9e1bd06aa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.13.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