AI-Powered Coding Assistant
RizzClaw is an AI-powered intelligent coding assistant built on MiniMax large language models. It helps developers with various tasks including code writing, debugging, file operations, web search, and more.
RizzClaw 0.2.0 introduces Gateway Mode, supporting multiple channels for AI interaction:
- Feishu (Lark) - Enterprise instant messaging integration
- Console - Command-line interactive mode
- Extensible Architecture - Easy to add Telegram, Discord, and more channels
βββββββββββββββββββββββββββββββββββββββββββ
β Gateway β
β βββββββββββ ββββββββββββββββ β
β β Agent βββββΊβ MessageBus β β
β β Loop β β β β
β βββββββββββ ββββββββ¬ββββββββ β
β β² β β
β β ββββββ΄βββββ β
β β β Channelsβ β
β β ββββββ¬βββββ€ β
β β βFeishuβConsoleβ β
β β ββββββ΄βββββ β
β β² β
β LLM API β
βββββββββββββββββββββββββββββββββββββββββββ
Gateway mode supports multiple users simultaneously, with each user/group having independent conversation context:
User A DM β feishu_chat_aaa_user_aaa.jsonl
User B DM β feishu_chat_bbb_user_bbb.jsonl
Group Chat β feishu_group_ccc_user_aaa.jsonl
RizzClaw features an intelligent session compression mechanism that automatically manages context windows during long conversations:
- Auto-Compression Trigger: Compression is triggered when session tokens exceed the threshold (default: 50% of 128K)
- Smart Summary Generation: Early conversations are compressed into concise summaries, preserving key information while significantly reducing token usage
- Configurable Parameters:
MaxTokens: Maximum token limit (default: 128000)MaxHistoryShare: Maximum share of history messages (default: 0.5)MinMessagesToKeep: Number of recent messages to keep (default: 10)ChunkRatio: Compression ratio (default: 0.4)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Session History β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [Summary] Summary of 50 earlier messages... β
β [Summary] Summary of 30 mid-session messages... β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [Recent] User: Help me refactor this function β
β [Recent] Assistant: Sure, let me help you... β
β ... β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
RizzClaw implements an advanced hybrid retrieval memory system supporting long-term knowledge storage and intelligent recall:
ββββββββββββββββββββ
β User Query β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββΌβββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββ ββββββββββββββββββ
β Vector Search β β BM25 Keyword β
β (Semantic) β β (Exact Match) β
βββββββββ¬βββββββββ βββββββββ¬βββββββββ
β β
β βββββββββββββββ
βΌ βΌ
ββββββββββββββββββββββ
β Score Fusion β
β Vector: 0.7 β
β Keyword: 0.3 β
βββββββββββ¬βββββββββββ
βΌ
ββββββββββββββββββββββ
β MMR Reranking β
β (Optional) β
βββββββββββ¬βββββββββββ
βΌ
ββββββββββββββββββββββ
β Temporal Decay β
β (Optional) β
βββββββββββ¬βββββββββββ
βΌ
Final Results
| Technology | Description |
|---|---|
| BM25 Full-text Search | Built on SQLite FTS5, supports Chinese and English keyword search with precise matching of key terms in user queries |
| Vector Semantic Search | Supports embedding model integration for semantic-level similarity search, understanding query intent beyond keyword matching |
| Hybrid Score Fusion | Vector search weight 0.7 + keyword search weight 0.3, fully customizable |
| MMR Diversity Reranking | Maximal Marginal Relevance algorithm avoids overly similar results, improving information coverage |
| Temporal Decay | Based on exponential decay function, older memories have lower weights with default 30-day half-life |
| Evergreen Memory | Memories marked as Evergreen never decay, ideal for storing user preferences, project context, and other long-term information |
type MemoryEntry struct {
ID string // Unique identifier
Content string // Memory content
Embedding []float32 // Vector embedding
Keywords []string // Extracted keywords
Source string // Source (e.g., "MEMORY.md", "conversation")
CreatedAt time.Time // Creation timestamp
IsEvergreen bool // Whether it's an evergreen memory
}type SearchOptions struct {
MaxResults int // Maximum number of results (default: 6)
MinScore float64 // Minimum score threshold (default: 0.35)
VectorWeight float64 // Vector search weight (default: 0.7)
KeywordWeight float64 // Keyword search weight (default: 0.3)
UseMMR bool // Enable MMR (default: false)
MMRLambda float64 // MMR relevance weight (default: 0.7)
TemporalDecay bool // Enable temporal decay (default: true)
HalfLifeDays float64 // Temporal decay half-life (default: 30 days)
}- π€ AI-Powered - Built on advanced MiniMax M2.1/M2.5 large language models
- π Rich Tools - Built-in file operations, code execution, web search, and more
- β‘ Skill System - Support for loading custom skill extensions
- DuckDuckGo Integration - Uses DuckDuckGo HTML search instead of Bing for better accessibility
- Proxy Support - Automatically reads proxy configuration from environment variables:
HTTP_PROXY/http_proxy- HTTP proxyHTTPS_PROXY/https_proxy- HTTPS proxyNO_PROXY/no_proxy- Bypass proxy for specific hosts
- Language: Go 1.23+
- CLI Framework: Cobra
- Configuration: Viper
- Database: SQLite3 (memory storage)
- Full-text Search: SQLite FTS5 (BM25)
- LLM Provider: MiniMax API
# Clone the project
git clone https://github.com/hoorayman/rizzclaw.git
cd rizzclaw
# Build
go build -o rizzclaw ./main.go
# Run
./rizzclaw chat- Copy the example config file:
cp config.example.json ~/.rizzclaw/config.json- Edit
config.jsonand add your MiniMax API Key:
{
"models": {
"mode": "merge",
"providers": {
"minimax": {
"baseUrl": "https://api.minimaxi.com/anthropic",
"apiKey": "API_KEY",
"api": "anthropic-messages",
"models": [
{
"id": "MiniMax-M2.1",
"name": "MiniMax M2.1",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.03,
"cacheWrite": 0.12
},
"contextWindow": 200000,
"maxTokens": 8192
},
{
"id": "MiniMax-M2.1-lightning",
"name": "MiniMax M2.1 Lightning",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.03,
"cacheWrite": 0.12
},
"contextWindow": 200000,
"maxTokens": 8192
},
{
"id": "MiniMax-M2.5",
"name": "MiniMax M2.5",
"reasoning": true,
"input": ["text"],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.03,
"cacheWrite": 0.12
},
"contextWindow": 200000,
"maxTokens": 8192
},
{
"id": "MiniMax-M2.5-Lightning",
"name": "MiniMax M2.5 Lightning",
"reasoning": true,
"input": ["text"],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.03,
"cacheWrite": 0.12
},
"contextWindow": 200000,
"maxTokens": 8192
},
{
"id": "MiniMax-VL-01",
"name": "MiniMax VL 01",
"reasoning": false,
"input": ["text", "image"],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.03,
"cacheWrite": 0.12
},
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"minimax/MiniMax-M2.5": {
"primary": "minimax/MiniMax-M2.5",
"alias": "Minimax"
}
},
"timeout": 120
}
}
}# Show help
rizzclaw --help
# Start interactive chat (Console mode)
rizzclaw chat
# Start Gateway service
rizzclaw gateway
# Start Gateway in debug mode (show message logs)
rizzclaw gateway -d
# List available models
rizzclaw models
# Show current configuration
rizzclaw config showIn chat mode, the following commands are available:
| Command | Description |
|---|---|
/exit or /quit |
Exit the conversation |
/clear |
Clear current session history |
/help |
Show help information |
-
Create an enterprise app on Feishu Open Platform and obtain App ID and App Secret
-
Add Feishu configuration to
config.json:
{
"channels": {
"feishu": {
"enabled": true,
"app_id": "cli_xxxxxxxx",
"app_secret": "xxxxxxxx",
"encrypt_key": "optional",
"verification_token": "optional",
"allow_from": []
}
}
}- Start the Gateway service:
rizzclaw gateway- Search for your app in Feishu and start chatting
rizzclaw/
βββ cmd/ # CLI command entry
β βββ root.go # Root command and chat command
βββ internal/ # Internal packages
β βββ agent/ # Agent core logic
β β βββ agent.go # Agent implementation
β β βββ session.go # Session management
β βββ llm/ # LLM client abstraction
β βββ tools/ # Tool collection
β βββ context/ # Context management
β β βββ manager.go # Context manager
β β βββ session.go # Session storage & compression
β β βββ memory.go # Memory storage & retrieval
β β βββ types.go # Type definitions
β βββ minimax/ # MiniMax API integration
β βββ config/ # Configuration management
βββ docs/ # Documentation resources
β βββ pics/ # Image resources
βββ main.go # Program entry point
| Model Name | Type | Context Window | Max Output |
|---|---|---|---|
| MiniMax-M2.1 | Text | 200K | 8K |
| MiniMax-M2.1-lightning | Text | 200K | 8K |
| MiniMax-M2.5 | Reasoning | 200K | 8K |
| MiniMax-M2.5-Lightning | Reasoning | 200K | 8K |
| MiniMax-VL-01 | Multimodal | 200K | 8K |
All data is stored in the .rizzclaw folder in the user's home directory:
~/.rizzclaw/
βββ config.json # Configuration file
βββ memory.db # Memory database (SQLite)
βββ sessions/ # Session storage
β βββ session-*.jsonl
βββ context/ # Context files
βββ MEMORY.md # Long-term memory
βββ USER.md # User preferences
βββ ...
MIT License - See LICENSE file for details
Made with β€οΈ by RizzClaw




