AI personal knowledge-base assistant with agent capabilities
YUNGE is a single-user AI assistant built around the idea that conversations should turn into knowledge. It's a fork of AstrBot, trimmed to one user / one platform (WebChat) and focused on three things:
中文 / English
Software-engineering course project. The original goal was a single sentence:
Build an AI personal knowledge-base assistant with agent capabilities — chat, remember the materials it has read, recall during conversation, call tools to get things done.
The deliverable revolves around two threads:
| Module | Description |
|---|---|
| WebChat | Vue 3 streaming chat UI — model switching, personas, context compression, persistent history |
| External KB (RAG) | Upload PDF / TXT / DOCX / Markdown / EPUB / images. Hybrid retrieval: FAISS dense + BM25 sparse + RRF fusion + optional reranker |
| Conversation KB | LLM auto-extracts eight categories of entries (interest / project / stack / personality / learning / preference / concept / relation) from history; shares the same retrieval engine as external KB |
| Profile & Timeline | MBTI tendency analysis and per-day/week/month summaries from dialogue history |
| Agent loop | Multi-round ReAct: tool discovery → call → result feedback. Knowledge retrieval, web search, Computer Use |
| MCP client | Connect to any Model Context Protocol-compliant external tool service |
| Scheduler | Proactive agent — cron-triggered conversation or tool calls |
| Provider | OpenAI / Anthropic / Gemini / DeepSeek / Ollama / any OpenAI-compatible API. Embedding providers are equally pluggable. |
External KB and conversation KB share a FAISS + KBHelper backend but are semantically separated:
| Layer | Tech |
|---|---|
| Backend | Python 3.12 + Quart (async) |
| Frontend | Vue 3 + Vuetify 3 + TypeScript + Vite |
| Persistence | SQLite (sessions / KB metadata / config) |
| Dense retrieval | FAISS (IndexFlatL2 + IndexIDMap) |
| Sparse retrieval | rank_bm25 + Chinese tokenization |
| Agent | Custom ToolLoopAgentRunner + MCP Client |
setup.bat
Detects Python → creates venv → installs deps → builds frontend.
# 1. Backend
pip install -r requirements.txt
# 2. Frontend
cd dashboard
npm install
npm run build
cd ..
# 3. Stage frontend artifacts
xcopy dashboard\dist data\dist\ /e /i /q
# 4. Run
python main.py
Or double-click _run_miku.bat (kept for backward compatibility).
Open http://localhost:16185 — default credentials miku / miku (change them).
Embedding setup: the KB requires at least one Embedding provider configured. Common choices:
- Cloud: any OpenAI-compatible endpoint (SiliconFlow / Zhipu / DashScope / DeepSeek; several offer free tiers)
- Cloud: Gemini Embedding
- Local: Ollama + nomic-embed-text (
ollama pull nomic-embed-text, base_urlhttp://localhost:11434/v1)
miku/
├── core/
│ ├── agent/ # Agent tool loop + MCP
│ ├── knowledge_base/ # Retrieval engine (FAISS + BM25 + fusion)
│ ├── provider/ # LLM / Embedding / Rerank adapters
│ ├── conversation_store.py # Session message store
│ └── ...
├── dashboard/routes/ # Quart REST API
└── ...
dashboard/ # Vue 3 frontend
data/ # Runtime data (SQLite / uploads / index)
AI personal knowledge-base assistant with agent capabilities
YUNGE is a single-user AI assistant built around the idea that conversations should turn into knowledge. It's a fork of AstrBot, trimmed to one user / one platform (WebChat) and focused on three things:
中文 / English
Software-engineering course project. The original goal was a single sentence:
Build an AI personal knowledge-base assistant with agent capabilities — chat, remember the materials it has read, recall during conversation, call tools to get things done.
The deliverable revolves around two threads:
| Module | Description |
|---|---|
| WebChat | Vue 3 streaming chat UI — model switching, personas, context compression, persistent history |
| External KB (RAG) | Upload PDF / TXT / DOCX / Markdown / EPUB / images. Hybrid retrieval: FAISS dense + BM25 sparse + RRF fusion + optional reranker |
| Conversation KB | LLM auto-extracts eight categories of entries (interest / project / stack / personality / learning / preference / concept / relation) from history; shares the same retrieval engine as external KB |
| Profile & Timeline | MBTI tendency analysis and per-day/week/month summaries from dialogue history |
| Agent loop | Multi-round ReAct: tool discovery → call → result feedback. Knowledge retrieval, web search, Computer Use |
| MCP client | Connect to any Model Context Protocol-compliant external tool service |
| Scheduler | Proactive agent — cron-triggered conversation or tool calls |
| Provider | OpenAI / Anthropic / Gemini / DeepSeek / Ollama / any OpenAI-compatible API. Embedding providers are equally pluggable. |
External KB and conversation KB share a FAISS + KBHelper backend but are semantically separated:
| Layer | Tech |
|---|---|
| Backend | Python 3.12 + Quart (async) |
| Frontend | Vue 3 + Vuetify 3 + TypeScript + Vite |
| Persistence | SQLite (sessions / KB metadata / config) |
| Dense retrieval | FAISS (IndexFlatL2 + IndexIDMap) |
| Sparse retrieval | rank_bm25 + Chinese tokenization |
| Agent | Custom ToolLoopAgentRunner + MCP Client |
setup.bat
Detects Python → creates venv → installs deps → builds frontend.
# 1. Backend
pip install -r requirements.txt
# 2. Frontend
cd dashboard
npm install
npm run build
cd ..
# 3. Stage frontend artifacts
xcopy dashboard\dist data\dist\ /e /i /q
# 4. Run
python main.py
Or double-click _run_miku.bat (kept for backward compatibility).
Open http://localhost:16185 — default credentials miku / miku (change them).
Embedding setup: the KB requires at least one Embedding provider configured. Common choices:
- Cloud: any OpenAI-compatible endpoint (SiliconFlow / Zhipu / DashScope / DeepSeek; several offer free tiers)
- Cloud: Gemini Embedding
- Local: Ollama + nomic-embed-text (
ollama pull nomic-embed-text, base_urlhttp://localhost:11434/v1)
miku/
├── core/
│ ├── agent/ # Agent tool loop + MCP
│ ├── knowledge_base/ # Retrieval engine (FAISS + BM25 + fusion)
│ ├── provider/ # LLM / Embedding / Rerank adapters
│ ├── conversation_store.py # Session message store
│ └── ...
├── dashboard/routes/ # Quart REST API
└── ...
dashboard/ # Vue 3 frontend
data/ # Runtime data (SQLite / uploads / index)