Kolega Code

Kolega Code (kolega-code) is an open-source Python-based terminal coding agent developed by the Kolega AI team. It is built to assist software engineers with repository-level code inspection, refactoring, planning, and task execution directly from the command line. In daily operations, Kolega Code acts as an interactive CLI agent guided by dedicated planning routines and task management tools. It supports multiple LLM providers (including Anthropic Claude and DeepSeek models) and connects to external capabilities via the Model Context Protocol (MCP). The agent manages worktree environments, tracks goal lists, clarifies ambiguous tasks via interactive planning prompts, and executes structured changes against local files. A core differentiator of Kolega Code is its strict ToolExtension contract. Every native extension—including task lists, worktree controls, and custom skills—alongside external MCP servers must declare explicit model-visible descriptions and JSON schemas prior to execution, ensuring robust tool calling and preventing malformed tool invocations across different model backends. Kolega Code is distributed as open-source software on GitHub and includes built-in benchmarking harnesses and automated test suites to measure agent accuracy across tasks.

Tags: ai agent, cli, code assistant, coding agent, terminal

Visit Kolega Code

Key features

  • Modular ToolExtension Architecture — Enforces strict per-tool schemas and model-visible descriptions before any model request is dispatched. - Model Context Protocol (MCP) Support — Connects external MCP servers to supply context and custom tool executions seamlessly. - Worktree Control — Manages isolated git worktrees to keep experimental or multi-file edits separate from main working directories. - Structured Planning & Goal Tracking — Uses dedicated planning agent primitives (write_plan, task lists, goal controls) to organize multi-step implementations. - Custom Skills & Prompt Assets — Loads reusable prompt definitions and tool extensions to tailor agent behavior to specific repositories. - Multi-Model Routing & Benchmarking — Supports routing across multiple foundation model providers with integrated benchmarking scripts.

Use cases

Use Case: Multi-Step Refactoring and Feature Planning Developers working on non-trivial codebase changes can invoke Kolega Code's planning agent to draft a sequential implementation plan, ask clarifying questions on edge cases, and systematically execute tasks against the codebase.

Use Case: Isolated Worktree Experimentation Engineers can direct Kolega Code to perform complex code modifications within a dedicated git worktree, validating test suites and lint rules without disrupting their primary local working branch.

Use Case: Custom Tool Integration via MCP Teams can integrate proprietary internal APIs, database query tools, or CI hooks into the agent loop using standard MCP server definitions and custom ToolExtensions.

Who it is for

Kolega Code is designed for software engineers and terminal-centric developers who want a scriptable, extensible CLI agent with structured planning and MCP integration. It is less suitable for users looking for non-technical GUI wrappers or turnkey IDE sidebars without terminal setup.

Install guide

Installation Install the package locally or from the source repository using pip or pipx (Python 3.10+ required): bash git clone https://github.com/kolega-ai/kolega-code.git cd kolega-code pip install -e .

First Run Configure your provider API keys in your shell environment: bash export ANTHROPIC_API_KEY="your-anthropic-api-key" # Or configure DeepSeek / OpenAI keys depending on the chosen model export DEEPSEEK_API_KEY="your-deepseek-api-key"

Example Session Launch Kolega Code in your target repository to plan and execute a task: bash kolega-code "Add unit tests for the auth middleware and verify using pytest in a separate worktree"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Claude Code — Claude Code is an official terminal-based agentic coding tool developed by Anthropic. Executed via the `claude` CLI command, it provides…
  • Keen Code — Keen Code is an open-source, terminal-based AI coding agent built in Go by developer mochow13. It runs directly inside shell…
  • Junie — Junie is an autonomous terminal-based AI coding agent developed by JetBrains. Built on top of the IntelliJ IDEA engine, it…
  • ZAP — ZAP is an open-source, terminal-based AI coding agent implemented in Rust by the zap-coding-agent project. It provides an autonomous command-line…
  • FetchCoder — FetchCoder is a terminal-based AI coding assistant developed under the Fetch.ai organization. Built specifically for command-line workflows, the tool provides…
  • Open Codex — Open Codex is an open-source, community-maintained fork of OpenAI's Codex CLI tooling, maintained by ymichael on GitHub. It provides a…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories