Skip to main content

Overview

The ICRL CLI is an interactive, tool-calling coding assistant that lives in your terminal. If you’ve used Claude Code or OpenAI Codex, you’ll feel right at home — the core experience is the same: type a task in natural language, and the agent reads files, writes code, runs commands, and iterates until the job is done. The key difference is that ICRL gets better the more you use it. Every successful run is stored as a trajectory. On future tasks, the agent retrieves similar past trajectories and uses them as in-context examples, producing better plans and fewer mistakes over time. It’s a coding agent that learns your codebase.

icrl chat — Interactive Mode

icrl chat is the primary way to use ICRL. It launches a multi-turn terminal UI where you can have an ongoing conversation with the agent.
When you start a session, you’ll see:
The status line shows your current model, working directory, the number of stored trajectories, and (after the first turn) the current turn number.

What the Agent Can Do

Just like Claude Code, the ICRL chat agent has full access to your local environment:
  • Read, write, and edit files in your working directory
  • Run shell commands — git, python, npm, cargo, anything in your PATH
  • Search your codebase with glob patterns and regex
  • Search the web for documentation or solutions
  • Fetch web pages and parse their content
  • Ask you questions when the task is ambiguous
The agent follows a think-act-observe loop: it reads files to understand context, makes targeted changes, runs commands to verify, and iterates until done.

What Makes It Different from Claude Code

The agent works like Claude Code on any individual task. The difference is what happens between tasks:
  1. After a successful run, ICRL asks whether to store the trajectory (the full sequence of reasoning, actions, and observations).
  2. On future tasks, the agent retrieves similar past trajectories using semantic search and includes them as in-context examples.
  3. Over time, a curation system prunes low-utility trajectories so the example set stays high quality.
This means the agent learns patterns specific to your codebase — your project structure, your testing conventions, your preferred libraries — and applies that knowledge automatically.

Example Session

On the second task, the agent retrieves the /api/users trajectory and uses it as a reference — it already knows your project uses Zod, how your validation utilities are structured, and your test patterns.

Multi-Turn Conversations

The session maintains full conversation history across turns. You can ask follow-up questions, request changes to what the agent just did, or start entirely new tasks — all within the same session.
  • Type /clear to reset the conversation and start fresh
  • Type exit, quit, or q to end the session

Options

Compare Mode

Compare mode (--compare) is useful when you want to explore different approaches to a task:
The agent proposes two distinct strategies, executes both independently, and presents the results side by side. You then choose which trajectory to store (or reject both). This is particularly useful for tasks where the best approach isn’t obvious.

icrl run — Single-Task Mode

If you just need to fire off a one-shot task without an interactive session:
This runs the agent once, stores the trajectory if successful, and exits. It accepts the same options as chat, plus a few extras:

Configuration

View Configuration

Set a Value

Available keys:

Reset Configuration

Trajectory Database

Every project gets its own trajectory database at <working_dir>/.icrl/trajectories. Use the --global flag on any db command to target the global fallback database instead.

Inspect

Manage

All db commands accept --dir PATH to specify the project directory and --global to use the global database.

Provider Selection

The CLI auto-detects which LLM provider to use based on the model string:
  • If the model matches a Vertex AI alias or pattern, the CLI uses the Anthropic Vertex provider
  • Otherwise, it uses the generic LiteLLM provider (supports OpenAI, Anthropic, and many others)
The default model is claude-opus-4-5. To use a different model:

Helpers