开发者开源AI高管系统Open Executive
CEO fired developers to make room for AI. Developers create open source AI CEO
Open Executive
开放高管
An AI system that acts as your company's virtual executive team — a senior advisor with Harvard MBA-level knowledge, customized for your specific business.
一个作为您公司虚拟高管团队的AI系统——一位拥有哈佛MBA级别知识的高级顾问,专为您的特定业务定制。
Demo
演示
A walkthrough of Open Executive in action — watch on YouTube.
Open Executive 的实际操作演示——在 YouTube 上观看。
What It Does
功能
Developed by sentelabs.ai Open Executive provides a single coherent executive voice backed by eight specialist AI agents:
由 sentelabs.ai 开发,Open Executive 提供统一连贯的高管声音,背后由八个专业AI代理支持:
- Chief Strategy Officer — competitive analysis, M&A, market positioning, OKRs
- Chief Financial Officer — financial modeling, fundraising, unit economics, cash flow
- Chief HR/People Officer — hiring, compensation, performance, culture
- General Counsel — contracts, IP, employment law basics, compliance
- Chief Operating Officer — process design, vendor management, operational scaling
- Chief Marketing Officer — GTM strategy, brand, communications, PR
- Chief Product Officer — roadmap, prioritization, product strategy
- Board Communications Director — board decks, investor relations, governance
- 首席战略官——竞争分析、并购、市场定位、OKR
- 首席财务官——财务建模、融资、单位经济、现金流
- 首席人力资源官——招聘、薪酬、绩效、文化
- 总法律顾问——合同、知识产权、劳动法基础、合规
- 首席运营官——流程设计、供应商管理、运营扩展
- 首席营销官——市场进入策略、品牌、传播、公关
- 首席产品官——路线图、优先级排序、产品策略
- 董事会沟通总监——董事会演示文稿、投资者关系、治理
All responses come from one consistent executive voice. The internal agent architecture is never exposed to the user. Beyond Q&A, the system maintains episodic memory of past decisions and initiatives across sessions, and a built-in scheduler can proactively surface follow-ups and time-sensitive actions.
所有回复都来自一致的高管声音。内部代理架构从不向用户暴露。除了问答功能外,系统还维护跨会话的过去决策和举措的情景记忆,内置调度器可以主动提示后续行动和时间敏感的任务。
Architecture
架构
User message
↓
Executive Orchestrator (claude-sonnet-4-6)
↓ tool use → parallel specialist calls
CSO / CFO / CHRO / GC / COO / CMO / CPO / Board
↓ each specialist retrieves relevant context from ChromaDB
Built-in MBA knowledge + Your company documents
↓
Synthesized executive responseUser message
↓
Executive Orchestrator (claude-sonnet-4-6)
↓ tool use → parallel specialist calls
CSO / CFO / CHRO / GC / COO / CMO / CPO / Board
↓ each specialist retrieves relevant context from ChromaDB
Built-in MBA knowledge + Your company documents
↓
Synthesized executive responseKnowledge — Two retrieval layers per specialist call: (1) built-in MBA-level Markdown (knowledge/builtin/, git-tracked) seeded into ChromaDB at startup, and (2) your uploaded company documents chunked and stored in a separate company_docs collection. RAG context is injected into the user turn, never the cached system prompt.
知识——每次专家调用有两个检索层:(1) 内置的MBA级Markdown(knowledge/builtin/,git跟踪)在启动时种子化到ChromaDB中,以及(2) 您上传的公司文档被分块并存储在单独的 company_docs 集合中。RAG上下文被注入到用户回合中,而不是缓存的系统提示中。
Episodic memory — After every response, a background claude-haiku-4-5 pass extracts key decisions, initiatives, and advice into SQLite. The next session opens with a <past_decisions> block so the Executive remembers what it recommended last month.
情景记忆——每次回复后,后台的 claude-haiku-4-5 进程提取关键决策、举措和建议到SQLite中。下一次会话以 <past_decisions> 块开始,以便高管记住上个月的建议。
Scheduler — A built-in job runner claims due actions via UPDATE … RETURNING to prevent double-firing. The API must run as a single instance; do not horizontally scale it without gating the scheduler first.
调度器——内置的任务运行器通过 UPDATE … RETURNING 声明到期操作,以防止重复触发。API 必须作为单实例运行;在没有先门控调度器的情况下,不要水平扩展它。
Prompt caching — The system prompt is structured so the Executive persona, company profile, and knowledge index are cached separately (up to 85% cache hit rate after the first few turns). No dynamic content ever goes in a cached block.
提示缓存——系统提示的结构使得高管角色、公司简介和知识索引被分别缓存(在前几轮后缓存命中率高达85%)。动态内容永远不会进入缓存块。
See docs/architecture.md for the full design.
完整设计请参阅 docs/architecture.md。
Tech Stack
技术栈
| Layer | Choice |
|---|---|
| LLM backbone | Anthropic Claude API |
| Default model | claude-sonnet-4-6 (Executive + most specialists) |
| Deep reasoning | claude-opus-4-7 (CSO, CFO, GC, Board — with extended thinking) |
| Backend | Python 3.11 + FastAPI |
| Package manager | uv |
| Vector store | ChromaDB (local, embedded) |
| Episodic memory | SQLite |
| Web UI | Next.js 15 (App Router) + Tailwind |
| License | Apache 2.0 |
| 层级 | 选择 |
|---|---|
| LLM 骨干 | Anthropic Claude API |
| 默认模型 | claude-sonnet-4-6(执行层 + 大多数专家) |
| 深度推理 | claude-opus-4-7(CSO、CFO、GC、董事会——带扩展思考) |
| 后端 | Python 3.11 + FastAPI |
| 包管理器 | uv |
| 向量存储 | ChromaDB(本地,嵌入式) |
| 情景记忆 | SQLite |
| Web UI | Next.js 15(App Router)+ Tailwind |
| 许可证 | Apache 2.0 |
Repo Layout
仓库布局
openexecutive/
├── packages/
│ ├── core/
│ │ └── openexecutive/
│ │ ├── orchestrator/ # Executive persona + routing loop
│ │ ├── agents/ # 8 specialist agents
│ │ ├── knowledge/ # ChromaDB store + RAG pipeline
│ │ ├── memory/ # Company profile + episodic memory
│ │ ├── onboarding/ # Wizard state machine + profile builder
│ │ ├── prompts/ # Persona + domain prompts + cache manager
│ │ ├── api/ # FastAPI app + routes
│ │ ├── integrations/ # Slack, Email, Telegram, Google Chat, Discord
│ │ ├── scheduler/ # Background job runner (single-instance)
│ │ ├── alerts/ # Proactive alert system
│ │ ├── audit/ # Audit logging
│ │ ├── architecture/ # Internal architecture utilities
│ │ ├── workflows/ # Multi-step workflow definitions
│ │ └── cli.py # Click CLI
│ └── ui/ # Next.js 15 web UI
├── evals/ # Eval scenarios + LLM-as-judge runner
├── fixtures/ # Demo company fixtures (profiles, docs, rosters)
├── scripts/ # Operator scripts (Fly secrets, Google auth)
├── docker/ # Dockerfile(s) + docker-compose.yml
├── fly.api.toml / fly.ui.toml # Fly.io configs — dev API + UI apps
├── fly.api.qa.toml / fly.ui.qa.toml # Fly.io configs — QA API + UI apps
├── fly.honcho.toml # Fly.io config — Honcho memory app (optional)
└── docs/ # Architecture + deployment docsopenexecutive/
├── packages/
│ ├── core/
│ │ └── openexecutive/
│ │ ├── orchestrator/ # Executive persona + routing loop
│ │ ├── agents/ # 8 specialist agents
│ │ ├── knowledge/ # ChromaDB store + RAG pipeline
│ │ ├── memory/ # Company profile + episodic memory
│ │ ├── onboarding/ # Wizard state machine + profile builder
│ │ ├── prompts/ # Persona + domain prompts + cache manager
│ │ ├── api/ # FastAPI app + routes
│ │ ├── integrations/ # Slack, Email, Telegram, Google Chat, Discord
│ │ ├── scheduler/ # Background job runner (single-instance)
│ │ ├── alerts/ # Proactive alert system
│ │ ├── audit/ # Audit logging
│ │ ├── architecture/ # Internal architecture utilities
│ │ ├── workflows/ # Multi-step workflow definitions
│ │ └── cli.py # Click CLI
│ └── ui/ # Next.js 15 web UI
├── evals/ # Eval scenarios + LLM-as-judge runner
├── fixtures/ # Demo company fixtures (profiles, docs, rosters)
├── scripts/ # Operator scripts (Fly secrets, Google auth)
├── docker/ # Dockerfile(s) + docker-compose.yml
├── fly.api.toml / fly.ui.toml # Fly.io configs — dev API + UI apps
├── fly.api.qa.toml / fly.ui.qa.toml # Fly.io configs — QA API + UI apps
├── fly.honcho.toml # Fly.io config — Honcho memory app (optional)
└── docs/ # Architecture + deployment docsQuick Start
快速开始
# Clone the repo
git clone https://github.com/SenteLabsAI/OpenExecutive.git
cd OpenExecutive
# Set your Anthropic API key
cp .env.example .env
# Edit .env and add ANTHROPIC_API_KEY=sk-ant-...
# Start everything
make dev# Clone the repo
git clone https://github.com/SenteLabsAI/OpenExecutive.git
cd OpenExecutive
# Set your Anthropic API key
cp .env.example .env
# Edit .env and add ANTHROPIC_API_KEY=sk-ant-...
# Start everything
make devOpen http://localhost:3000 to start chatting with your executive. The API runs on port 8000 and the UI on 3000.
打开 http://localhost:3000 开始与你的高管聊天。API 运行在端口 8000,UI 运行在 3000。
First run: requires Python 3.11+ and Node 22+. The initial uv sync pulls heavy ML dependencies (ChromaDB + sentence-transformers/PyTorch), and the first boot downloads a small embedding model (~90 MB) to build the local vector index — so the first make dev takes a few minutes before the app is ready. Subsequent starts are fast.
首次运行:需要 Python 3.11+ 和 Node 22+。初始的 uv sync 会拉取重型 ML 依赖(ChromaDB + sentence-transformers/PyTorch),首次启动会下载一个小型嵌入模型(约 90 MB)以构建本地向量索引——因此第一次 make dev 需要几分钟才能准备好应用。后续启动会很快。
For contributors not using make:
对于不使用 make 的贡献者:
cd packages/core
uv sync
source .venv/bin/activate
uvicorn openexecutive.api.main:app --reload --port 8000
# In a second terminal
cd packages/ui && npm install && npm run devcd packages/core
uv sync
source .venv/bin/activate
uvicorn openexecutive.api.main:app --reload --port 8000
# In a second terminal
cd packages/ui && npm install && npm run devRun the Discord Bot
运行 Discord 机器人
- Create a Discord application at https://discord.com/developers/applications
- Enable the Message Content privileged intent (Bot → Privileged Gateway Intents)
- Invite the bot with bot + applications.commands scopes
- Set env vars in .env: DISCORD_BOT_TOKEN, DISCORD_APP_ID, DISCORD_GUILD_IDS
- Run the API normally — the bot starts as part of the FastAPI lifespan when DISCORD_BOT_TOKEN is set:
- 在 https://discord.com/developers/applications 创建一个 Discord 应用
- 启用消息内容特权意图(Bot → Privileged Gateway Intents)
- 使用 bot + applications.commands 范围邀请机器人
- 在 .env 中设置环境变量:DISCORD_BOT_TOKEN、DISCORD_APP_ID、DISCORD_GUILD_IDS
- 正常运行 API——当设置了 DISCORD_BOT_TOKEN 时,机器人作为 FastAPI 生命周期的一部分启动:
make devmake devThe bot is embedded in the API process (alongside the email poller, scheduler, and resumer) so it shares the same SQLite database and ChromaDB vector store under /data in production. Skip the token to disable.
机器人嵌入在 API 进程中(与邮件轮询器、调度器和恢复器一起),因此它共享同一个 SQLite 数据库和 ChromaDB 向量存储,生产环境中位于 /data 下。跳过令牌以禁用。
For iterating on bot-only code without restarting the API, make discord runs the bot as a standalone process against the same local DB.
为了在不重启 API 的情况下迭代仅机器人代码,make discord 将机器人作为独立进程运行,使用相同的本地数据库。
Users can DM the bot, @mention it in a channel (replies in a thread), or use /ask and /today slash commands. Slash commands sync to DISCORD_GUILD_IDS instantly on startup; leave blank for global registration (up to 1-hour propagation delay).
用户可以直接私信机器人,在频道中 @提及它(在主题中回复),或使用 /ask 和 /today 斜杠命令。斜杠命令在启动时立即同步到 DISCORD_GUILD_IDS;留空则进行全局注册(传播延迟最多 1 小时)。
Deploying to production
部署到生产环境
Just set the secrets on the existing API app — no new Fly app required:
只需在现有 API 应用上设置密钥——无需新的 Fly 应用:
flyctl secrets set -a openexec-api-dev \
DISCORD_BOT_TOKEN=... \
DISCORD_APP_ID=... \
DISCORD_GUILD_IDS=...flyctl secrets set -a openexec-api-dev \
DISCORD_BOT_TOKEN=... \
DISCORD_APP_ID=... \
DISCORD_GUILD_IDS=...Discord user access is managed via the /people UI — add a Person row with discord_user_id set.
Discord 用户访问通过 /people UI 管理——添加一个设置了 discord_user_id 的 Person 行。
The machine restarts and the bot starts on the next lifespan boot. To disable in prod: flyctl secrets unset -a openexec-api-dev DISCORD_BOT_TOKEN.
机器重启,机器人在下一次生命周期启动时启动。要在生产环境中禁用:flyctl secrets unset -a openexec-api-dev DISCORD_BOT_TOKEN。
Onboarding Your Company
入职你的公司
The first time you visit the app, you'll be guided through a wizard to set up your company profile:
首次访问应用时,你会被引导通过一个向导来设置公司资料:
- Company basics (name, industry, stage, team size)
- Business model and revenue
- Competitive landscape
- Strategic priorities
- Culture and values
- Optional: financial position, document upload
- 公司基本信息(名称、行业、阶段、团队规模)
- 商业模式和收入
- 竞争格局
- 战略优先事项
- 文化与价值观
- 可选:财务状况、文档上传
After onboarding, the Executive will reference your specific company context in every response.
入职后,高管将在每次回复中参考您的具体公司背景。
Interfaces
接口
| Interface | How to Use |
|---|---|
| Web UI | http://localhost:3000 |
| Slack | Mention @OpenExecutive or DM the app |
| CC or email the configured address (IMAP/SMTP poller) | |
| Telegram | Message the configured bot |
| Google Chat | Mention the app in a space |
| Discord | DM the bot, @mention it in a channel, or use /ask / /today slash commands |
| CLI | openexecutive chat |
| 接口 | 使用方法 |
|---|---|
| Web UI | http://localhost:3000 |
| Slack | 提及 @OpenExecutive 或直接私信应用 |
| 抄送或发送邮件至配置的地址(IMAP/SMTP 轮询器) | |
| Telegram | 向配置的机器人发送消息 |
| Google Chat | 在空间中提及应用 |
| Discord | 私信机器人,在频道中 @提及,或使用 /ask / /today 斜杠命令 |
| CLI | openexecutive chat |
Document Upload
文档上传
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力