codeAgent
CodeAgent is an open-source coding agent that lives in your terminal. It understands your repository, plans multi-step changes, writes and edits files, runs com
What is codeAgent?
CodeAgent is an open-source coding agent that lives in your terminal. It understands your repository, plans multi-step changes, writes and edits files, runs commands and tests, and iterates until the task is done — all with a transparent, extensible tool loop.
Overview of codeAgent
What it is
CodeAgent is an open-source coding agent that lives in your terminal. It understands your repository, plans multi-step changes, writes and edits files, runs commands and tests, and iterates until the task is done — all with a transparent, extensible tool loop.
Key features
- Terminal experience with streaming responses, thinking blocks, and tool event lines; includes permission panels for dangerous commands and file writes outside a whitelist.
- Multi-model support: OpenAI-compatible protocol (default DeepSeek) and Anthropic protocol; main model plus auxiliary small model for compression, retrieval, and memory extraction.
- Tool self-registration: modules under tools/ are imported and registered; toolsets control which tools are sent to the model. MCP external tools can be connected via a project-level .mcp.json file.
- Safety measures: destructive command approval, cross-session whitelist, injection detection, path redlining, self-protection, secret scanning, SSRF protection, and optional bwrap sandbox on Linux.
- Memory and self-learning: long-term memory via MEMORY.md and JSONL storage; skill system with user skills and plugin marketplace; self-learning pipeline to distill reusable skills from conversation traces.
- Collaboration and automation: sub-agents (sync/async with worktree isolation), team mode (coordinator/worker/message bus/mailbox), workflow engine with deterministic orchestration, cron tasks, declarative hooks, task checklist, and session checkpoint rewinding.
- Context engineering: hierarchical compression (L1 light pruning to L4 deep summarization), cross-turn tool summarization, time-based old result cleanup, and prefix-cache-friendly temporary message injection.
Use cases
- Developers who want an AI coding assistant that runs locally in the terminal and can perform multi-step file edits, run commands, and iterate autonomously.
- Anyone studying or building agent-based AI systems, as CodeAgent provides a full, annotated implementation of tool registration, context compression, permission approval, sub-delegation, workflow engine, memory, and self-learning.
- Users needing a customizable, extensible agent that supports multiple LLM providers, plugin market, and safety controls for executing commands and writing files.
Getting started
Prerequisites: Python 3.11+ and uv (Python package manager).bash# 1) Install uv (if not already installed)# Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"# macOS / Linux: curl -LsSf https://astral.sh/uv/install.sh | sh# 2) Clone repository and install dependenciesgit clone https://github.com/Harvil1/codeAgent.gitcd codeAgentuv sync# 3) Configure API key (choose one)# a) Environment variable: DEEPSEEK_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY /# OPENROUTER_API_KEY / ZHIPUAI_API_KEY (also BIGMODEL_API_KEY accepted)# b) Write to ~/.codeAgent/settings.json under models...api_key# (first run auto-generates default config, default model is DeepSeek)# 4) Runuv run python main.py # Interactive modeuv run python main.py -c # Auto-resume last session
License and pricing
This project is open source under the MIT license. No pricing information is provided by the project.
Based on the project's public README and repository metadata.