TAKT's Open-Source CLI Forces AI Coding Agents to Follow Rules
TAKT is an open-source CLI that lets you define multi-agent coding workflows in YAML, with built-in review loops, guardrails, and full audit logs
ProTakeaways
- TAKT is a free, open-source CLI that runs AI coding agents through YAML-defined workflows with built-in plan-implement-review-fix loops.
- Supports Claude Code, Codex, OpenCode, Cursor, GitHub Copilot CLI, and Kiro as providers; works via SDK or CLI.
- Introduces Faceted Prompting: prompts are split into five reusable files (Persona, Policy, Instruction, Knowledge, Output Contract) composed declaratively per step.
- Each task runs in an isolated git clone with per-step permission modes (readonly/edit/full) and full NDJSON audit logs.
- Supports parallel task execution (up to 10 concurrent), GitHub Issue integration, and a GitHub Actions plugin.
- Install with
npm install -g takt; MIT licensed. GitHub repo
AI coding agents can write code fast, but they are notoriously bad at staying on track. They forget instructions mid-task, accumulate polluted context, blur the line between implementing and reviewing, and force you to repeat the same feedback over and over. TAKT (Agent Koordination Topology) is an open-source CLI that attacks this problem at the process level: instead of hoping your agent follows rules embedded in a prompt, you define the entire workflow in YAML and let TAKT enforce it from the outside.
The name comes from the German word for a conductor's baton stroke. The metaphor is deliberate. TAKT uses a music metaphor to describe how it keeps agents in time, just as a baton keeps an orchestra synchronized. You write the score; the agents play their parts.
The core problem it solves
AI coding agents are powerful, but they do not automatically create a stable development process. In long-running work, they forget instructions, accumulate polluted context, blur implementation and review responsibilities, and often force humans to repeat the same feedback again and again. That wears people down.
Adding more rules to prompts or skill files can help, but it cannot enforce the process. Whether the rules are followed is still left to the agent's behavior. TAKT treats AI agents as something to be controlled from the outside, not simply trusted.
This is a meaningful shift in philosophy. Most agent frameworks today ask you to write better prompts and hope for the best. TAKT asks you to define a state machine, then runs agents through it step by step.
How it works
TAKT orchestrates multiple AI agents with structured review loops, managed prompts, and guardrails. You talk to AI to define what you want, queue it as a task, and run it with takt run. Planning, implementation, review, and fix loops are defined in YAML workflow files, so the process is not left to the agent's discretion.
A workflow is a sequence of steps. Each step specifies a persona (who), permissions (what's allowed), and rules (what happens next). Rules determine transitions: a step can route to the next step, loop back to a previous one, or terminate with COMPLETE or ABORT. Here is what a minimal plan-implement-review workflow looks like:
name: plan-implement-review
initial_step: plan
max_steps: 10
steps:
- name: plan
persona: planner
edit: false
rules:
- condition: Planning complete
next: implement
- name: implement
persona: coder
edit: true
required_permission_mode: edit
rules:
- condition: Implementation complete
next: review
- name: review
persona: reviewer
edit: false
rules:
- condition: Approved
next: COMPLETE
- condition: Needs fix
next: implement # fix loopThe fix loop is the key part. When a reviewer rejects code, TAKT automatically routes back to the implementer with the reviewer's feedback attached. No human has to copy-paste the critique.
Faceted Prompting: a new way to manage agent prompts
One of TAKT's most interesting ideas is how it handles prompts. As multi-agent systems grow complex, prompts become monolithic: role definition, behavioral rules, task instructions, domain knowledge, and output format all tangled in one file. TAKT introduces Faceted Prompting, a design pattern that applies separation of concerns to prompt engineering.
Prompts are decomposed into five independent concerns, each stored as its own file:
- Persona -- who the agent is (role definition, expertise, behavioral principles)
- Policy -- what rules to uphold (prohibitions, quality standards, REJECT/APPROVE criteria)
- Instruction -- what to do in this specific step (procedures, goals)
- Knowledge -- reference material the agent consults (architecture docs, API specs)
- Output Contract -- how to format the output (report templates, structured formats)
TAKT can orchestrate multiple agents with different personas, permissions, and review criteria. You can run parallel reviewers, route failures back to implementers, and aggregate results with declarative rules. Prompts are managed as independent facets that compose freely across workflows.
The practical benefit: change a coding policy in one file and every workflow that references it gets the update automatically. Two different review steps can share the same architecture knowledge file without duplicating it. The engine assembles the final prompt at runtime from whichever facets the workflow declares.
Isolation, logging, and CI
Task isolation is handled at the git level. Each task runs in an isolated clone created with git clone --shared, keeping your main working directory clean. This gives each agent its own independent .git directory, preventing agent tools from traversing back to the main repository. Agents work entirely within the clone, unaware of the main repo.
You can configure parallel execution in ~/.takt/config.yaml with a concurrency setting, running up to 10 tasks simultaneously. TAKT writes session logs in NDJSON (Newline-Delimited JSON) format, with each record atomically appended so partial logs are preserved even if the process crashes.
For CI, TAKT provides a takt-action for GitHub Actions that takes an Anthropic API key and a GitHub token. A pipeline mode flag lets you run TAKT headlessly in any other CI system.
Provider support and permissions
TAKT is provider-agnostic. Supported providers include Claude Code, Claude SDK, Codex SDK, OpenCode SDK, Cursor, GitHub Copilot CLI, and Kiro. SDK-based providers such as claude-sdk, codex, and opencode can run with Node.js and API keys; CLI-based providers require their external CLIs.
Permissions are granular and per-step. TAKT uses three provider-independent permission modes that map to provider-specific settings automatically: readonly (agent can read and search but not modify, for review steps), edit (agent can read and edit files within the working directory, the recommended default for implementation), and full (all restrictions removed). You can mix modes across steps in the same workflow, locking down reviewers while giving implementers full build access.
Getting started
TAKT is free and open-source under MIT. Install it with:
npm install -g taktThen configure a provider:
# ~/.takt/config.yaml
provider: claude # claude, claude-sdk, codex, opencode, cursor, or copilot
model: sonnet
language: enOr skip the config file entirely and use environment variables:
export TAKT_ANTHROPIC_API_KEY=sk-ant-...
export TAKT_OPENAI_API_KEY=sk-...The key commands you will use day-to-day:
takt-- start a conversation with AI to define and queue a tasktakt run-- execute all pending tasks through their workflowstakt list-- review results, merge branches, retry failures, or delete taskstakt #N-- pull a GitHub Issue directly as a tasktakt workflow doctor my-flow-- validate a workflow definition before running ittakt eject default-- copy a builtin workflow to your config for customization
Where it fits and where it does not
TAKT is built primarily for AI coding workflows, but the same model applies beyond coding: any task where multiple AI agents need to coordinate, or where review, judgment, and feedback loops can improve task quality.
That said, TAKT is not a general-purpose agent framework like LangGraph or CrewAI. It does not give you a Python API for building arbitrary agent graphs. It is a CLI-first tool designed for software development teams who want reproducible, auditable, multi-agent coding pipelines without writing orchestration code. Execution paths are declared in YAML, keeping results consistent. A workflow built by one team member can be used by anyone else to run the same quality process. Every step is logged in NDJSON for full traceability from task to PR.
The project is also notably self-referential: TAKT is built with TAKT itself. With over 1,100 stars and active development, it is one of the more mature entries in the rapidly growing space of declarative agent orchestration tools.