mycontext README

The project's README from github.com/openTrinity/mycontext. As one markdown file: README.md.

MyContext

GitHub stars GitHub issues GitHub last commit

English | 中文

Developer preview

MyContext is currently in developer preview and is iterating rapidly. THERE WILL BE COMPATIBILITY-BREAKING CHANGES.

Local data lives in an on-disk SQLite vault under versioned migrations. A migration can require you to re-run collection, and some changes may not be reversible — so do not treat this build as the only home for anything you cannot re-derive.

Your work already has context. MyContext makes it usable.

MyContext is a persistent personal work context layer for every individual. It is designed to connect the signals scattered across instant messaging, documents, calendars, meetings, approvals, local activity, and other work sources, then continuously organize them into a private, evolving view of what you know, who you work with, and what you are working on.

Instead of making every AI start from an empty prompt, MyContext provides a durable context layer that large language models, local agents, and authorized external AI applications can retrieve from and reason over. Your personal context stays under your control, and consequential actions stay behind explicit approval.

flowchart LR
  A["Work sources<br/>IM · Documents · Calendars · Meetings · Approvals · Local activity"]
  B["MyContext<br/>Private personal work context"]
  C["AI consumers<br/>Models · Local agents · Authorized AI apps"]
  A --> B --> C

Core experiences

Personal context graph

MyContext connects people, projects, topics, events, conversations, and supporting facts into a personal context graph. You can explore relationships from your own point of view, follow connections across sources, and return to the underlying evidence instead of relying on isolated summaries.

Digital self

Your digital self uses your personal context, communication patterns, and relationship-specific history to help handle everyday work conversations. It can understand incoming messages, recall relevant background, and prepare replies in your style. You remain in control: sending and other consequential actions require explicit authorization.

Search and answers

Ask questions across your work history in natural language. MyContext combines local full-text search, semantic retrieval, and graph queries, then lets an agent assemble an answer with traceable source material. If the agent runtime is unavailable, search falls back to ranked local results instead of silently inventing an answer.

From many sources to one personal context

MyContext separates source access from context consumption:

Data sources

The current codebase includes working ingestion paths for instant messaging conversations, documents, and meeting records. The source model is designed to expand to calendars, tasks and approvals, mail, local work artifacts, agent interactions, and additional online or offline sources without coupling the rest of the product to any single provider.

MyContext is not intended to become another silo. Its role is to connect personal work data once, maintain a coherent personal context over time, and make that context available to the AI tools the user chooses.

Architecture

The repository is organized into independent layers:

Principles

Status

MyContext is under active development. Its core desktop flow, local data layer, search and answer experience, personal context graph, and digital-self workflow are implemented, while supported sources and external integrations continue to expand. Treat it as an evolving working prototype rather than a finished product. Issues and pull requests are welcome.

License

Licensed under the Elastic License 2.0 — a source-available license: you may use, modify, and self-host it (including inside a company), but you may not offer it to third parties as a hosted or managed service. See LICENSE for the full terms; third-party components under kl-graph/ and vendor/ keep their own licenses.


MyContext(我的上下文)

中文 | English

开发者预览

MyContext 目前处于开发者预览阶段,迭代很快。会有破坏兼容性的改动。

本地数据存在磁盘上的 SQLite vault 里,跟着版本化迁移走。一次迁移可能要求你重新跑一遍采集,而某些改动是不可逆的 —— 所以不要把这个版本当成任何「重新生成不出来的东西」的唯一存放处。

你的工作本来就有上下文,MyContext 让它真正可用

MyContext 是为每个人构建的个人工作上下文记忆层。它面向即时通讯、文档、日历、会议、审批、本地活动及其他线上线下工作数据源,将原本散落的信息持续整理为一份私有、可演进的个人上下文:你知道什么、你在和谁协作、你正在推进什么。

MyContext 不让每个 AI 都从一段空白提示词重新开始,而是提供一层可持续使用的上下文,让大模型、本地 Agent 和经过授权的外部 AI 应用能够检索、理解并使用这些信息。个人上下文始终由用户掌控,有实际后果的操作始终需要明确授权。

flowchart LR
  A["工作数据源<br/>IM · 文档 · 日历 · 会议 · 审批 · 本地活动"]
  B["MyContext<br/>私有的个人上下文记忆"]
  C["AI 消费方<br/>大模型 · 本地 Agent · 授权的 AI 应用"]
  A --> B --> C

核心产品能力

记忆图谱

MyContext 将人物、项目、话题、事件、会话和相关事实连接成个人记忆图谱。用户可以从“我”的视角探索关系,沿着不同数据源之间的线索继续追溯,并回到原始依据,而不是只看到彼此孤立的摘要。

