MCPcopy Index your code
hub / github.com/MaxMiksa/Gravity

github.com/MaxMiksa/Gravity @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,084 symbols 2,793 edges 219 files 177 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Gravity

版本 Desktop 许可证    English

本地优先(默认本地存储)| 开源可审计 | Chat / Agent 双模式
多供应商接入 | 文件解析对话 | 流式输出 | Skills & MCP
Windows / macOS | OpenAI 兼容接口 | Anthropic Agent 工作流

Gravity 是一个面向生产效率的 AI 桌面应用,核心目标是把通用对话、自动化 Agent 与本地数据安全放到同一个工作流里。 你可以从聊天开始,也可以在 Agent 模式中把多步骤任务交给 AI 持续执行。

🎬 可视化演示

Gravity Agent Mode

✨ 核心特性

功能 描述
🤖 Chat / Agent 双模式 既支持常规对话,也支持自主执行任务的 Agent 工作流
🔌 多供应商渠道 支持 Anthropic、OpenAI、Google、DeepSeek、MiniMax、Kimi、智谱 GLM 及 OpenAI 兼容端点
📎 文件与文档解析 支持图片上传,支持 PDF / Office / 文本内容注入对话
🌊 流式与思考展示 实时流式输出,可视化思考过程
🧩 Skills 与 MCP 默认 Skills,可通过对话安装扩展能力
🏠 本地优先 数据默认存储在 ~/.gravity/,无中心数据库

🚀 快速使用(推荐路径)

  1. 下载最新版本:GitHub Releases
  2. 启动应用后进入 设置 > 渠道管理,添加你的 API Key 并测试连接。
  3. 在 Chat 模式直接对话,或在 Agent 模式选择 Anthropic 渠道后执行任务。

Requirements & Limits(环境要求与限制)

  • Agent 模式需要可用的 Node.js 与 Git 运行环境。
  • Agent 模式当前依赖 Anthropic 渠道。
  • 本地数据默认写入 ~/.gravity/,请确保目录有读写权限。

Developer Guide(本地开发)

# 1) 安装依赖
bun install

# 2) 避免 Electron 以 Node 模式运行(Windows 常见问题)
Remove-Item Env:ELECTRON_RUN_AS_NODE -ErrorAction SilentlyContinue

# 3) 启动开发模式(Vite + Electron)
npm run dev

# 4) 构建
npm run build

Troubleshooting / Known Issues(常见问题)

  • ERR_CONNECTION_REFUSED:通常是只启动了 Electron,未启动 Vite dev server,请使用 npm run dev
  • whenReady 相关报错:先清理环境变量 ELECTRON_RUN_AS_NODE 后重启。
  • 5173 端口冲突:关闭占用进程或修改 Vite 端口配置。

开源许可

MIT

🤝 贡献与联系

欢迎提交 Issue 和 Pull Request!
如有任何问题或建议,请联系 Zheyuan (Max) Kong (卡内基梅隆大学,宾夕法尼亚州)。

Zheyuan (Max) Kong: kongzheyuan@outlook.com | zheyuank@tepper.cmu.edu

Extension points exported contracts — how you extend this code

ProviderAdapter (Interface)
(no doc) [6 implementers]
packages/core/src/providers/types.ts
CodeElementProps (Interface)
react-markdown 传入的 元素 props
packages/ui/src/code-block/CodeBlock.tsx
UpdateProgress (Interface)
更新进度信息
apps/electron/src/renderer/vite-env.d.ts
Workspace (Interface)
(no doc)
packages/shared/src/types/index.ts
GooglePart (Interface)
Google 内容部分
packages/core/src/providers/google-adapter.ts
CodeBlockProps (Interface)
(no doc)
packages/ui/src/code-block/CodeBlock.tsx
UpdateStatus (Interface)
更新状态(与 updater-types.ts 保持一致)
apps/electron/src/renderer/vite-env.d.ts
NodeJsCheckResult (Interface)
(no doc)
packages/shared/src/types/environment.ts

Core symbols most depended-on inside this repo

cn
called by 160
apps/electron/src/renderer/lib/utils.ts
run_git
called by 28
scripts/history_rewrite/history_common.py
has
called by 24
packages/shared/src/agent/tool-matching.ts
getConfigDir
called by 11
apps/electron/src/main/lib/config-paths.ts
setStatus
called by 8
apps/electron/src/main/lib/updater/auto-updater.ts
formatMessageTime
called by 7
apps/electron/src/renderer/components/chat/ChatMessageItem.tsx
getAgentWorkspacePath
called by 7
apps/electron/src/main/lib/config-paths.ts
readConfig
called by 7
apps/electron/src/main/lib/channel-manager.ts

Shape

Function 698
Interface 205
Method 160
Class 21

Languages

TypeScript67%
Python33%

Modules by API surface

apps/electron/src/renderer/components/agent/ToolActivityItem.tsx24 symbols
apps/electron/src/main/lib/channel-manager.ts24 symbols
apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx22 symbols
apps/electron/default-skills/xlsx/scripts/office/validators/base.py22 symbols
apps/electron/default-skills/pptx/scripts/office/validators/base.py22 symbols
apps/electron/default-skills/docx/scripts/office/validators/base.py22 symbols
apps/electron/src/main/lib/config-paths.ts21 symbols
apps/electron/src/renderer/components/ai-elements/message.tsx20 symbols
packages/shared/src/agent/tool-matching.ts18 symbols
apps/electron/src/main/lib/agent-workspace-manager.ts18 symbols
apps/electron/src/main/lib/agent-service.ts18 symbols
packages/shared/src/types/agent.ts16 symbols

For agents

$ claude mcp add Gravity \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact