CLAII

CLAII is an open-source terminal-based AI coding assistant developed by agencyswarm. Built in Python, it serves as a lightweight CLI agent designed to help developers inspect local codebases, manage tasks, and run modular functions directly from the shell. The tool runs as a CLI package via a standard terminal entrypoint. During daily development, users interact with the agent from their current working directory, passing instructions and querying code. CLAII manages multi-turn conversation states through a dedicated memory module, providing model compatibility for providers such as Google Gemini by normalizing message roles to adhere to provider SDK requirements. CLAII differentiates itself through built-in persistent local memory (.claii_memory.json), system prompt heuristics tuned for workspace path handling, and support for explicit @kb syntax to mention and inject knowledge base files directly into the prompt context. The project is available as an open-source repository on GitHub. It represents an early-stage, modular agent implementation configured via pyproject.toml and standard Python environment settings.

Tags: ai agent, cli, coding agent, developer tools, terminal

Visit CLAII

Key features

  • Persistent Agent Memory — Tracks conversational state and agent history locally across runs using .claii_memory.json. - Gemini Role Normalization — Includes dedicated memory formatting to normalize chat roles for compatibility with Google Gemini SDK specifications. - Knowledge Base Mentions (@kb) — Allows developers to explicitly include project documentation and context files into queries using @kb tags. - Workspace Path Heuristics — System prompt rules designed to reliably navigate and handle relative file paths within the active directory. - Modular Function Calling — Structured package layout separating CLI logic, configuration, and executable agent functions.

Use cases

Use Case: Context-Aware Code Refactoring A developer working within a repository can invoke CLAII to refactor internal modules while relying on persistent session memory to retain past instructions and state changes.

Use Case: Project Knowledge Referencing with @kb When modifying code that adheres to strict external documentation or specifications, developers can reference relevant design documents directly in prompts using the @kb syntax.

Use Case: Terminal-Based LLM Exploration with Gemini Engineers building with Google's Gemini models can use CLAII as a lightweight terminal interface that handles Gemini-specific message structure without requiring custom boilerplate.

Who it is for

CLAII is suited for Python developers and researchers looking for a lightweight, hackable terminal agent with local memory persistence and Gemini support. It is not intended for teams needing turnkey enterprise governance, IDE extensions, or complex multi-agent orchestration out of the box.

Install guide

Installation Clone the repository and install it in editable mode using pip: bash git clone https://github.com/agencyswarm/CLAII.git cd CLAII pip install -e .

First Run Set your required API keys (e.g., Gemini API key) in your environment or verify settings in config.py: bash export GEMINI_API_KEY="your-gemini-api-key" python main.py

Example Session Run the agent and provide a task while referencing a project context file: bash python main.py "Inspect calculator/ and write unit tests based on specifications in @kb README.md"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Warp — Warp is an AI-integrated terminal emulator and CLI workspace built by warpdotdev. Engineered in Rust with native GPU rendering, Warp…
  • Amazon Q Developer CLI — Amazon Q Developer CLI is an open-source command-line coding assistant developed by Amazon Web Services (AWS). Built primarily in Rust,…
  • darce-cli — darce-cli is an open-source terminal coding agent created by Amer Sarhan. Built in TypeScript with an Ink-powered terminal UI, it…
  • Even — Even is an agent-native desktop workspace and orchestration environment developed by Todience, Inc. It integrates a native terminal, an embedded…
  • Repomon — Repomon is an open-source developer harness and repository companion tool created by Ali Hamza Azam. Built with a Rust core…
  • Construct — Construct is an open-source terminal-based orchestrator and multi-harness manager developed by the construct-worlds organization. It functions as a meta-tool and…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories