Skip to content

Repository files navigation

Elara

给数据工作者的本地 AI 同事——懂你的口径、每个数有出处、越用越强。

A local AI colleague for data workers: it knows your business definitions, every number it reports can be traced back, and it gets stronger each time you use it.

License Platform Status

English | 中文

Elara 主界面(浅色)

暗色主题:

Elara 主界面(暗色)

想先看界面:cd desktop && npm run dev:mock 可以在不配模型的情况下把整个界面跑起来。


它解决什么问题

如果你的日常是 Excel 和 CSV——做绩效、做运营、做财务——你大概遇到过这三件事:

  1. 同一句话,两个人算出两个数。 "下降超过 5 分"算不算等于 5?上个月没数据的人算不算下降? 这些规则通常没写下来,散在几个人的脑子里和几十个脚本里。
  2. AI 算的数不敢交给领导。 它给了个数字,你不知道它读了哪几行、按什么规则筛的、 中间丢了多少行。核对一遍的成本,比自己算还高。
  3. 同样的活,每个月重做一遍。 上次那个对话里 AI 明明做对了,这个月还得重新描述一遍需求, 还得祈祷它这次也做对。

Elara 是冲着这三件事去的。

三件事咬合成一个闭环

单个功能件市面上都有。Elara 的不同在于这三件事咬合在一起, 而且闭环产出的是你自己的资产——AI 可以换,资产搬不走。

1. 口径即资产

业务定义是一等公民。一张口径卡写清楚:名称、算法、适用范围、例外、版本、负责人。

AI 干活必须引用口径卡,并在回答里标明用了哪几张、什么版本。 改一次,处处生效——改完口径卡不用改一行代码,重跑工作流,结果自己跟着变。

企业 ChatBI 的语义层是 IT 自上而下部署在数仓上的。 Elara 做的是自下而上、业务人自己能维护、长在 Excel 工作流里的那一层。

2. 每个数有出处

关键数字带证据卡:来源文件与行数 → 处理脚本 → 口径版本 → 一键确定性复算。

复算是真的重新跑一遍再逐格比对,不是"看起来一样就算一样"。产出留痕,可审计。

3. 用一次沉淀一次

一次做对的会话,可以一键编译成确定性技能:脚本 + 中文表单 + 口径引用。

第二次起不调模型、零成本、结果恒定。实测:编译出来的技能换一组新数据跑, 1.4 秒、花费 $0、结果与当初 AI 现算的一致。


你的数据在哪

这一节写在前面,因为它是很多人决定用不用的第一个问题。

你的数据不在别人的临时容器里,它一直在你自己的电脑上。

  • 明细永远只在本机被代码处理。 模型看得到的只有:列名、脱敏样本、聚合值。 这不靠自觉,是护栏钩子强制的——模型想直接读 .xlsx/.csv 的明细会被当场拦下。
  • 原件不可写。 处理产生的是新文件,你上传的那份字节不变。
  • 你的资产库在 %USERPROFILE%\.elara(可通过 ELARA_HOME 改): 口径卡、证据链、技能、记忆、审计记录,全都是本机 SQLite 文件。卸载 Elara 不会删它。
  • 模型后端你自己配。 支持 Anthropic 官方与 Anthropic 兼容端点(如 DeepSeek)。 用哪家、密钥放哪是你的选择——密钥只存在你本机的 config.json 里, 这个仓库里没有也不会有任何密钥。

⚠️ 不要把 ELARA_HOME 指向这个仓库目录,也不要指向任何被 git 管理的目录。 你的口径卡和编译出来的技能脚本里含有真实的文件名与列名, 它们属于你的资产库,不该进版本控制。


快速开始

Releases 下载安装包,双击装。默认装在 %LOCALAPPDATA%\Programs\Elara

⚠️ Windows 会拦一下。 目前的安装包没有代码签名证书,SmartScreen 会提示 "未知发布者"。点「更多信息」→「仍要运行」即可。这是未签名程序的通用行为, 不是它检出了什么问题。(证书方案见已知限制。)

⚠️ 静默安装参数只在 cmd 或 PowerShell 里传。 在 Git Bash / MSYS 终端里执行 安装包.exe /S/S 会被路径转换吃成 S:/, 安装器根本收不到静默参数——会当成普通安装跑起来,装到你想不到的地方去。

装完首次启动,去设置里填模型配置即可。

从源码跑

需要 Python 3.12+ 和 Node 20+。

cd engine && pip install -r requirements.txt && python run.py
cd desktop && npm install && npm run dev

不想配模型也想看界面:

cd desktop && npm run dev:mock

更多见 CONTRIBUTING.md


技术形态

用什么
Electron + React + Vite
引擎 Python FastAPI,默认端口 8320;Claude Agent SDK 跑多模型
资产基座 SQLite(WAL)——口径卡、证据链、技能、记忆、审计、运行记录
壳↔引擎 HTTP + 握手文件(pid/port/token)+ Bearer 鉴权,全在 localhost

模型后端:除 Anthropic 官方与 Anthropic 兼容端点外,还支持 OpenAI 兼容端点 (通义/Qwen/DeepSeek 的 OpenAI 协议端点等)——引擎在本机自起一个翻译桥, 把 Anthropic 协议现场翻成 OpenAI 协议,配置里把 provideropenai_compatible 即可。 四种接法逐家示例见 docs/API接入指南.md;配置没填好时, 主界面左下会提前提示缺什么,不用等发消息才发现。

