KIAgent
Personal digital memory: a desktop app that indexes your mail, chats, and documents into a local SQLite corpus on your machine — parsing and OCR run on-device via llama.cpp — and serves them to any MCP client. Local server on 127.0.0.1, plus an optional per-user remote endpoint (you.localkiagent.com) whose TLS terminates on your own device.
README
<p align="center"> <img src="assets/icon.png" alt="KIAgent logo" width="112"> </p>
<h1 align="center">KIAgent</h1>
<p align="center"><strong>Your knowledge, indexed locally.</strong></p>
<p align="center"> <a href="https://localkiagent.com/">Website</a> · <a href="https://localkiagent.com/download">Download</a> · <a href="docs/architecture">Architecture docs</a> </p>
<p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License: MIT"></a> <a href="https://localkiagent.com/download"><img src="https://img.shields.io/badge/platform-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-blue.svg" alt="Platforms"></a> </p>
<p align="center"> <img src="docs/assets/readme/hero.png" alt="KIAgent main window — Sources screen with Gmail and HubSpot syncing" width="100%"> </p>
KIAgent is a desktop app that ingests your personal data — mail, documents, chats, notes — on your own machine, stores it in a local database, and serves it to AI assistants over MCP. Everything stays on your computer: ingestion, parsing, OCR and vision all run locally — with on-device inference powered by llama.cpp — so your AI assistant can know your data without your data ever leaving your machine.
At its core, KIAgent is a platform: a small set of host capabilities (MCP, database, local LLM, filesystem, web access) wired together by an ingestion engine, plus a plugin/extension system that lets sandboxed connectors use those capabilities to bring in new data sources.
flowchart TB
GMAIL(["Gmail"])
DRIVE(["Drive"])
SLACK(["Slack"])
NOTION(["Notion"])
MORE(["…"])
PLUGINS["Plugins / extensions"]
WEB["Web"]
LLM["Local LLM"]
FS["Filesystem"]
DB[("DB")]
MCP["MCP"]
GMAIL --> PLUGINS
DRIVE --> PLUGINS
SLACK --> PLUGINS
NOTION --> PLUGINS
MORE --> PLUGINS
PLUGINS <--> WEB
PLUGINS <--> LLM
PLUGINS <--> FS
PLUGINS <--> DB
DB --> MCP
classDef service fill:#e8f0fe,stroke:#4285f4,color:#1a3c78
classDef core fill:#e6f4ea,stroke:#34a853,color:#1e4620
classDef hub fill:#fce8e6,stroke:#ea4335,color:#7a1c14,stroke-width:2px
class GMAIL,DRIVE,SLACK,NOTION,MORE service
class WEB,LLM,FS,DB,MCP core
class PLUGINS hub
Plugins sit at the center: each one connects to a third-party service (Gmail, Drive, Slack, Notion, ...) or the local filesystem, pulls your data in, uses the local LLM to process it, and lands it in the database — which MCP then serves to AI assistants. Access is mediated and permission-gated; plugins never touch these capabilities directly.
This repo: kiagent-core
This repository is the MIT-licensed core that KIAgent is built from, in the same spirit as VS Code and Code-OSS:
- kiagent-core (this repo) — the open-source core.
npm run package:ossproduces an unbrandedkiagent-corebuild you can run and redistribute under the MIT license. - KIAgent — the branded, signed product built from this core and distributed at localkiagent.com/download.
OAuth-backed sources (Gmail, Microsoft) read client credentials from the environment at build time — see .env.example / CI secrets. Forks and OSS builds supply their own OAuth client IDs.
Main components
- Ingestion engine (
src/main/core/engine) — pulls batches from sources on a cadence, converts raw items (mail, PDFs, images) into indexed documents, and commits them to the store. Built-in sources live insrc/main/sources(Gmail, IMAP, Microsoft 365, local folders). - Database (
src/main/core/store,src/main/db) — a SQLite corpus (better-sqlite3) holding documents, metadata and search indexes, written by the app and read by the MCP processes. - MCP server (
src/main/core/mcp,src/main/mcp) — exposes the corpus to AI assistants over two transports sharing one tool registry: an HTTP server inside the app, and a standalone stdio entry point that clients like Claude Desktop spawn directly. - Local LLM (
src/main/providers/local-llm,src/main/providers/apple-vision) — on-device inference via a bundled llama.cpp server (backend auto-detection, curated model tiers) plus native OCR/vision helpers for scanned documents and images. - Filesystem — local-folder ingestion, model storage, temp workspaces for conversion workers (
src/main/workers,src/main/converter). - Web — outbound HTTP for source APIs, OAuth flows (
src/main/auth,src/main/platform/oauth-providers.ts), and marketplace downloads. - Plugin / extension system (
src/main/platform,src/main/marketplace) — connectors run in isolated host processes with a manifest-declared, permission-gated view of the platform (sources, auth, storage, network). A GitHub-backed marketplace handles discovery, install and updates. A second, privileged tier lets a product build ship first-party extensions inside the app package itself — seedocs/architecture/extension-platform.mdfor the full model, including the bundled/unsafe.mainProcesstier andproduct.json. - Renderer (
src/renderer) — the React UI: source setup, marketplace, MCP connection status, settings and logs.
Developing
npm install
npm start # run in development (hot reload)
Other useful scripts:
npm test # jest test suites
npm run lint # eslint + prettier
npm run typecheck # tsc, no emit
npm run package # build a distributable
npm run package:oss # build an unbranded kiagent-core distributable
npm run vendor:inference # fetch llama.cpp server + build vision helper
Repository layout
src/main Electron main process: engine, store, MCP, platform, sources, providers
src/renderer React UI (screens: Sources, Marketplace, Connection, Settings)
src/shared Contracts and UI primitives shared across processes
concept/ Types-only blueprint for the core redesign
docs/ Design specs and implementation plans
native/ Native helper sources (vision/OCR)
scripts/ Build and vendoring scripts
MCP directories
KIAgent is published on the official MCP registry as com.localkiagent/kiagent (see server.json) and listed on Glama:
Acknowledgements
KIAgent's on-device inference is powered by llama.cpp, created by Georgi Gerganov and maintained by the ggml-org community (MIT license). The app bundles prebuilt llama-server binaries from the official llama.cpp releases (npm run vendor:inference fetches them at build time). Running capable models privately on consumer hardware is only practical because of their work — thank you.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。