Skip to main content

AI Agent Integration

The CLI provides optimized output for AI coding agents, enabling autonomous review-fix loops.

Supported Agents

  • Claude Code — via --prompt-only output
  • Cursor — via --prompt-only output
  • Windsurf — via --prompt-only output

The Review-Fix Loop

The --prompt-only flag outputs minimal, structured analysis that AI agents can consume directly. This enables a powerful workflow:
1

Agent Runs Review

kodus review --prompt-only
The CLI returns structured issues with file paths, line numbers, and suggested fixes.
2

Agent Applies Fixes

The AI agent reads the output and applies the suggested fixes to the codebase.
3

Agent Re-runs Review

kodus review --prompt-only
The loop continues until the review comes back clean.
4

Agent Commits & Pushes

Once all issues are resolved, the agent commits and pushes the clean code.

Team Key Authentication for Agents

For AI agents, use a team key so no individual login is needed:
export KODUS_TEAM_KEY=kodus_xxxxx
kodus review --prompt-only
This key can be shared across the team and configured with device limits from the dashboard.

Decision Memory

Capture and persist the reasoning behind AI agent decisions directly in your repository.

How It Works

When enabled, Kodus hooks into your AI agent’s turn-complete events and captures decisions as structured markdown files in .kody/.
.kody/
├── pr/by-sha/<head-sha>.md    # PR-level decisions (versioned with code)
├── memory/<module-id>.md      # Module-level decisions (long-term)
└── modules.yml                # Module configuration

Setup

# Enable for all supported agents
kodus decisions enable

# Enable for specific agents
kodus decisions enable --agents claude,cursor

# Check status
kodus decisions status

Workflow

1

Enable Hooks

kodus decisions enable
This installs hooks for Claude Code, Cursor, and/or Codex.
2

Work Normally

As you (or your AI agent) work on code, decisions are automatically captured on each turn-complete event.
3

Review Decisions

kodus decisions show
View all decisions captured for the current branch.
4

Promote to Long-term Memory

kodus decisions promote
Move important decisions from PR-level to module-level memory so they persist beyond the branch.

Context Files

The CLI reads project context from these files if they exist in your repository:
FileDescription
.kodus.mdKodus-specific configuration and guidelines
claude.mdClaude-specific guidelines
.cursorrulesCursor IDE rules