🐰

Meet Krolik

Proactive AI agent with long-term memory, dynamic LLM routing across 200+ models, and multi-channel delivery — Telegram, WhatsApp, CLI.

🧠

Remembers Everything

Semantic vector memory with intent-aware retrieval. Decides before each query if memory helps, rewrites for better recall.

🔀

Routes Intelligently

200+ models, 5-tier cost scoring, bilingual EN+RU task detection. Picks the right model for each task automatically.

Acts Proactively

Cron jobs, heartbeats, daily digests, deadline reminders. Doesn't wait for you — reaches out when it matters.

Everything You Need

From memory to channels to tools — a complete agent framework in a single Python package.

🧠

Long-Term Memory

memU
  • Semantic vector search across conversations, facts, preferences
  • Intent-aware pre-retrieval — skips memory when not needed
  • Proactive suggestions: daily digest, reminders, goal nudges
  • Dual backend: memU service + file-based fallback
📱

Multi-Channel Delivery

Telegram
Text, photos, voice, docs
WhatsApp
WebSocket bridge
Feishu / Lark
HTTP webhook
CLI
Interactive REPL
🛠️

21 Built-in Tools

remember recall search_memory llm_call coding_agent list_models read_file write_file exec web_search fetch_url cli_proxy workflow + MCP dynamic
🧩

MCP & Skills

  • Connect any MCP server — tools auto-register
  • Bundled skills: GitHub, weather, tmux, summarize
  • Add your own via SKILL.md — YAML frontmatter + instructions
  • Subagent spawning for complex parallel tasks

5-Tier Smart Router

Automatically picks the best model for each task. Discovers 200+ models from OpenRouter, classifies by cost, and tracks success rates.

Free $0
Casual chat, simple Q&A
Cheap <$0.05/1M
Everyday tasks
Standard <$0.15/1M
Code, analysis
Premium ≥$0.15/1M
Complex reasoning
Research any
Deep research
40%
Priority weight
30%
Success rate
EN+RU
Bilingual scoring
MD5
Signature tracking

Architecture

Single Python package. Async throughout. No microservices overhead.

┌────────────────────────────────────────────────────┐
  TelegramWhatsAppFeishuCLI      
└──────┬─────────┴─────┬──────┴────┬─────┴─────┬─────┘
                                             
┌────────────────────────────────────────────────────┐
              Message Bus (async queues)            
└────────────────────────┬───────────────────────────┘
                        
┌────────────────────────────────────────────────────┐
                  Agent Loop                       
    Context · Tools (21) · Sessions · Skills        
    Subagents · MCP Manager                         
└──────┬─────────────┬─────────────────┬─────────────┘
                                     
┌──────────────┐ ┌───────────┐ ┌─────────────────┐
 LLM Gateway  │ │ memU      │ │ Cron + Heartbeat
 Router(5-tier)│ │ Memory    │ │ Daily digest    
 200+ models  │ │ Intent    │ │ Reminders       
 Fallback     │ │ Proactive │ │ Scheduled tasks 
└──────────────┘ └───────────┘ └─────────────────┘

Quick Start

Three commands to a running agent.

1 Install
$ git clone https://github.com/anatolykoptev/krolik.git
$ cd krolik && pip install -e .
2 Configure
$ mkdir -p ~/.krolik
$ echo 'KROLIK_PROVIDERS__GEMINI__API_KEY=your-key' > ~/.krolik/.env
3 Run
$ krolik agent -m "Hello!"
# or full gateway with Telegram + cron:
$ krolik gateway

Single Package. No Microservices.

krolik/
├── agent/ # Core loop, context, skills, subagents
├── bus/ # Async message bus
├── channels/ # Telegram, WhatsApp, Feishu
├── cli/ # Typer CLI commands
├── config/ # Pydantic schema + env loader
├── cron/ # Scheduled tasks
├── heartbeat/ # Periodic wake-up
├── llm/ # Gateway, models, 5-tier router
├── mcp/ # Model Context Protocol
├── memory/ # memU store, intent, proactive
├── providers/ # LiteLLM multi-provider
├── session/ # JSONL conversation history
├── skills/ # Bundled skills (extensible)
├── tools/ # FS, shell, web, CLI proxy
└── utils/ # Helpers