openhanako-personal-ai-agent by aradotso/trending-skills
npx skills add https://github.com/aradotso/trending-skills --skill openhanako-personal-ai-agent技能来自 ara.so — Daily 2026 技能集。
OpenHanako 是一个基于 Electron 构建的桌面 AI 智能体平台,它为每个智能体提供持久记忆、独特的个性以及自主操作您计算机的能力——读写文件、运行终端命令、浏览网页、执行 JavaScript 和管理日程。多个智能体可以通过频道群聊或任务委派进行协作。
# macOS Apple Silicon — 从发布页面下载
# https://github.com/liliMozi/openhanako/releases
# 挂载 .dmg 文件并拖拽到“应用程序”文件夹
# 首次启动 — 绕过 Gatekeeper(一次性操作):
# 右键点击应用 → 打开 → 打开
# Windows — 从发布页面运行 .exe 安装程序
# SmartScreen 警告:点击“更多信息” → “仍要运行”
git clone https://github.com/liliMozi/openhanako.git
cd openhanako
npm install
# 开发模式
npm run dev
# 构建生产版本
npm run build
# 运行测试
npm test
首次启动时,向导会询问:
chat model — 主要对话(例如 、)
* — 轻量级任务、摘要(例如 )
* — 记忆编译、深度分析(例如 )广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
gpt-4odeepseek-chatutility modelgpt-4o-miniutility large modelgpt-4o// OpenAI
{
"baseURL": "https://api.openai.com/v1",
"apiKey": "process.env.OPENAI_API_KEY"
}
// DeepSeek
{
"baseURL": "https://api.deepseek.com/v1",
"apiKey": "process.env.DEEPSEEK_API_KEY"
}
// 本地 Ollama
{
"baseURL": "http://localhost:11434/v1",
"apiKey": "ollama"
}
// Qwen (阿里云)
{
"baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "process.env.DASHSCOPE_API_KEY"
}
openhanako/
├── core/ # 引擎编排 + 管理器(Agent, Session, Model, Preferences, Skill)
├── lib/ # 核心库
│ ├── memory/ # 自定义记忆系统(近期衰减)
│ ├── tools/ # 内置工具(文件、终端、浏览器、截图、画布)
│ ├── sandbox/ # PathGuard + 操作系统级隔离(Seatbelt/Bubblewrap)
│ └── bridge/ # 多平台适配器(Telegram, Feishu, QQ)
├── server/ # Fastify 5 HTTP + WebSocket 服务器
├── hub/ # 调度器、ChannelRouter、EventBus
├── desktop/ # Electron 38 主进程 + React 19 前端
├── tests/ # Vitest 测试套件
└── skills2set/ # 内置技能定义
| 管理器 | 职责 |
|---|---|
AgentManager | 创建、加载、删除智能体 |
SessionManager | 每个智能体的对话会话 |
ModelManager | 将请求路由到配置的提供商 |
PreferencesManager | 用户/全局设置 |
SkillManager | 安装、启用、禁用、沙盒化技能 |
每个智能体都是一个独立的文件夹,您可以进行备份:
~/.openhanako/agents/<agent-id>/
├── personality.md # 个性模板(自由格式文本或结构化)
├── memory/
│ ├── working.db # 近期事件(SQLite WAL)
│ └── compiled.md # 长期编译记忆
├── desk/ # 智能体的文件工作区
│ └── notes/ # 简笔记
└── skills/ # 智能体本地安装的技能
# Hanako
你是 Hanako,一个冷静、深思熟虑的助手,喜欢直接了当而非冗长。
你记得过去的对话,并能自然地提及它们。
在开始大型任务前,你会先询问以澄清问题。
编写代码时,你总是添加简短的内联注释。
## 语气
- 热情但专业
- 偶尔使用冷幽默
- 从不使用空洞的肯定语(“好问题!”)
## 约束
- 删除文件前总是确认
- 总结长的终端输出,而不是直接转储原始内容
技能扩展了智能体的能力。它们位于 skills2set/(内置)或按智能体安装。
// 通过应用中的技能 UI,或以编程方式:
const { skillManager } = engine;
await skillManager.installFromGitHub({
repo: 'some-user/hanako-skill-weather',
agentId: 'agent-abc123',
safetyReview: true // 默认启用严格审查
});
---
name: web-scraper
version: 1.0.0
description: 从网页抓取结构化数据
tools:
- browser
- javascript
permissions:
- network
---
## 给智能体的指令
当被要求抓取页面时:
1. 使用 `browser` 工具导航到 URL
2. 使用 `executeJavaScript` 提取结构化数据
3. 将结果保存到工作区为 JSON 格式
// skills/my-skill/index.js
export default {
name: 'my-skill',
version: '1.0.0',
description: '做一些有用的事情',
// 此技能为智能体添加的工具
tools: [
{
name: 'fetch_weather',
description: '获取指定城市的当前天气',
parameters: {
type: 'object',
properties: {
city: { type: 'string', description: '城市名称' }
},
required: ['city']
},
async execute({ city }) {
const res = await fetch(
`https://wttr.in/${encodeURIComponent(city)}?format=j1`
);
const data = await res.json();
return {
temp_c: data.current_condition[0].temp_C,
description: data.current_condition[0].weatherDesc[0].value
};
}
}
]
};
OpenHanako 使用近期衰减记忆模型:近期事件保持清晰,较早的事件逐渐淡忘。
// 以编程方式访问记忆(core/lib/memory)
import { MemoryManager } from './lib/memory/index.js';
const memory = new MemoryManager({ agentId: 'agent-abc123' });
// 存储一个记忆事件
await memory.store({
type: 'conversation',
content: '用户偏好深色模式和简洁的回复',
importance: 0.8 // 0.0–1.0;值越高,衰减越慢
});
// 检索相关记忆
const relevant = await memory.query({
query: '用户偏好',
limit: 10,
minRelevance: 0.5
});
// 触发手动编译(通常自动运行)
await memory.compile();
| 层级 | 存储 | 衰减 |
|---|---|---|
| 工作记忆 | working.db (SQLite) | 快 — 最近 N 轮对话 |
| 编译记忆 | compiled.md | 慢 — 由 utility-large 模型总结 |
| 工作区笔记(简) | 工作区上的文件 | 手动 / 不衰减 |
智能体开箱即用的工具:
// 文件操作
{ tool: 'read_file', args: { path: '/Users/me/notes.txt' } }
{ tool: 'write_file', args: { path: '/Users/me/out.txt', content: '...' } }
// 终端
{ tool: 'run_command', args: { command: 'ls -la', cwd: '/Users/me' } }
// 浏览器和网络
{ tool: 'browse', args: { url: 'https://example.com' } }
{ tool: 'web_search', args: { query: 'OpenHanako 最新发布' } }
// 屏幕
{ tool: 'screenshot', args: {} }
// 画布
{ tool: 'draw', args: { instructions: '...' } }
// 代码执行
{ tool: 'execute_js', args: { code: 'return 2 + 2' } }
Tier 0 — 拒绝访问: 系统路径(/System, /usr, 注册表配置单元)
Tier 1 — 只读: 智能体工作区之外的主目录文件
Tier 2 — 读写: 仅限智能体工作区文件夹
Tier 3 — 完全访问: 明确授予的路径(用户确认)
操作系统级沙盒:macOS Seatbelt / Linux Bubblewrap 包装技能进程。
// core/AgentManager 使用示例
import { createEngine } from './core/engine.js';
const engine = await createEngine();
// 创建第二个智能体
const researchAgent = await engine.agentManager.create({
name: '研究员',
personalityTemplate: 'researcher.md',
models: {
chat: 'deepseek-chat',
utility: 'gpt-4o-mini',
utilityLarge: 'gpt-4o'
}
});
// 通过频道将一个智能体的任务委派给另一个
await engine.hub.channelRouter.delegate({
fromAgent: 'agent-abc123',
toAgent: researchAgent.id,
task: '查找 2025 年发表的关于 mixture-of-experts 的前 5 篇论文',
returnTo: 'agent-abc123' // 结果自动路由回
});
// hub/scheduler 使用
import { Scheduler } from './hub/scheduler.js';
const scheduler = new Scheduler({ agentId: 'agent-abc123' });
// 每天上午 9 点运行一个任务
scheduler.cron('daily-briefing', '0 9 * * *', async () => {
await agent.run('总结我昨天工作区的笔记并发布到 #briefing 频道');
});
// 心跳 — 每 5 分钟检查工作区是否有新文件
scheduler.heartbeat('desk-watch', 300_000, async () => {
const changed = await agent.desk.checkChanges();
if (changed.length > 0) {
await agent.run(`工作区有新文件:${changed.join(', ')} — 请总结并通知我`);
}
});
scheduler.start();
将一个智能体同时连接到 Telegram、飞书和 QQ:
// lib/bridge 配置
const bridgeConfig = {
telegram: {
enabled: true,
token: process.env.TELEGRAM_BOT_TOKEN,
allowedUsers: [process.env.TELEGRAM_ALLOWED_USER_ID]
},
feishu: {
enabled: true,
appId: process.env.FEISHU_APP_ID,
appSecret: process.env.FEISHU_APP_SECRET
},
qq: {
enabled: false
}
};
await engine.agentManager.setBridges('agent-abc123', bridgeConfig);
内嵌的 Fastify 服务器在本地运行,Electron 主进程通过 stdio 桥接进行通信。
// WebSocket — 实时聊天流
const ws = new WebSocket('ws://localhost:PORT/ws/agent-abc123');
ws.send(JSON.stringify({
type: 'chat',
content: '总结我的项目文件夹'
}));
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
// msg.type: 'chunk' | 'tool_call' | 'tool_result' | 'done'
console.log(msg);
};
// HTTP — 一次性任务
const res = await fetch('http://localhost:PORT/api/agent/agent-abc123/run', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ task: '列出我工作区上所有的 .md 文件' })
});
const result = await res.json();
# 运行所有测试
npm test
# 运行特定的测试文件
npx vitest run tests/memory.test.js
# 监视模式
npx vitest
// tests/memory.test.js 示例模式
import { describe, it, expect, beforeEach } from 'vitest';
import { MemoryManager } from '../lib/memory/index.js';
describe('MemoryManager', () => {
let memory;
beforeEach(async () => {
memory = new MemoryManager({ agentId: 'test-agent', inMemory: true });
await memory.init();
});
it('存储并检索记忆', async () => {
await memory.store({ type: 'fact', content: '用户喜欢深色模式', importance: 0.9 });
const results = await memory.query({ query: '深色模式', limit: 5 });
expect(results[0].content).toContain('深色模式');
});
});
# 如果右键点击 → 打开无效,移除隔离属性
xattr -dr com.apple.quarantine /Applications/OpenHanako.app
Cmd+Option+I / Ctrl+Shift+I)→ 控制台查看错误// 强制手动编译
await engine.agentManager.getAgent('agent-abc123').memory.compile({ force: true });
// 仅对受信任的本地技能临时禁用安全审查
await skillManager.installLocal({
path: './my-skill',
agentId: 'agent-abc123',
safetyReview: false // ⚠️ 仅用于本地开发,切勿用于不受信任的来源
});
.exe 文件误报每周安装量
176
代码仓库
GitHub 星标数
10
首次出现
4 天前
安全审计
安装于
gemini-cli176
github-copilot176
codex176
warp176
amp176
cline176
Skill by ara.so — Daily 2026 Skills collection.
OpenHanako is a desktop AI agent platform built on Electron that gives each agent persistent memory, a distinct personality, and the ability to autonomously operate your computer — read/write files, run terminal commands, browse the web, execute JavaScript, and manage schedules. Multiple agents can collaborate via channel group chats or task delegation.
# macOS Apple Silicon — download from releases page
# https://github.com/liliMozi/openhanako/releases
# Mount the .dmg and drag to Applications
# First launch — bypass Gatekeeper (one-time):
# Right-click app → Open → Open
# Windows — run the .exe installer from releases
# SmartScreen warning: click "More info" → "Run anyway"
git clone https://github.com/liliMozi/openhanako.git
cd openhanako
npm install
# Development mode
npm run dev
# Build for production
npm run build
# Run tests
npm test
On first launch, the wizard asks for:
chat model — main conversation (e.g. gpt-4o, deepseek-chat)utility model — lightweight tasks, summarization (e.g. gpt-4o-mini)utility large model — memory compilation, deep analysis (e.g. gpt-4o)// OpenAI
{
"baseURL": "https://api.openai.com/v1",
"apiKey": "process.env.OPENAI_API_KEY"
}
// DeepSeek
{
"baseURL": "https://api.deepseek.com/v1",
"apiKey": "process.env.DEEPSEEK_API_KEY"
}
// Local Ollama
{
"baseURL": "http://localhost:11434/v1",
"apiKey": "ollama"
}
// Qwen (Alibaba Cloud)
{
"baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "process.env.DASHSCOPE_API_KEY"
}
openhanako/
├── core/ # Engine orchestration + Managers (Agent, Session, Model, Preferences, Skill)
├── lib/ # Core libraries
│ ├── memory/ # Custom memory system (recency decay)
│ ├── tools/ # Built-in tools (files, terminal, browser, screenshot, canvas)
│ ├── sandbox/ # PathGuard + OS-level isolation (Seatbelt/Bubblewrap)
│ └── bridge/ # Multi-platform adapters (Telegram, Feishu, QQ)
├── server/ # Fastify 5 HTTP + WebSocket server
├── hub/ # Scheduler, ChannelRouter, EventBus
├── desktop/ # Electron 38 main process + React 19 frontend
├── tests/ # Vitest test suite
└── skills2set/ # Built-in skill definitions
| Manager | Responsibility |
|---|---|
AgentManager | Create, load, delete agents |
SessionManager | Conversation sessions per agent |
ModelManager | Route requests to configured providers |
PreferencesManager | User/global settings |
SkillManager | Install, enable, disable, sandbox skills |
Each agent is a self-contained folder you can back up:
~/.openhanako/agents/<agent-id>/
├── personality.md # Personality template (free-form prose or structured)
├── memory/
│ ├── working.db # Recent events (SQLite WAL)
│ └── compiled.md # Long-term compiled memory
├── desk/ # Agent's file workspace
│ └── notes/ # Jian notes
└── skills/ # Agent-local installed skills
# Hanako
You are Hanako, a calm and thoughtful assistant who prefers directness over verbosity.
You remember past conversations and refer to them naturally.
You ask clarifying questions before starting large tasks.
When writing code, you always add brief inline comments.
## Tone
- Warm but professional
- Uses occasional dry humor
- Never uses hollow affirmations ("Great question!")
## Constraints
- Always confirm before deleting files
- Summarize long terminal output rather than dumping it raw
Skills extend agent capabilities. They live in skills2set/ (built-in) or are installed per-agent.
// Via the Skills UI in the app, or programmatically:
const { skillManager } = engine;
await skillManager.installFromGitHub({
repo: 'some-user/hanako-skill-weather',
agentId: 'agent-abc123',
safetyReview: true // strict review enabled by default
});
---
name: web-scraper
version: 1.0.0
description: Scrape structured data from web pages
tools:
- browser
- javascript
permissions:
- network
---
## Instructions for Agent
When asked to scrape a page:
1. Use the `browser` tool to navigate to the URL
2. Use `executeJavaScript` to extract structured data
3. Save results to the desk as JSON
// skills/my-skill/index.js
export default {
name: 'my-skill',
version: '1.0.0',
description: 'Does something useful',
// Tools this skill adds to the agent
tools: [
{
name: 'fetch_weather',
description: 'Fetch current weather for a city',
parameters: {
type: 'object',
properties: {
city: { type: 'string', description: 'City name' }
},
required: ['city']
},
async execute({ city }) {
const res = await fetch(
`https://wttr.in/${encodeURIComponent(city)}?format=j1`
);
const data = await res.json();
return {
temp_c: data.current_condition[0].temp_C,
description: data.current_condition[0].weatherDesc[0].value
};
}
}
]
};
OpenHanako uses a recency-decay memory model: recent events stay sharp, older ones fade.
// Accessing memory programmatically (core/lib/memory)
import { MemoryManager } from './lib/memory/index.js';
const memory = new MemoryManager({ agentId: 'agent-abc123' });
// Store a memory event
await memory.store({
type: 'conversation',
content: 'User prefers dark mode and terse responses',
importance: 0.8 // 0.0–1.0; higher = decays slower
});
// Retrieve relevant memories
const relevant = await memory.query({
query: 'user preferences',
limit: 10,
minRelevance: 0.5
});
// Trigger manual compilation (normally runs automatically)
await memory.compile();
| Tier | Storage | Decay |
|---|---|---|
| Working memory | working.db (SQLite) | Fast — recent N turns |
| Compiled memory | compiled.md | Slow — summarized by utility-large model |
| Desk notes (Jian) | Files on desk | Manual / no decay |
Tools available to agents out of the box:
// File operations
{ tool: 'read_file', args: { path: '/Users/me/notes.txt' } }
{ tool: 'write_file', args: { path: '/Users/me/out.txt', content: '...' } }
// Terminal
{ tool: 'run_command', args: { command: 'ls -la', cwd: '/Users/me' } }
// Browser & web
{ tool: 'browse', args: { url: 'https://example.com' } }
{ tool: 'web_search', args: { query: 'OpenHanako latest release' } }
// Screen
{ tool: 'screenshot', args: {} }
// Canvas
{ tool: 'draw', args: { instructions: '...' } }
// Code execution
{ tool: 'execute_js', args: { code: 'return 2 + 2' } }
Tier 0 — Denied: System paths (/System, /usr, registry hives)
Tier 1 — Read-only: Home directory files outside agent desk
Tier 2 — Read-write: Agent desk folder only
Tier 3 — Full: Explicitly granted paths (user confirms)
OS-level sandbox: macOS Seatbelt / Linux Bubblewrap wraps the skill process.
// core/AgentManager usage example
import { createEngine } from './core/engine.js';
const engine = await createEngine();
// Create a second agent
const researchAgent = await engine.agentManager.create({
name: 'Researcher',
personalityTemplate: 'researcher.md',
models: {
chat: 'deepseek-chat',
utility: 'gpt-4o-mini',
utilityLarge: 'gpt-4o'
}
});
// Delegate a task from one agent to another via channel
await engine.hub.channelRouter.delegate({
fromAgent: 'agent-abc123',
toAgent: researchAgent.id,
task: 'Find the top 5 papers on mixture-of-experts published in 2025',
returnTo: 'agent-abc123' // result routed back automatically
});
// hub/scheduler usage
import { Scheduler } from './hub/scheduler.js';
const scheduler = new Scheduler({ agentId: 'agent-abc123' });
// Run a task every day at 9am
scheduler.cron('daily-briefing', '0 9 * * *', async () => {
await agent.run('Summarize my desk notes from yesterday and post to #briefing channel');
});
// Heartbeat — check desk for new files every 5 minutes
scheduler.heartbeat('desk-watch', 300_000, async () => {
const changed = await agent.desk.checkChanges();
if (changed.length > 0) {
await agent.run(`New files on desk: ${changed.join(', ')} — summarize and notify me`);
}
});
scheduler.start();
Connect one agent to Telegram, Feishu, and QQ simultaneously:
// lib/bridge configuration
const bridgeConfig = {
telegram: {
enabled: true,
token: process.env.TELEGRAM_BOT_TOKEN,
allowedUsers: [process.env.TELEGRAM_ALLOWED_USER_ID]
},
feishu: {
enabled: true,
appId: process.env.FEISHU_APP_ID,
appSecret: process.env.FEISHU_APP_SECRET
},
qq: {
enabled: false
}
};
await engine.agentManager.setBridges('agent-abc123', bridgeConfig);
The embedded Fastify server runs locally and the Electron main process communicates via stdio bridge.
// WebSocket — real-time chat stream
const ws = new WebSocket('ws://localhost:PORT/ws/agent-abc123');
ws.send(JSON.stringify({
type: 'chat',
content: 'Summarize my project folder'
}));
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
// msg.type: 'chunk' | 'tool_call' | 'tool_result' | 'done'
console.log(msg);
};
// HTTP — one-shot task
const res = await fetch('http://localhost:PORT/api/agent/agent-abc123/run', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ task: 'List all .md files on my desk' })
});
const result = await res.json();
# Run all tests
npm test
# Run a specific test file
npx vitest run tests/memory.test.js
# Watch mode
npx vitest
// tests/memory.test.js example pattern
import { describe, it, expect, beforeEach } from 'vitest';
import { MemoryManager } from '../lib/memory/index.js';
describe('MemoryManager', () => {
let memory;
beforeEach(async () => {
memory = new MemoryManager({ agentId: 'test-agent', inMemory: true });
await memory.init();
});
it('stores and retrieves a memory', async () => {
await memory.store({ type: 'fact', content: 'User likes dark mode', importance: 0.9 });
const results = await memory.query({ query: 'dark mode', limit: 5 });
expect(results[0].content).toContain('dark mode');
});
});
# Remove quarantine attribute if right-click → Open doesn't work
xattr -dr com.apple.quarantine /Applications/OpenHanako.app
Cmd+Option+I / Ctrl+Shift+I) → Console for errors// Force a manual compile
await engine.agentManager.getAgent('agent-abc123').memory.compile({ force: true });
// Temporarily disable safety review for trusted local skills only
await skillManager.installLocal({
path: './my-skill',
agentId: 'agent-abc123',
safetyReview: false // ⚠️ only for local dev, never for untrusted sources
});
.exeWeekly Installs
176
Repository
GitHub Stars
10
First Seen
4 days ago
Security Audits
Gen Agent Trust HubFailSocketWarnSnykFail
Installed on
gemini-cli176
github-copilot176
codex176
warp176
amp176
cline176
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
123,100 周安装
Mermaid.js v11 图表生成教程 - 流程图、时序图、类图等24+图表类型
160 周安装
summarize:命令行AI摘要工具,支持URL、PDF、YouTube视频内容快速总结
160 周安装
SvelteKit 2 + Svelte 5 + Tailwind v4 集成指南 - 现代Web应用开发技能
160 周安装
日志记录最佳实践指南:结构化日志、安全合规与性能优化
161 周安装
Microsoft 365 租户管理器:自动化脚本工具,助力全局管理员高效管理用户与安全策略
161 周安装
Basecamp CLI 命令大全:130个端点管理待办事项、消息、文件等项目管理功能
161 周安装