$ account CherryHQ
CherryStudio is a cross-platform desktop AI assistant built with Electron and React. It provides a unified chat interface that supports dozens of LLM providers (OpenAI, Anthropic, Google, Groq, local models via Ollama, etc.) through a pluggable provider registry and the Vercel AI SDK. Beyond chat, it offers knowledge base management with RAG (vector indexing via sqlite-vec, chunking, embedding), file processing (OCR with Tesseract/PaddleOCR, document parsing), web search, image generation, MCP (Model Context Protocol) tool integration, and code CLI management (Claude Code, OpenAI Codex). The application is organized as a pnpm monorepo with separate packages for the UI component library, AI core runtime, provider registry, and tracing infrastructure. Architecturally, the app follows an Electron main/renderer process split with typed IPC communication using Zod schemas. The main process handles AI inference, database operations (SQLite via Drizzle ORM), file management, and native integrations. The renderer is a React SPA using TanStack Router, SWR for data fetching, and a custom UI component library with extensive icon sets for providers and models. The AI runtime layer abstracts provider-specific details through adapters and supports streaming, tool calls, agent sessions, and context compaction. Key data flows include: user input → composer → IPC → AI runtime → provider API → streaming response → renderer. Knowledge base ingestion follows: file upload → OCR/parsing → chunking → embedding → vector store. The application also supports offline usage with local embedding models and ONNX runtime. External dependencies include native binaries for OCR and vector search, and the AI SDK ecosystem.