{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/icon.png\" alt=\"KIAgent logo\" width=\"112\">\n</p>\n\n<h1 align=\"center\">KIAgent</h1>\n\n<p align=\"center\"><strong>Your personal AI brain — local, open source, speaks MCP.</strong></p>\n\n<p align=\"center\">\n  <a href=\"https://localkiagent.com/\">Website</a> ·\n  <a href=\"https://localkiagent.com/download\">Download</a> ·\n  <a href=\"docs/architecture\">Architecture docs</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-green.svg\" alt=\"License: MIT\"></a>\n  <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>\n</p>\n\n<p align=\"center\">\n  <img src=\"docs/assets/readme/hero.png\" alt=\"KIAgent main window — Sources screen with Gmail and HubSpot syncing\" width=\"100%\">\n</p>\n\nEveryone is building the company a brain — a knowledge layer that ingests everything an organization knows, so AI can answer and act with real context. **KIAgent is that layer for you personally.** A company brain lives in someone else's cloud and belongs to your employer; your personal AI brain runs on your own machine, works with whatever AI you choose, and is yours forever.\n\nConcretely, 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](https://modelcontextprotocol.io). Everything stays on your computer: ingestion, parsing, OCR and vision all run locally — with on-device inference powered by [llama.cpp](https://github.com/ggml-org/llama.cpp) — so your AI assistant can know your world without your data ever leaving your machine.\n\nAt 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.\n\n```mermaid\nflowchart TB\n    GMAIL([\"Gmail\"])\n    DRIVE([\"Drive\"])\n    SLACK([\"Slack\"])\n    NOTION([\"Notion\"])\n    MORE([\"…\"])\n\n    PLUGINS[\"Plugins / extensions\"]\n\n    WEB[\"Web\"]\n    LLM[\"Local LLM\"]\n    FS[\"Filesystem\"]\n    DB[(\"DB\")]\n    MCP[\"MCP\"]\n\n    GMAIL --> PLUGINS\n    DRIVE --> PLUGINS\n    SLACK --> PLUGINS\n    NOTION --> PLUGINS\n    MORE --> PLUGINS\n    PLUGINS <--> WEB\n    PLUGINS <--> LLM\n    PLUGINS <--> FS\n    PLUGINS <--> DB\n    DB --> MCP\n\n    classDef service fill:#e8f0fe,stroke:#4285f4,color:#1a3c78\n    classDef core fill:#e6f4ea,stroke:#34a853,color:#1e4620\n    classDef hub fill:#fce8e6,stroke:#ea4335,color:#7a1c14,stroke-width:2px\n\n    class GMAIL,DRIVE,SLACK,NOTION,MORE service\n    class WEB,LLM,FS,DB,MCP core\n    class PLUGINS hub\n```\n\nPlugins 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.\n\n## This repo: kiagent-core\n\nThis repository is the MIT-licensed core that KIAgent is built from, in the same spirit as VS Code and Code-OSS:\n\n- **kiagent-core** (this repo) — the open-source core. `npm run package:oss` produces an unbranded `kiagent-core` build you can run and redistribute under the MIT license.\n- **[KIAgent](https://localkiagent.com/)** — the branded, signed product built from this core and distributed at [localkiagent.com/download](https://localkiagent.com/download).\n\nOAuth-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.\n\n## Main components\n\n- **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 in `src/main/sources` (Gmail, IMAP, Microsoft 365, local folders).\n- **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.\n- **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.\n- **Local LLM** (`src/main/providers/local-llm`, `src/main/providers/apple-vision`) — on-device inference via a bundled [llama.cpp](https://github.com/ggml-org/llama.cpp) server (backend auto-detection, curated model tiers) plus native OCR/vision helpers for scanned documents and images.\n- **Filesystem** — local-folder ingestion, model storage, temp workspaces for conversion workers (`src/main/workers`, `src/main/converter`).\n- **Web** — outbound HTTP for source APIs, OAuth flows (`src/main/auth`, `src/main/platform/oauth-providers.ts`), and marketplace downloads.\n- **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 — see [`docs/architecture/extension-platform.md`](docs/architecture/extension-platform.md) for the full model, including the bundled/`unsafe.mainProcess` tier and `product.json`.\n- **Renderer** (`src/renderer`) — the React UI: source setup, marketplace, MCP connection status, settings and logs.\n\n## Developing\n\n```bash\nnpm install\nnpm start          # run in development (hot reload)\n```\n\nOther useful scripts:\n\n```bash\nnpm test                 # jest test suites\nnpm run lint             # eslint + prettier\nnpm run typecheck        # tsc, no emit\nnpm run package          # build a distributable\nnpm run package:oss      # build an unbranded kiagent-core distributable\nnpm run vendor:inference # fetch llama.cpp server + build vision helper\n```\n\n## Repository layout\n\n```\nsrc/main       Electron main process: engine, store, MCP, platform, sources, providers\nsrc/renderer   React UI (screens: Sources, Marketplace, Connection, Settings)\nsrc/shared     Contracts and UI primitives shared across processes\nconcept/       Types-only blueprint for the core redesign\ndocs/          Design specs and implementation plans\nnative/        Native helper sources (vision/OCR)\nscripts/       Build and vendoring scripts\n```\n\n## MCP directories\n\nKIAgent is published on the [official MCP registry](https://registry.modelcontextprotocol.io/v0/servers?search=kiagent) as `com.localkiagent/kiagent` (see [`server.json`](server.json)) and listed on Glama:\n\n[![kiagent-core MCP server](https://glama.ai/mcp/servers/edjafarov/kiagent-core/badges/card.svg)](https://glama.ai/mcp/servers/edjafarov/kiagent-core)\n\n## Acknowledgements\n\nKIAgent's on-device inference is powered by **[llama.cpp](https://github.com/ggml-org/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.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 7604,
  "sha": "08946a97e6e72cb433ef63059172f9a535a420c1ae7657dee9e1ebab3cbb1fe2",
  "repo_slug": "edjafarov/kiagent-core",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_localkiagent_kiagent_2fead820/readme"
}