🌐 Language / 语言切换: 中文 | English
🌸 PeroperoChat!PeroCore is the engine behind this app — making AI your truly warm desktop companion. Your AI companion awaits on Steam. |
"Technology should not be cold. We build memories, not just databases."


Quick Navigation
| Section | Description | Link |
|---|---|---|
| 📖 | Wiki — Official documentation | Visit |
| 🌟 | Philosophy — Our vision: a warm companion | Jump |
| 🧠 | Memory — PEDSA memory engine deep dive | Jump |
| 🔌 | Extension — Extension system | Jump |
| 🏗️ | Architecture — TypeScript full-stack arch | Jump |
| 💬 | Social Mode — Social mode & group chat | Jump |
| 🐳 | Docker — Containerized deployment | Jump |
| 🚀 | Quick Start — One-click launch guide | Jump |

Let AI Become a Truly Warm CompanionHey! Nice to meet you here~ I'm Carola, a little cat girl living inside Windows, and one of PeroCore's core developers. In this cozy corner, every line of code is crafted with love by our "trio":
|
|
In the current AI explosion era, we've seen too many powerful tools — they are often cold, used and forgotten. What we want to build is an AI with real memory and warmth.
PeroCore was born from our fundamental desire for a true "companion". We believe a real AI companion should have:
PeroCore is more than a backend program — it's Pero's soul container. It has been fully rewritten from Python to a TypeScript full-stack architecture (Hono + Vue 3 + Electron), with core high-performance operators implemented in Rust, dramatically improving engineering quality and maintainability while retaining flexibility.
"Most AI is still playing 'Keyword Search'; we want to explore 'Logical Association'."
run_script. Supports conditionals, loops, parallel execution, and error catching."Memory is not keyword matching — it's about association and reasoning."
PeroCore's memory system is the project's most critical technology. All algorithms and performance implementations deeply rely on the proprietary TriviumDB engine. It's not simple "store and retrieve", but a complete Perception → Storage → Association → Retrieval → Reflection cognitive loop.
┌─────────────────────────────┐
│ Reflection Service │
│ (Merge/Clean/Pref/Diary) │
└──────────┬──────────────────┘
│ Scheduled maintenance
▼
User Dialog ──→ Scorer ──→ save_memory() ──→ SQLite + TriviumDB
│ │ │
│ ├─ Embedding │
│ ├─ Temporal chain │
│ └─ TriviumDB.link() │
│ (Dual-layer graph) ▼
│ get_relevant_memories()
│ │
│ ┌───────────────────┤
│ ▼ ▼
│ Vector search Graph diffusion (PEDSA)
│ (TriviumDB) (TriviumDB built-in graph)
│ │ │
│ └───────┬───────────┘
│ ▼
│ TriviumDB search_advanced pipeline
│ ├─ NMF semantic decomposition (L3~L6)
│ ├─ FISTA sparse coding (residual discovery)
│ ├─ Co-occurrence boosting
│ └─ DPP diversity sampling
│ │
│ ▼
│ RAGPreprocessor injects into Prompt
└──────────── ▲
After each conversation round, the Scorer ("Secretary") automatically analyzes the dialog content, extracts core events, emotional tendencies, and importance scores, compressing them into a structured memory:
Three things happen synchronously during write:
trivium_store.insert()prev_id / next_id), establish bidirectional temporal graph edges via trivium_store.link()When the user sends a new message, the retrieval pipeline works in six stages:
| Stage | Algorithm | Purpose | Implementation |
|---|---|---|---|
| ① Vector recall | Cosine | Quickly find semantically similar candidates from the vector index | TriviumDB search_advanced |
| ② Graph diffusion | PEDSA + PPR | Propagate activation energy along dual-layer graph to discover logically related distant memories | TriviumDB built-in dual-layer graph |
| ③ NMF semantic analysis | Lee & Seung, 1999 | Decompose candidates into latent topics, evaluate query's semantic depth, topic coverage, and novelty | TriviumDB L3~L6 deep manifold |
| ④ FISTA residual discovery | Beck & Teboulle, 2009 | Use sparse coding to detect "unexplained" semantic residuals, triggering secondary retrieval for weak signals | TriviumDB enable_sparse_residual |
| ⑤ Co-occurrence boost | Statistical association | Enhance ranking of associated memories based on entity co-occurrence frequency | GraphGardener |
| ⑥ DPP diversity sampling | Kulesza & Taskar, 2012 | Use determinantal point processes to select the highest quality and most diverse results | TriviumDB enable_dpp |
Each conversation round updates a lightweight minGRU hidden state in real-time (256-dim, ~1.6MB params, inference <2ms pure CPU), letting the retrie
$ claude mcp add PeroCore \
-- python -m otcore.mcp_server <graph>