Mini Kode AI Agent
An educational AI coding agent CLI
Mini Kode is an open-source ai agent by minmaxflow, written mainly in TypeScript, with 305 GitHub stars and the MIT license. Its code was last updated Nov 4, 2025. The latest npm release is mini-kode 0.2.3, published Nov 4, 2025, with 12 downloads last week.
Mini-Kode
An educational AI coding assistant project that helps you understand and hack modern AI coding assistant systems.
🌟 Why Mini-Kode?

Mini-Kode is an educational project designed to help developers understand modern Coding Agent architecture. We strike the perfect balance between overly complex open-source projects and simplistic demo examples, offering a complete yet manageable implementation (14K lines of production code) with:
- 📚 Education-First Design - Clean architecture built on OpenAI SDK with thoughtful type design and comprehensive comments
- 🛠️ Complete Tool System - Unified interface with comprehensive tools for file operations, search, and command execution
- 🔌 MCP Integration - Connect to external MCP servers for extended functionality
- ⚙️ Multi-LLM Support - Compatible with OpenAI APIs, including GLM, DeepSeek, MiniMax, and other mainstream models
- 🤖 Agent Loop - Complete LLM workflow with streaming responses and human-in-the-loop permission approval
- 🎨 Modern UI - React/Ink-based terminal interface with theme support
🚀 Quick Start (Install & Use)
Install Globally
npm install -g mini-kode
Set Up API Key
DeepSeek (tested and verified):
export DEEPSEEK_API_KEY="your-deepseek-api-key"
Or use GLM (智谱AI) (tested and verified):
export GLM_API_KEY="your-glm-api-key"
Or use MiniMax:
export MINIMAX_API_KEY="your-minimax-api-key"
# Optional: target mainland China (defaults to the global endpoint)
export MINIMAX_REGION="cn"
# Optional: pick MiniMax-M3 instead of the default MiniMax-M3.1-Flash
export MINIMAX_MODEL="MiniMax-M3"
Or use OpenAI compatible API:
export OPENAI_API_KEY="your-openai-api-key"
# or
MINIKODE_API_KEY="your-api-key"
MINIKODE_BASE_URL="https://your-api-provider.com/v1"
MINIKODE_MODEL="your-model-name"
Run Mini-Kode
# Interactive mode (launch UI)
mini-kode
# Non-interactive mode (direct execution)
mini-kode "help me fix the bug in auth.ts"
🔧 Development Quick Start
Prerequisites
- Bun
- pnpm
Install Dependencies
pnpm install
Development Commands
# Development mode with file watching
pnpm run dev
# Build
pnpm run build
# Test
pnpm run test
📖 Learning Resources
Want to dive deeper into the system architecture? Check out docs/README.md for complete system documentation and architecture explanations.
📚 Project Analysis
For a comprehensive code analysis and walkthrough, visit Mini-Kode Deep Analysis - an in-depth exploration of the codebase architecture, design patterns, and implementation details.
🧠 Project Memory
Mini-Kode automatically uses AGENTS.md file in your project root to provide context-aware assistance:
- Automatic Context: System reads
AGENTS.mdto understand your project - Customizable: Edit
AGENTS.mdto include project-specific information - Persistent Memory: Maintains project context across sessions
🏗️ Project Structure
src/
├── tools/ # Tool system and individual tools
├── ui/ # Ink-based CLI interface components
├── llm/ # LLM client and streaming integration
├── permissions/ # Two-layer permission system
├── config/ # Configuration management
├── cli/ # CLI framework and commands
├── agent/ # Core agent logic
├── sessions/ # Session management
└── utils/ # Shared utilities
🛠️ Tech Stack
- TypeScript - Static type checking
- pnpm - Package management
- Ink - React terminal UI
- OpenAI SDK - LLM integration (supports DeepSeek/OpenAI/compatible APIs)
- Vitest - Testing framework
- Zod - Runtime type validation
- Commander - CLI framework
🚧 Future Plans
- Session Persistence and Resume - Save and restore agent sessions
- LLM Built-in Tool Integration - Support for LLM's native tool capabilities (note: DeepSeek currently doesn't support web search tools)
- Image Input Support - Process and analyze image inputs
- Sub Agents Functionality - Hierarchical agent delegation
- Reasoning Model Support - Integration with reasoning-focused models
- Tool Call Message Streaming - Real-time streaming of tool execution
- Context Caching - Smart caching of conversation context to reduce token usage
📚 References
This project was inspired by and references the following resources:
- Building an Agent - Guide on building AI agents
- Building an Agentic System - Comprehensive guide to building agentic systems
- System and Tool Prompts - System prompts and tool prompts for coding agent
- Neovate Code - Todo tool prompt
- Claude Code - UX reference for CLI interface design
Mini Kode alternatives
View more →Similar ai agents in Coding Agents, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| Mini Kode (this page) minmaxflow | 305 | MIT | Nov 4, 2025 | Scanned, no flagged issues |
| AutoGPT Significant-Gravitas | 188k | None found | Nov 1, 2026 | Not scanned yet |
| Langchain langchain-ai | 149k | MIT | Nov 1, 2026 | Scanned, no flagged issues |
| Gemini CLI google-gemini | 109k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| MetaGPT FoundationAgents | 71k | MIT | Jan 21, 2026 | Scanned, no flagged issues |
| Oh My Openagent code-yeongyu | 71k | None found | Nov 1, 2026 | Not scanned yet |