资产可分享:口径卡可导成口径包、编译技能可导成技能包,发给同事导入即用; 多步工作流也能整体编译成一个零成本技能。资产不锁在单机,也不锁在某个模型上。

接口契约见 docs/引擎API契约-v0.md, 机器可读快照 docs/api-schema.json(有漂移测试盯着)。

已知限制

老实列在这里,省得你踩:

  • 只支持 Windows。 macOS / Linux 没做。
  • 安装包没有代码签名,SmartScreen 会拦(见上)。
  • 中文用户名的 Windows 账户尚未完整实测。 工程上已按 UTF-8 + pathlib 处理, 但没有在真实的中文用户名环境里端到端跑过。如果你是这种环境并且踩到了问题, 开个 issue 会很有帮助。
  • 安装包 230 MB,装完占盘约 827 MB。 大头是内嵌的模型运行时—— 代价换来的是"双击就能用、不用先装一堆东西"。
  • OpenAI 兼容端点的工具调用稳定性参差。 翻译桥尽力映射,但各厂商对 function calling 的支持不一;实测不稳的端点建议回落到 Anthropic 兼容端点。

项目状态

Open Preview。核心闭环(口径 → 证据 → 编译)已经打通并有验收实验实证, 多步工作流编译、技能/口径包分享、多模型接入也已落地。 首批用户是一个真实的部门数据团队,Elara 在他们的月度工作里做 dogfood。

参与

欢迎,中文英文都行。请先看 CONTRIBUTING.md—— 里面有几条实打实踩出来的规矩,尤其是关于"怎么证明你的改动是对的"。

许可

Apache License 2.0。桌面壳的架构与实现思路借鉴了开源项目 openhanako, 详见 NOTICE


English

A local AI colleague for data workers — it knows your business definitions, every number it reports can be traced back, and it gets stronger each time you use it.

The problem

If your day job runs on Excel and CSV, you have probably hit these three walls:

  1. The same sentence produces two different numbers. Does "dropped by more than 5" include exactly 5? Do people with no data last month count as having dropped? These rules usually live in a few people's heads and a few dozen scripts.
  2. You can't hand an AI's number to your boss. It gave you a figure, but you don't know which rows it read, what rule it filtered by, or how many rows were dropped on the way. Verifying costs more than doing it yourself.
  3. The same work, redone every month. The AI got it right last time; this month you describe it all over again and hope it gets it right again.

Three things that lock together

Individually none of these are new. The point is that they interlock, and what the loop produces is your own asset — you can swap the AI, the asset stays.

  1. Definitions are assets. A caliber card records name, algorithm, scope, exceptions, version and owner. The AI must cite the cards it used, with versions. Edit a card once and it takes effect everywhere, with no code changes.
  2. Every number is traceable. Key figures carry an evidence card: source files and row counts → processing script → caliber version → one-click deterministic recomputation. Recomputation genuinely re-runs and compares cell by cell.
  3. Use once, keep forever. A session that got it right compiles into a deterministic skill (script + form + caliber references). From the second run on: no model call, zero cost, identical results. Measured: 1.4 s, $0, matching what the AI computed live.

Where your data lives

Your data isn't sitting in someone else's ephemeral container. It stays on your own computer.

Row-level data is only ever processed by code on your machine; the model sees column names, redacted samples and aggregates — enforced by a hook, not by good intentions. Your original files are never modified. Your asset store is a local SQLite database under %USERPROFILE%\.elara, and uninstalling Elara does not delete it. You bring your own model backend and your own key; this repository contains no keys and never will.

⚠️ Do not point ELARA_HOME at this repository, or at any git-managed directory — your caliber cards and compiled skills contain real file and column names.

Quick start

Download the installer from Releases, or run from source with Python 3.12+ and Node 20+:

cd engine && pip install -r requirements.txt && python run.py
cd desktop && npm install && npm run dev

Want to see the UI without configuring a model? npm run dev:mock.

⚠️ The installer is not code-signed; SmartScreen will warn about an unknown publisher. Click More infoRun anyway.

⚠️ Pass silent-install flags from cmd or PowerShell only. In Git Bash/MSYS, /S is path-translated into S:/ and the installer never receives it.

Known limitations

Windows only. The installer is unsigned. Not yet fully tested on Windows accounts with non-ASCII (e.g. Chinese) user names — handled with UTF-8 and pathlib, but not verified end to end; reports are welcome. The installer is 230 MB and about 827 MB on disk after installation (an embedded model runtime, in exchange for zero setup). Tool-calling support on OpenAI-compatible endpoints varies by provider — the local translation bridge maps it best-effort; if an endpoint is unstable, fall back to an Anthropic-compatible endpoint.

Status

Open Preview. The core loop (calibers → evidence → compilation) works and is backed by acceptance experiments; multi-step workflow compilation, skill/caliber-pack sharing, and multi-model support are in too. Early users are a real departmental data team who dogfood it in their monthly work.

Contributing

Welcome, in Chinese or English. Please read CONTRIBUTING.md first — it contains a handful of hard-won house rules, especially about how to prove a change is correct.

License

Apache License 2.0. The desktop shell's architecture draws on the open source project openhanako — see NOTICE.

About

给数据工作者的本地 AI 同事——懂你的口径、每个数有出处、越用越强。A local AI colleague for data workers: business definitions as assets, every number traceable, use once and keep forever.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages