一、项目概述
1.1 项目背景
在 AI Agent(智能代理)快速发展的今天,我们面临着一个核心问题:大多数 AI 助手需要从零开始学习用户,需要花费数天甚至数周才能真正了解你的技术栈和工作流。
OpenHuman 项目正是为了解决这个问题而生。它是一个开源的个人 AI 超级智能助手,设计目标是:
OpenHuman is your Personal AI super intelligence. Private, Simple and extremely powerful.
1.2 项目基本信息
| 属性 | 详情 |
|---|
| 项目名称 | OpenHuman |
| GitHub 仓库 | tinyhumansai/openhuman |
| 当前版本 | v0.53.43(2026年5月13日) |
| 开源协议 | GNU GPL-3.0 |
| 项目状态 | Early Beta(早期测试版,积极开发中) |
| Star 数量 | 10.8k+ ⭐ |
| Fork 数量 | 933+ |
| 总提交数 | 1,928+ |
| 本周新增 Star | +629(2026年5月9-15日) |
1.3 核心理念
┌──────────────────────────────────────────────────────────────────┐
│ OpenHuman 核心理念 │
├──────────────────────────────────────────────────────────────────┤
│ │
│ 🔒 私密性 (Private) │
│ → 数据本地存储,不上传云端 │
│ → 本地加密,数据归用户所有 │
│ │
│ 🎯 简洁性 (Simple) │
│ → 无需复杂配置,几分钟内即可上手 │
│ → 干净的桌面 UI,无需终端操作 │
│ │
│ ⚡ 强大性 (Powerful) │
│ → 118+ 第三方集成 │
│ → 智能记忆系统 │
│ → 多模型路由 │
│ │
└──────────────────────────────────────────────────────────────────┘
二、核心功能详解
2.1 功能架构图
┌─────────────────────────────────────────────────────────────────────┐
│ OpenHuman 功能架构 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ │
│ │ 1. 桌面吉祥物 (Mascot) │ │
│ │ → 有"脸"的 AI,会说话、对环境做出反应 │ │
│ │ → 可加入 Google Meet 会议 │ │
│ │ → 跨周记住用户信息 │ │
│ └─────────────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ 2. 118+ 第三方集成 + 自动抓取 │ │
│ │ → Gmail、Notion、GitHub、Slack、Stripe │ │
│ │ → Calendar、Drive、Linear、Jira │ │
│ │ → 每 20 分钟自动同步数据 │ │
│ └─────────────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ 3. Memory Tree + Obsidian Wiki │ │
│ │ → 本地优先的知识库 │ │
│ │ → ≤3k token 的 Markdown 块 │ │
│ │ → 层级摘要树存储在本地 SQLite │ │
│ └─────────────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ 4. 内置工具集 (Batteries Included) │ │
│ │ → 网络搜索 + 网页抓取 │ │
│ │ → 完整编码工具集 │ │
│ │ → 原生语音(STT + TTS) │ │
│ └─────────────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ 5. TokenJuice(智能 Token 压缩) │ │
│ │ → HTML → Markdown 转换 │ │
│ │ → 长 URL 缩短 │ │
│ │ → 降低成本和延迟高达 80% │ │
│ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
2.2 功能详解表格
| 功能模块 | 详细说明 | 技术实现 |
|---|
| 桌面吉祥物 | AI 有可视化"脸",能说话、对环境做出反应,可作为真实参与者加入 Google Meet 会议 | CEF(Chromium Embedded Framework)渲染 |
| 118+ 第三方集成 | 支持 Gmail、Notion、GitHub、Slack、Stripe、Calendar、Drive、Linear、Jira 等 | OAuth 2.0 授权,自动 token 管理 |
| 自动抓取 | 每 20 分钟自动循环拉取最新数据到记忆树 | 调度器 + 增量同步机制 |
| Memory Tree | 本地优先的知识库,所有连接数据被规范化为 ≤3k token 的 Markdown 块 | SQLite + Markdown 文件双存储 |
| Obsidian 兼容 | 同步生成 .md 文件,兼容 Obsidian vault | 文件系统监听 + 实时同步 |
| 网络搜索 | 内置搜索引擎集成 | 外部 API 调用 + 结果缓存 |
| 网页抓取 | Web-scraper 工具,自动提取网页内容 | HTML 解析 + Markdown 转换 |
| 编码工具集 | 文件系统、Git、Lint、Test、Grep 等完整工具 | Rust 原生实现,高性能 |
| 原生语音 | STT 输入 + ElevenLabs TTS 输出 + 吉祥物唇形同步 | 语音识别 + 语音合成 + 动画同步 |
| 模型路由 | 自动将任务分配给合适的 LLM(推理型/快速型/视觉型) | 任务分类 + 模型选择算法 |
| TokenJuice | 智能 Token 压缩,所有工具调用、抓取结果在传入 LLM 前均经过压缩 | HTML→MD 转换 + 内容摘要 |
| 本地 AI | 通过 Ollama 支持设备端推理 | Ollama API 集成 |
| 消息渠道 | 支持跨渠道收发消息 | WebSocket + HTTP RPC |
| 隐私安全 | 工作流数据留在设备本地,本地加密 | AES 加密 + 本地存储 |
三、技术架构深度分析
3.1 整体架构设计
OpenHuman 采用 三层架构,清晰分离关注点:
┌──────────────────────────────────────────────────────────────────┐
│ OpenHuman 三层架构 │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Layer 1: Tauri Shell(外壳层) │ │
│ │ - 窗口管理 │ │
│ │ - 进程生命周期管理 │ │
│ │ - CEF 子 WebView │ │
│ │ - IPC 通信桥接 │ │
│ └───────────────────────────────────────────────────────┘ │
│ ↕ JSON-RPC (HTTP) │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Layer 2: Rust Core(核心层)⚙️ │ │
│ │ - Memory Tree Pipeline(记忆树管道) │ │
│ │ - Integration Adapters(集成适配器) │ │
│ │ - Provider Router(模型路由器) │ │
│ │ - TokenJuice(Token 压缩) │ │
│ │ - Native Tools(原生工具集) │ │
│ │ - Voice(语音模块) │ │
│ └───────────────────────────────────────────────────────┘ │
│ ↕ coreRpcClient 调用 │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Layer 3: React Frontend(前端层) │ │
│ │ - 页面与导航 │ │
│ │ - RPC 调用 │ │
│ │ - 纯展示层,无业务逻辑 │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────┘
3.2 技术栈详解
3.2.1 编程语言分布
| 语言 | 占比 | 用途 |
|---|
| Rust | 69.4% | 核心业务逻辑、性能关键模块 |
| TypeScript | 25.8% | 前端 UI、类型安全的 JavaScript |
| JavaScript | 2.6% | 脚本工具、构建配置 |
| Shell | 1.8% | 安装脚本、自动化任务 |
| CSS | 0.2% | 样式定制 |
| HTML | 0.1% | 静态页面 |
| 其他 | 0.1% | 配置、文档等 |
3.2.2 主要技术组件
const techStack = {
desktopFramework: "Tauri v2 (Rust + Web 前端)",
cef: "Chromium Embedded Framework",
database: "SQLite (本地存储)",
packageManager: "pnpm (monorepo 工作区)",
voice: "ElevenLabs TTS + STT",
localAI: "Ollama 集成",
knowledgeBase: "Obsidian 兼容 Markdown vault"
};
3.2.3 构建工具要求
| 工具 | 版本要求 | 用途 |
|---|
| Node.js | 24+ | JavaScript 运行时 |
| pnpm | 10.10.0 | 包管理器 |
| Rust | 1.93.0 | 系统编程语言(含 rustfmt + clippy) |
| CMake | 最新稳定版 | 构建系统 |
| Ninja | 最新稳定版 | 构建加速器 |
| ripgrep | 最新稳定版 | 代码搜索工具 |
3.3 核心模块详解
3.3.1 Rust Core 模块结构
src/
├── memory_tree/
│ ├── pipeline.rs
│ ├── chunk.rs
│ ├── score.rs
│ └── summarize.rs
├── integrations/
│ ├── gmail.rs
│ ├── notion.rs
│ ├── github.rs
│ └── scheduler.rs
├── router/
│ ├── provider.rs
│ ├── model.rs
│ └── route.rs
├── token_juice/
│ ├── compress.rs
│ ├── html2md.rs
│ └── shorten.rs
├── tools/
│ ├── fs.rs
│ ├── git.rs
│ ├── search.rs
│ └── fetch.rs
└── voice/
├── stt.rs
├── tts.rs
└── meet.rs
3.3.2 数据流 Pipeline(10 步详解)
pub struct DataPipeline {
step1_connect: OAuthProvider,
step2_auto_fetch: Scheduler,
step3_canonicalize: Canonicalizer,
step4_chunk: Chunker,
step5_store: Storage,
step6_score: Scorer,
step7_summarize: Summarizer,
step8_retrieve: Retriever,
step9_compress: Compressor,
step10_route: Router,
}
四、与其他 AI 助手对比
4.1 综合对比表
| 功能特性 | Claude Cowork | OpenClaw | Hermes Agent | OpenHuman |
|---|
| 开源 | 🚫 专有 | ✅ MIT | ✅ MIT | ✅ GNU GPL |
| 易上手 | ✅ 桌面+CLI | ⚠️ 终端优先 | ⚠️ 终端优先 | ✅ 干净UI,分钟级 |
| 费用 | ⚠️ 订阅+附加 | ⚠️ 自带模型 | ⚠️ 自带模型 | ✅ 单订阅+TokenJuice |
| 记忆系统 | ✅ 对话级 | ⚠️ 插件依赖 | ✅ 自学习 | 🚀 记忆树+Obsidian |
| 集成数量 | ⚠️ 少量 | ⚠️ 自建 | ⚠️ 自建 | 🚀 118+ OAuth |
| 自动抓取 | 🚫 无 | 🚫 无 | 🚫 无 | ✅ 20分钟同步 |
| 模型路由 | 🚫 单模型 | ⚠️ 手动 | ⚠️ 手动 | ✅ 内置自动 |
| 原生工具 | ✅ 仅代码 | ✅ 仅代码 | ✅ 仅代码 | ✅ 代码+搜索+抓取+语音 |
| 上下文获取 | 周级 | 周级 | 周级 | ⚡ 分钟级 |
4.2 OpenHuman 的差异化优势
┌──────────────────────────────────────────────────────────────┐
│ OpenHuman vs 传统 AI 助手 │
├──────────────────────────────────────────────────────────────┤
│ │
│ 传统 AI 助手的问题: │
│ ┌────────────────────────────────────────────────┐ │
│ │ 1. 从零开始学习用户 │ │
│ │ → Hermes 需要观察你工作来学习 │ │
│ │ → OpenClaw 等待插件搬运上下文 │ │
│ │ → 需要花费数天或数周 │ │
│ └────────────────────────────────────────────────┘ │
│ ↓ │
│ 解决方案: │
│ ┌────────────────────────────────────────────────┐ │
│ │ OpenHuman 的方案: │ │
│ │ │ │
│ │ ① 连接你的账户 │ │
│ │ → OAuth 一键授权 │ │
│ │ │ │
│ │ ② auto-fetch 每 20 分钟本地拉取数据 │ │
│ │ → 无需手动编写轮询循环 │ │
│ │ │ │
│ │ ③ Memory Trees 将所有内容压缩进 │ │
│ │ Obsidian wiki 中的 Markdown 文件 │ │
│ │ │ │
│ │ ④ 一次同步后,Agent 就拥有你 │ │
│ │ 收件箱、日历、仓库、文档的完整上下文 │ │
│ │ → 无需训练期! │ │
│ └────────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────┘
五、源码结构分析
5.1 仓库目录结构
openhuman/
├── .agents/agents/
│ ├── coder.agent.md
│ ├── planner.agent.md
│ └── reviewer.agent.md
├── .claude/
│ └── settings.json
├── .codex/
│ └── config.json
├── app/
│ ├── src-tauri/
│ │ ├── src/
│ │ ├── Cargo.toml
│ │ └── tauri.conf.json
│ └── src/
│ ├── components/
│ ├── pages/
│ └── utils/
├── docs/
│ ├── architecture.md
│ ├── setup.md
│ └── features/
├── e2e/
│ ├── tests/
│ └── fixtures/
├── examples/
│ ├── basic-usage/
│ └── advanced/
├── packages/
│ ├── core/
│ ├── ui/
│ └── utils/
├── remotion/
│ ├── compositions/
│ └── output/
├── scripts/
│ ├── install.sh
│ ├── install.ps1
│ └── dev.sh
├── src/
│ ├── main.rs
│ ├── memory/
│ ├── integrations/
│ ├── router/
│ ├── token_juice/
│ ├── tools/
│ └── voice/
├── tests/
│ ├── unit/
│ ├── integration/
│ └── fixtures/
├── Cargo.toml
├── package.json
├── pnpm-workspace.yaml
├── Dockerfile
└── docker-compose.yml
5.2 关键配置文件分析
5.2.1 package.json 脚本命令
{
"name": "openhuman-repo",
"version": "0.53.43",
"private": true,
"scripts": {
"dev": "pnpm --filter openhuman-app dev",
"dev:cef": "pnpm --filter openhuman-app dev:cef",
"dev:app": "pnpm --filter openhuman-app dev:app",
"dev:app:win": "pnpm --filter openhuman-app dev:app:win",
"build": "pnpm --filter openhuman-app build",
"compile": "tsc --noEmit",
"typecheck": "pnpm compile",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:rust": "cargo test",
"test:rust:e2e": "cargo test --features e2e",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"tauri": "tauri",
"rust:check": "cargo check -p openhuman --lib",
"rabbit": "node scripts/rabbit.js",
"deep-work": "node scripts/deep-work.js",
"review": "node scripts/review.js",
"work": "node scripts/work.js",
"agent-batch": "node scripts/agent-batch.js",
"mock:api": "node scripts/mock-api.js",
"pr:checklist": "node scripts/pr-checklist.js",
"merge-pr": "node scripts/merge-pr.js",
"reset": "node scripts/reset.js"
},
"devDependencies": {
"husky": "^9.1.7",
"ws": "^8.20.0"
}
}
5.2.2 Cargo.toml(Rust 核心配置)
[package]
name = "openhuman"
version = "0.53.43"
edition = "2021"
authors = ["@senamakel"]
license = "GPL-3.0"
[dependencies]
tauri = { version = "2.0", features = ["devtools"] }
tauri-build = "2.0"
tokio = { version = "1.38", features = ["full"] }
async-trait = "0.1"
rusqlite = { version = "0.31", features = ["bundled"] }
sqlx = { version = "0.7", features = ["runtime-tokio-rustls"] }
reqwest = { version = "0.12", features = ["json"] }
ureq = "2.9"
whisper-rs = "0.12"
elevenlabs-rs = "0.3"
ollama-rs = "0.2"
candle = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio-stream = "0.1"
[build-dependencies]
tauri-build = "2.0"
六、安装与使用指南
6.1 安装方式一:官网下载(推荐)
访问 tinyhumans.ai/openhuman 下载安装包:
| 平台 | 安装包格式 | 说明 |
|---|
| macOS | DMG | 双击挂载后拖入 Applications |
| Windows | EXE | 双击运行安装向导 |
| Linux | AppImage / DEB / RPM | 根据发行版选择 |
6.2 安装方式二:命令行安装
macOS / Linux (x64)
curl -fsSL https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.sh | bash
openhuman --version
Windows (PowerShell)
# 一键安装脚本
irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.ps1 | iex
# 安装后验证
openhuman.exe --version
6.3 从源码构建(开发者)
步骤 1:安装依赖
brew install git node@24 cmake ninja ripgrep
sudo apt update
sudo apt install git nodejs cmake ninja-build ripgrep
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install git nodejs cmake ninja ripgrep -y
步骤 2:安装 Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustc --version
rustup component add rustfmt clippy
步骤 3:安装 pnpm
npm install -g pnpm@10.10.0
pnpm --version
步骤 4:克隆仓库并初始化
git clone https://github.com/tinyhumansai/openhuman.git
cd openhuman
git submodule update --init --recursive
pnpm install
步骤 5:启动开发服务器
pnpm dev
pnpm --filter openhuman-app dev:app
pnpm dev:cef
pnpm dev:app:win
6.4 开发检查命令
pnpm typecheck
cargo check -p openhuman --lib
pnpm format:check
pnpm lint
pnpm test
pnpm test:rust
七、核心功能使用详解
7.1 连接第三方服务(OAuth 集成)
┌────────────────────────────────────────────────────────────┐
│ OAuth 集成流程 │
├────────────────────────────────────────────────────────────┤
│ │
│ 步骤 1: 打开 OpenHuman 设置 │
│ ↓ │
│ 步骤 2: 选择要连接的服务(Gmail/Notion/GitHub等) │
│ ↓ │
│ 步骤 3: 点击"连接"按钮 │
│ ↓ │
│ 步骤 4: 浏览器打开 OAuth 授权页面 │
│ ↓ │
│ 步骤 5: 授权后自动回调到 OpenHuman │
│ ↓ │
│ 步骤 6: Token 安全存储(本地加密) │
│ ↓ │
│ 完成!每 20 分钟自动同步数据 │
│ │
└────────────────────────────────────────────────────────────┘
支持的服务列表
| 服务类型 | 服务名称 | 功能 |
|---|
| 邮件 | Gmail | 读取/发送邮件、搜索、标签管理 |
| 笔记 | Notion | 页面读取、数据库查询、内容创建 |
| 代码 | GitHub | 仓库管理、PR 审查、Issue 跟踪 |
| 通讯 | Slack | 消息收发、频道管理 |
| 支付 | Stripe | 支付数据查询、客户管理 |
| 日历 | Google Calendar | 事件管理、日程查询 |
| 存储 | Google Drive | 文件管理、共享链接 |
| 项目 | Linear、Jira | 任务管理、进度跟踪 |
7.2 Memory Tree 使用
Memory Tree 数据结构
# Memory Tree 层级结构示例
memory_tree/
├── chunks.db # SQLite 数据库
└── wiki/ # Obsidian Vault
├── README.md # Vault 入口
├── source/ # 源数据(按服务分类)
│ ├── gmail/
│ │ ├── 2026-05-16-emails.md
│ │ └── 2026-05-15-emails.md
│ ├── github/
│ │ ├── my-repo-issues.md
│ │ └── my-repo-prs.md
│ └── notion/
│ └── project-notes.md
├── topics/ # 主题摘要
│ ├── work-projects.md
│ ├── personal-tasks.md
│ └── technical-notes.md
└── global/ # 全局摘要
└── master-summary.md
自动抓取调度器配置
[auto_fetch]
interval_minutes = 20
enabled_integrations = [
"gmail",
"github",
"notion",
"slack"
]
incremental_sync = true
max_retries = 3
7.3 TokenJuice 智能压缩
压缩策略详解
pub struct TokenJuice {
html2md: HtmlToMarkdownConverter,
url_shortener: UrlShortener,
ascii_normalizer: AsciiNormalizer,
summarizer: ContentSummarizer,
}
impl TokenJuice {
pub fn compress_tool_output(&self, input: &str) -> String {
let mut output = input.to_string();
if output.contains("<html") {
output = self.html2md.convert(&output);
}
output = self.url_shortener.shorten_urls(&output);
output = self.ascii_normalizer.normalize(&output);
if output.len() > 3000 {
output = self.summarizer.summarize(&output, 3000);
}
output
}
}
压缩效果对比
| 原始内容 | 压缩后 | Token 减少 |
|---|
| HTML 网页(10KB) | Markdown(2KB) | ~80% |
| 邮件正文(5KB) | 摘要(1KB) | ~80% |
| 搜索结果(8KB) | 压缩后(2KB) | ~75% |
| GitHub Issue(3KB) | Markdown(1KB) | ~67% |
7.4 模型路由(Model Routing)
路由策略
pub struct ModelRouter {
reasoning_models: Vec<Model>,
fast_models: Vec<Model>,
vision_models: Vec<Model>,
}
impl ModelRouter {
pub fn route(&self, task: &Task) -> Model {
let task_type = self.classify_task(task);
match task_type {
TaskType::Reasoning => {
self.reasoning_models[0].clone()
}
TaskType::Fast => {
self.fast_models[0].clone()
}
TaskType::Vision => {
self.vision_models[0].clone()
}
}
}
fn classify_task(&self, task: &Task) -> TaskType {
let prompt = &task.prompt;
if prompt.contains("image") || prompt.contains("图片") {
TaskType::Vision
} else if prompt.contains("analyze") || prompt.contains("分析") {
TaskType::Reasoning
} else {
TaskType::Fast
}
}
}
支持的模型提供商
| 提供商 | 模型示例 | 用途 |
|---|
| Anthropic | Claude 3.5 Sonnet | 推理、代码 |
| OpenAI | GPT-4o、GPT-4 Turbo | 通用、视觉 |
| Google | Gemini 1.5 Pro | 长上下文 |
| Meta | Llama 3.1 | 本地部署 |
| Ollama | Llama 3.1、Mistral | 本地推理 |
八、云部署指南
8.1 部署架构
┌──────────────────────────────────────────────────────────────┐
│ OpenHuman 云部署架构 │
├──────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ │
│ │ DigitalOcean App Platform │ │
│ │ ┌────────────┐ │ │
│ │ │ openhuman-core (Docker) │ │ │
│ │ │ - 监听端口: 7788 │ │ │
│ │ │ - 健康检查: GET /health │ │ │
│ │ │ - RPC 入口: POST /rpc │ │ │
│ │ │ - 事件流: GET /events │ │ │
│ │ │ - WebSocket: GET /ws/dictation │ │ │
│ │ └────────────┘ │ │
│ │ ↕ HTTPS │ │
│ │ ┌────────────┐ │ │
│ │ │ Caddy 反向代理 │ │ │
│ │ │ - TLS 终止 │ │ │
│ │ │ - 负载均衡 │ │ │
│ │ └────────────┘ │ │
│ └──────────────────┘ │
│ ↕ │
│ ┌──────────────────┐ │
│ │ 桌面客户端(Tauri) │ │
│ │ - OPENHUMAN_CORE_RUN_MODE=external │ │
│ │ - OPENHUMAN_CORE_RPC_URL=https://core.example.com/rpc │ │
│ │ - OPENHUMAN_CORE_TOKEN=<token> │ │
│ └──────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────┘
8.2 部署方式一:DigitalOcean App Platform
步骤 1:一键部署

步骤 2:配置环境变量
name: openhuman-core
services:
- name: openhuman-core
image:
registry: ghcr.io
repository: tinyhumansai/openhuman-core
tag: latest
instance_count: 1
instance_size: basic-xxs
http_port: 7788
envs:
- key: OPENHUMAN_CORE_TOKEN
value: ${OPENHUMAN_CORE_TOKEN}
type: SECRET
- key: BACKEND_URL
value: https://api.tinyhumans.ai
- key: OPENHUMAN_APP_ENV
value: production
- key: OPENHUMAN_CORE_HOST
value: 0.0.0.0
- key: OPENHUMAN_CORE_PORT
value: 7788
volumes:
- name: openhuman-data
mount_path: /home/openhuman/.openhuman
size_gb: 10
步骤 3:生成强密钥
openssl rand -hex 32
8.3 部署方式二:Docker Compose(推荐生产使用)
docker-compose.yml
version: '3.8'
services:
openhuman-core:
image: ghcr.io/tinyhumansai/openhuman-core:latest
container_name: openhuman-core
restart: unless-stopped
ports:
- "7788:7788"
environment:
- OPENHUMAN_CORE_TOKEN=${OPENHUMAN_CORE_TOKEN}
- BACKEND_URL=https://api.tinyhumans.ai
- OPENHUMAN_APP_ENV=production
- OPENHUMAN_CORE_HOST=0.0.0.0
- OPENHUMAN_CORE_PORT=7788
- RUST_LOG=info
volumes:
- openhuman-data:/home/openhuman/.openhuman
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7788/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
openhuman-data:
driver: local
启动命令
git clone https://github.com/tinyhumansai/openhuman.git
cd openhuman
cp .env.example .env
docker compose up -d
curl -fsSL http://localhost:7788/health
8.4 桌面客户端连接配置
app/.env.local
OPENHUMAN_CORE_RUN_MODE=external
OPENHUMAN_CORE_RPC_URL=https://core.example.com/rpc
OPENHUMAN_CORE_TOKEN=5a3c7f1e9d4b2a8f6c0e3d7b5a9c2f4e8b1d6a3c7f0e9d4b2a8f6c0e3d7b5a
8.5 Caddy 反向代理配置
# Caddyfile
core.example.com {
# 自动 TLS(Let's Encrypt)
tls admin@example.com
# 反向代理到 openhuman-core
reverse_proxy localhost:7788 {
# 健康检查
health_timeout 5s
# 超时设置
timeout 30s
# 负载均衡(如果有多实例)
lb_policy round_robin
}
}
九、高级配置
9.1 agentmemory 后端集成
如果你已在其他编程代理中自托管了 agentmemory,可在 config.toml 中配置:
[memory]
backend = "agentmemory"
[memory.agentmemory]
url = "http://localhost:8000"
token = "${AGENTMEMORY_TOKEN}"
优势:同一个持久化存储可同时为以下工具提供服务:
- OpenHuman
- Claude Code
- Cursor
- Codex
- OpenCode
9.2 TokenJuice 配置
[token_juice]
enabled = true
threshold = 3000
[compress.html]
enabled = true
convert_to_markdown = true
remove_scripts = true
remove_styles = true
[compress.urls]
enabled = true
shortener = "tinyurl"
[compress.ascii]
enabled = true
remove_non_ascii = true
9.3 模型路由配置
[model_routing]
default_provider = "anthropic"
[model_routing.reasoning]
provider = "anthropic"
model = "claude-3-5-sonnet-20241022"
max_tokens = 8192
[model_routing.fast]
provider = "openai"
model = "gpt-4o-mini"
max_tokens = 4096
[model_routing.vision]
provider = "openai"
model = "gpt-4o"
max_tokens = 16384
[model_routing.local]
provider = "ollama"
model = "llama3.1:8b"
max_tokens = 4096
十、社区与资源
10.1 官方资源
10.2 社区渠道
10.3 创始人
十一、项目亮点总结
11.1 技术创新点
┌──────────────────────────────────────────────────────────────────┐
│ OpenHuman 技术创新点 │
├──────────────────────────────────────────────────────────────────┤
│ │
│ 1. 📍 本地优先架构 │
│ → 核心数据(Memory Tree、Vault)全部本地存储 │
│ → 保护用户隐私,数据归用户所有 │
│ │
│ 2. ⚡ 分钟级上下文获取 │
│ → 传统 Agent 需要数天/周才能了解用户 │
│ → OpenHuman 通过 auto-fetch 在几分钟内完成 │
│ │
│ 3. 🧠 智能记忆系统 │
│ → Memory Tree 层级摘要 │
│ → Obsidian 兼容 Vault │
│ → 支持 118+ 第三方集成 │
│ │
│ 4. 🔧 开箱即用工具集 │
│ → 网络搜索 + 网页抓取 │
│ → 完整编码工具集 │
│ → 原生语音(STT + TTS) │
│ │
│ 5. 🎯 模型路由自动化 │
│ → 根据任务类型自动选择最合适的模型 │
│ → 一个订阅搞定所有需求 │
│ │
│ 6. 💰 TokenJuice 压缩 │
│ → 智能压缩工具输出和大型数据 │
│ → 降低成本和延迟高达 80% │
│ │
└──────────────────────────────────────────────────────────────────┘
11.2 适用场景
| 场景 | 说明 | OpenHuman 优势 |
|---|
| 个人知识管理 | 整合邮件、笔记、代码仓库等 | Memory Tree 自动同步 |
| 编程辅助 | 代码审查、Bug 修复、功能开发 | 完整编码工具集 + 118+ 集成 |
| 项目管理 | 跟踪任务、进度、团队协作 | Linear/Jira 集成 |
| 邮件处理 | 自动分类、摘要、回复建议 | Gmail 集成 + 智能分析 |
| 会议助手 | 实时转录、总结、行动项提取 | Google Meet Agent + 语音模块 |
| 研究助手 | 网页抓取、内容摘要、知识整理 | 网络搜索 + TokenJuice 压缩 |
十二、未来展望
12.1 项目发展路线
┌──────────────────────────────────────────────────────────────┐
│ OpenHuman 未来展望 │
├──────────────────────────────────────────────────────────────┤
│ │
│ 短期(1-3 个月): │
│ ✓ 退出 Early Beta,发布稳定版 │
│ ✓ 增加更多第三方集成(目标 200+) │
│ ✓ 优化 Memory Tree 检索性能 │
│ ✓ 改进 TokenJuice 压缩算法 │
│ │
│ 中期(3-6 个月): │
│ ✓ 支持更多本地 AI 模型 │
│ ✓ 增强语音交互体验(实时翻译、多语言) │
│ ✓ 推出移动端应用(iOS/Android) │
│ ✓ 集成更多 IDE(VSCode、JetBrains 等) │
│ │
│ 长期(6-12 个月): │
│ ✓ 构建插件生态系统 │
│ ✓ 支持企业级部署(LDAP/SSO 集成) │
│ ✓ 实现跨设备同步(端到端加密) │
│ ✓ 探索联邦学习(保护隐私的模型微调) │
│ │
└──────────────────────────────────────────────────────────────┘
12.2 参与贡献
git clone https://github.com/<your-username>/openhuman.git
cd openhuman
git remote add upstream https://github.com/tinyhumansai/openhuman.git
git checkout -b feature/my-feature
git add .
git commit -m "feat: add my feature"
git push origin feature/my-feature
十三、总结
OpenHuman 是一个开创性的开源 AI 超级智能助手项目,它解决了传统 AI 助手需要从零开始学习用户的核心痛点。
核心优势回顾
- 分钟级上下文获取:通过 auto-fetch 和 Memory Tree,无需数周训练期
- 本地优先设计:保护用户隐私,数据归用户所有
- 118+ 第三方集成:一键 OAuth 授权,自动同步数据
- 智能 Token 压缩:TokenJuice 降低成本和延迟高达 80%
- 模型路由自动化:根据任务类型自动选择最合适的 LLM
- 开箱即用:内置网络搜索、网页抓取、编码工具集、原生语音
适用人群
- 开发者:需要整合多个代码仓库、项目管理工具的编程助手
- 知识工作者:需要管理邮件、笔记、文档、日历的多任务处理者
- 研究人员:需要网页抓取、内容摘要、知识整理的研究助手
- 隐私关注者:希望数据本地存储、不上传云端的注重隐私用户
开始使用
curl -fsSL https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/install.sh | bash
附录:常用命令速查表
A. 开发命令
| 命令 | 说明 |
|---|
pnpm dev | 启动 Web UI 开发服务器 |
pnpm --filter openhuman-app dev:app | 启动桌面 Shell 开发 |
pnpm typecheck | TypeScript 类型检查 |
pnpm lint | Lint 检查 |
pnpm format:check | 代码格式检查 |
cargo check -p openhuman --lib | Rust 代码检查 |
pnpm test | 运行测试 |
pnpm test:rust | 运行 Rust 测试 |
B. Docker 命令
| 命令 | 说明 |
|---|
docker compose up -d | 启动服务 |
docker compose down | 停止服务 |
docker compose logs -f | 查看日志 |
docker compose restart openhuman-core | 重启服务 |
curl -fsSL http://localhost:7788/health | 健康检查 |
C. 环境变量
| 变量名 | 必须 | 说明 |
|---|
OPENHUMAN_CORE_TOKEN | ✅ | Bearer 令牌 |
BACKEND_URL | ✅ | 后端地址 |
OPENHUMAN_APP_ENV | 可选 | production 或 staging |
OPENHUMAN_CORE_HOST | 可选 | 默认 0.0.0.0 |
OPENHUMAN_CORE_PORT | 可选 | 默认 7788 |
RUST_LOG | 可选 | 日志级别 |
本文基于 OpenHuman GitHub 仓库(2026年5月)的公开信息整理,项目处于 Early Beta 阶段,具体实现可能随版本迭代而变化。
✨ 项目地址:github.com/tinyhumansa…
📚 官方文档:tinyhumans.gitbook.io/openhuman