数字分身

数字分身使用你的个人上下文、沟通习惯和针对不同关系的历史信息,辅助处理日常工作对话。它可以理解新消息、召回相关背景,并以你的表达方式准备回复。控制权仍属于你:发送消息和其他有实际后果的操作需要明确授权。

搜索问答

用自然语言询问自己的工作历史。MyContext 结合本地全文检索、语义召回和图谱查询,再由 Agent 基于可追溯的来源组织答案。当 Agent 运行环境不可用时,搜索会明确降级为本地相关结果,而不是悄悄生成没有依据的答案。

从多个数据源到一份个人上下文

MyContext 将数据源接入与上下文消费解耦:

数据源

当前代码已经打通即时通讯对话、文档和会议记录的采集链路。统一数据源模型可以继续扩展到日历、待办与审批、邮件、本地工作产物、Agent 交互,以及更多线上或线下来源,而不让产品其他模块绑定某一个具体平台。

MyContext 不希望成为另一个信息孤岛。它的作用是一次连接个人工作数据,持续维护统一的个人上下文,再将这份上下文提供给用户选择的 AI 工具。

技术架构

仓库按职责拆分为相互独立的层:

产品原则

当前状态

MyContext 正在持续开发中。桌面端核心流程、本地数据层、搜索问答、记忆图谱和数字分身工作流已经实现,数据源覆盖与外部集成仍在扩展。现阶段请将它视为一个持续演进的可用原型,而不是已经完成的产品。欢迎提交 issue 与 PR。

许可

采用 Elastic License 2.0 —— 一份「源码可用」许可:可以使用、修改、自行部署(含在企业内部使用),但不得将其作为托管/管理服务提供给第三方。完整条款见 LICENSE;kl-graph/ 与 vendor/ 下的第三方组件各自适用其自身许可。

mycontext (openTrinity/mycontext)

Searching Database…

这是什么?MyContext 是一款本地优先的桌面应用。它能从你的消息、文档、会议和其他工作信号中,构建一个持久且不断演进的个人上下文层,并让 AI 智能体、本地大模型以及能按你的风格起草回复的“数字分身”都能使用这些上下文。
这是云服务,还是运行在我电脑上的程序?这是一款基于 Electron 和 React 构建的桌面应用。所有被索引的对话、文档以及衍生出的上下文,都存储在本地磁盘的 SQLite 库中,而不是存放在远程服务器上。
我该如何让它运行起来?克隆仓库,然后用 pnpm 运行:'pnpm run dev' 会以开发模式启动 Electron 桌面应用,而 'pnpm run build:app' 加上 electron-builder 则会生成打包好的 macOS 版本(dmg 文件)。
我需要先连接账号或搭建服务器吗?你需要授权各个数据源连接器(目前包括即时通讯对话、文档和会议记录),这样 MyContext 才能拉取你自己的数据。不需要任何外部服务器,因为所有处理和存储都在本地完成。
它稳定到可以日常依赖吗?不行。它明确标注为开发者预览版,预计会有破坏兼容性的改动。数据库迁移可能会迫使你重新运行数据收集,而且有些改动无法撤销,所以不要把它当作你唯一的数据副本,尤其是那些无法重新推导出来的内容。
我的个人工作数据会离开我的电脑吗?不会。个人工作数据和索引默认都保存在你的电脑上;AI 模型和智能体只能通过受控接口访问你的上下文;发送消息或其他有实际后果的操作,都需要你明确确认。
我能用它开发一款卖给其他公司的产品吗?不能作为托管服务来用。它采用 Elastic License 2.0 发布,允许你使用、修改和自行部署(包括在公司内部),但禁止以托管或受管理服务的形式提供给第三方。
数字分身和普通聊天机器人有什么不同?它会借助你的个人上下文、沟通习惯以及与特定联系人的往来历史来理解收到的消息,并按你自己的风格起草回复。但发送仍然需要你明确授权。
如果智能体运行时不可用,会怎样?搜索不会凭空编造答案,而是退回到按相关度排序的本地全文搜索结果,不会悄悄地瞎猜。
MyContext 目前实际能接入哪些数据源?目前它已经可以正常接入即时通讯对话、文档和会议记录。数据源模型的设计允许日后逐步扩展到日历、审批、邮件等更多类型。
为什么要构建个人上下文图谱,而不是另一个聊天摘要工具?这个图谱会把人物、项目、主题、事件和对话彼此关联起来,并保留原始证据。因此你可以把任何答案追溯到它的来源,而不必盲目相信某个孤立的摘要。
Size
124.9 MB
Stars
5K
Updated
CommitAug 31
Age
2mo
Commits · 90 Days