---
title: '用 Cursor 打造桌面语音 Jarvis：一条 Prompt 起步的 GPT Realtime 2 实战'
video_id: 4WBOmhI11rQ
url: https://youtu.be/4WBOmhI11rQ
title_en: "Building a Real AI Jarvis (GPT Realtime 2 + Cursor)"
channel: Riley Brown
published: 2026-07-01
duration: "21:08"
topics: ["AI 编程与建站", "模型与能力"]
noted: 2026-07-06
value: B
views: '2.3万'
---


[![封面](https://i.ytimg.com/vi/4WBOmhI11rQ/maxresdefault.jpg)](https://youtu.be/4WBOmhI11rQ)

> Riley Brown · 21:08 · 发布 2026-07-01 · 2.3万次观看(截至抓取) · [观看原视频](https://youtu.be/4WBOmhI11rQ)

## 主旨
零编程经验者用 Cursor 写一条自然语言 prompt,配合 OpenAI GPT Realtime 2 语音模型和 Exa 搜索 API,几轮迭代生成一个能语音对话、调用工具、操作电脑的桌面 AI companion。

## 核心论点
1. **零代码前提下,一条精心设计的自然语言 prompt 就能让 Cursor 生成一个可用的桌面语音 agent 雏形。**(→ 详解1、2)
2. **GPT Realtime 2 是让 AI companion 具备自然、可打断的实时语音对话能力的关键底层模型。**([[#1-零代码前提与-gpt-realtime-2-0103|→ 详解1]])
3. **给语音 agent 加工具(网络搜索、图像生成、图表渲染)只需在 prompt 里描述能力清单,由 Cursor 自动接线实现。**(→ 详解2、3)
4. **产品级体验靠多轮 prompt 迭代打磨(修 bug、补 key、UI 重做)逐步收敛,而不是一次成型。**([[#3-迭代修复mermaid-报错补-exa-keyui-重做-0915|→ 详解3]])
5. **让 agent 直接操作真实电脑(computer use mode)时,高风险动作默认需要显式人工确认,这是安全护栏而非缺陷。**([[#4-computer-use-mode-与显式确认护栏-1252|→ 详解4]])

## 知识点详解

### 1. 零代码前提与 GPT Realtime 2 [01:03](https://youtu.be/4WBOmhI11rQ?t=63)
视频要做的是一个"完全定制版 Jarvis":一个可语音对话、能调用工具、还能操控电脑的桌面 AI companion,工具选用 Cursor。博主强调所需编程经验"the answer is 0 out of 10"[01:22](https://youtu.be/4WBOmhI11rQ?t=82)——不需要会写代码,只需要会描述需求。

真正撑起体验的底层技术是 OpenAI 新发布的 GPT Realtime 2,一个可以实时语音对话、支持打断、并且能在对话中调用工具的语音模型。相比传统"语音转文字→大模型→文字转语音"的拼接方案,它让 AI companion 的对话更自然流畅。

准备工作很简单:去 cursor.com 下载 Cursor 并登录,打开右上角的 Agents 窗口,新建一个本地文件夹作为项目 workspace。

### 2. 第一条长 prompt:定义人设、UI 与工具清单 [03:56](https://youtu.be/4WBOmhI11rQ?t=236)
第一步是去 openai.com/api-keys 生成一个专用的 API key,并在 prompt 里把它交给 Cursor。整条初始 prompt 用自然语言描述了几件事:桌面 AI companion 的人设定位("像个人 Jarvis,对话式、快、可视化、能用工具")、技术选型(基于 GPT Realtime 2 的 Electron 桌面应用)、UI 结构(带表情动画的小窗口 + 用于展示搜索结果/图表/图片的 artifact 面板)。

在工具清单里,博主直接用一句话让 Cursor 接入网络搜索能力("one of the tools will be web search"[04:57](https://youtu.be/4WBOmhI11rQ?t=297)),搜索服务选用 Exa;紧接着又加了一句要生成图像的需求("we're also going to be generating images"[05:03](https://youtu.be/4WBOmhI11rQ?t=303)),以及渲染 Mermaid 图表的能力。整条 prompt 跑完后,Cursor 花了约 10-15 分钟生成出第一版应用——一个会眨眼、有基础语音对话与工具调用能力的桌面 companion(命名为 Ricky)。这一步体现的正是给语音 agent 加工具只需描述能力、由编码 agent 自动接线的做法。

### 3. 迭代修复:Mermaid 报错、补 Exa key、UI 重做 [09:15](https://youtu.be/4WBOmhI11rQ?t=555)
首版试跑立刻暴露两个问题:一是生成的 Mermaid 图表出现解析错误("parse error on line 8");二是网络搜索功能完全不可用——原因是博主忘了在第一条 prompt 里附上 Exa 的 API key。

Exa 是"just a web search API"[09:15](https://youtu.be/4WBOmhI11rQ?t=555),即专为给 agent 提供网络检索能力设计的搜索接口,用法和 OpenAI key 一样,申请后直接交给 Cursor。第二条大 prompt 一次性提出约十项修改:修复 Mermaid 渲染、补上 Exa key、把网络搜索结果从表格改成更好看的 markdown 流式呈现,以及整体 UI 简化(去掉多余圆角组件,面部动画占屏幕左半、artifact 面板占右半,中间一条分割线)。这一轮迭代之后,搜索、图表渲染、markdown 呈现才真正跑通,说明产品级体验是靠反复喂 bug 清单迭代出来的,不是一次成型。

### 4. Computer Use Mode 与显式确认护栏 [12:52](https://youtu.be/4WBOmhI11rQ?t=772)
Ricky 还被要求具备"computer use mode"——切换进入后可以直接操作用户电脑上的其他应用(比如打开浏览器、打开 Codex)。当博主让它往 Codex 输入框里打字并按回车提交时,agent 明确回应:"I need your explicit confirmation before typing into an app"[12:52](https://youtu.be/4WBOmhI11rQ?t=772),必须先拿到用户口头确认才会真正执行输入动作。

博主接着追问能否关掉这层强制确认("Is there a way to turn off that explicit approval mode"[13:20](https://youtu.be/4WBOmhI11rQ?t=800)),并让 Cursor 去代码里定位这个拦截逻辑。这段演示清楚说明:电脑控制类 agent 对"输入/提交"这类不可逆动作默认加一道人工确认关卡,是刻意设计的安全边界,而不是产品缺陷或延迟。后续 UI 也把 computer use 模式改成缩小到屏幕左下角的半透明小窗口,方便看清桌面上正在发生的操作。

### 5. 缩略图生成工具:网格编号与连续编辑 [15:16](https://youtu.be/4WBOmhI11rQ?t=916)
最后一轮功能是给 Ricky 加图像/缩略图生成能力,底层用的是 GPT 的图像生成/编辑模型,并支持以一张参考图为基础做图生图编辑。交互设计上,博主明确要求"generate them in a grid"[15:16](https://youtu.be/4WBOmhI11rQ?t=916):每次生成的图片按网格排列并自动编号,最新生成的图始终排到第一位;用户可以直接说"编辑第 2 张,改成……"来对某张历史图做连续迭代编辑,不需要重新描述整张图。

演示中依次生成了带 iPhone、MacBook、蓝色卡通角色等元素的多张缩略图,并对指定编号的图做加太阳镜、换文字、换背景等局部编辑,整个过程完全靠语音指令完成,不需要打开任何图像编辑软件。

### 6. 收尾:整体演示与开源分享 [19:33](https://youtu.be/4WBOmhI11rQ?t=1173)
视频结尾做了一轮整体串联演示:唤醒 Ricky、切换情绪、开菜单、进入 computer use 模式操作 Codex、退出模式,验证前面几轮迭代的功能都能正常协同工作。博主表示会把整个项目上传到 GitHub,观众既可以直接拿 GitHub 链接喂给 Cursor 说"clone this"来复刻同一个 Jarvis,也可以只用视频描述里的 prompt 从零开始定制自己的版本。

## 可执行步骤
- [ ] 去 cursor.com 下载 Cursor,登录后打开 Agents 窗口,新建一个空文件夹作为项目 workspace
- [ ] 去 openai.com/api-keys 生成一个专用 API key(用完及时删除/撤销,不要长期留存在剪贴板或聊天记录里)
- [ ] 写一条长 prompt,一次性说清:companion 的人设与语气、要用的语音模型(GPT Realtime 2)、UI 布局(动画表情 + artifact 面板)、需要的工具清单(网络搜索/图像生成/图表渲染)
- [ ] 首版跑完后逐条记录 bug 与体验问题,合并成第二条大 prompt 一次性喂回去迭代,而不是一个个小改
- [ ] 需要网络搜索工具时,单独去 Exa(或同类 API)申请 key,和 OpenAI key 一样直接交给 Cursor 接入
- [ ] 涉及操作真实电脑的功能,先确认默认存在"输入前需人工确认"这道关卡,不要图省事直接关闭

## 关联
- 印证:Computer use mode 下"输入/提交前需用户显式确认"与 Human-in-the-Loop审批"对高风险动作设人工批准关卡后才放行 agent 继续执行"的定义完全一致,只是场景从 force push 换成了桌面操作。

## 术语
- Jarvis(戏称一种像管家一样能对话、办事的桌面 AI companion,非具体产品名)
- GPT Realtime 2(OpenAI 新版实时语音模型,支持自然打断对话与在对话中调用工具)
- Exa(面向 AI agent 场景优化的网络搜索 API)
- Mermaid(用文本语法描述、可自动渲染成流程图/图表的标记语言)
- Electron(用 Web 技术打包出跨平台桌面应用的框架)
- Artifact 面板(companion UI 里专门展示搜索结果、图表、图片等结构化内容的侧边区域)

## 金句
> "Well, the answer is 0 out of 10." → 一句话点透这类"跟做视频"的门槛定位:不需要任何编程经验,靠描述需求就能攒出一个可用的 agent 雏形。

## 立场与利益
博主在视频中段与结尾都插入了自己 agency 的推广:团队在纽约为企业提供"落地 AI agent"的咨询服务(把 agent 接入 Slack、iMessage,做营销类 agent 等),链接放在视频简介里。这部分是独立的商业推广,与本视频演示的构建步骤本身没有强制关联,教程可以脱离该服务独立跟做。

## 价值定位
这类视频对已经会写 prompt、想快速体验"GPT Realtime 2 + 工具调用"组合能做到什么程度的人有直接实操价值,跟着做一遍能在半小时内攒出一个可交互的语音 agent 原型。但视频没有讲清楚背后的工程判断——工具是怎么注册和鉴权的、Electron 应用的错误处理怎么设计、多轮迭代 prompt 之间状态是如何保留的。复制 prompt 能让它跑起来,但要把它改造成能长期维护、真正用在自己业务里的东西,还需要自己补足这些工程细节。适合"先跟一遍找感觉"的人,不适合想学底层架构原理的人。

## 自检问题
1. 这个视频里搭建语音 agent 用到的核心工具组合是什么?
   **答案**:Cursor(Agents 窗口写自然语言 prompt 生成代码)+ OpenAI GPT Realtime 2(实时语音对话模型)+ Exa(网络搜索 API),对应知识点1、2 [01:03](https://youtu.be/4WBOmhI11rQ?t=63)
2. 第一版 Ricky 的网络搜索功能为什么用不了?
   **答案**:因为第一条 prompt 跑之前忘记提供 Exa 的 API key,第二轮迭代补上 key 后才打通,对应知识点3 [09:15](https://youtu.be/4WBOmhI11rQ?t=555)
3. Computer use mode 下,agent 要往应用里输入文字或提交内容,默认要先经过什么关卡?
   **答案**:默认需要用户给出显式确认才会执行输入/提交动作,这是内置的安全护栏而非缺陷,对应知识点4 [12:52](https://youtu.be/4WBOmhI11rQ?t=772)
4. 视频里缩略图生成工具的关键交互设计是什么?
   **答案**:图片按网格生成并自动编号,最新生成的始终排到第一位,可以直接用编号对某张历史图做连续语音编辑,对应知识点5 [15:16](https://youtu.be/4WBOmhI11rQ?t=916)
5. 视频结尾提到的商业推广和教程本身的构建步骤是什么关系?
   **答案**:是博主 agency 帮企业落地 AI agent 的独立咨询服务推广,和跟着教程自己构建 Jarvis 没有强制关联,对应"立场与利益"节 [19:33](https://youtu.be/4WBOmhI11rQ?t=1173)

> [!quote] 💬 热门评论 top-17 主 + 3 回(抓取 2026-07-07)
> 
> [1] **@GrahamMiles**:一如既往精彩的视频，我彻底被震撼了。我在想能不能把它装到厨房的平板电脑上，让它管理购物清单、家庭日历、提醒和约会，甚至连接灌溉系统和安防摄像头？还能在我做饭时读出菜谱！我想知道API要多少钱。是时候该好好研究一下了。
> [2] **@rogerbruce2896**:好视频！有一点你没提到，实际运行Jarvis要花多少钱？如果我每天用4小时左右，费用会是多少？另外，我刚失业了，怎么才能学会为企业构建智能体？我想这是个好主意，直到我找到更稳定的工作。绝对关注你Riley！这个视频看得很开心，但也展示了AI有多强大！ 👍 7
> [3] **@WayneBoreland**:这是我见过的第一个真正让我停下来思考的Jarvis风格演示：“好吧，这真的可能成为我们工作方式的一部分。”声音和面孔很酷，但电脑操作部分引起了我的注意。如果它能可靠地处理小的重复性任务而无需我盯着，那才是真正的价值所在。好视频，确实给了我一些灵感。 👍 3
> [4] **@NateNeedham**:对我来说，电脑操作部分才是真正实用的地方。作为一个非开发者，用这些东西构建实际业务，我一直在问的问题不是“它能对话吗”，而是“我睡觉时它能可靠地做什么？”一个能端到端处理一个烦人重复任务的Jarvis，比一个什么都能做一次的要好。 👍 1
> [5] **@PraneyBehl**:从一个在完全不同领域构建类似项目的人的角度来说：这个视频里问题和答案之间的剪辑隐藏了响应的延迟，不是很多人能看出来。不过做得很好！ 👍 14
> &nbsp;&nbsp;↪ **@theagency007**:我的设置和他非常相似，延迟也一样低。一开始不是这样的，我不断迭代才达到现在的水平。 👍 2
> &nbsp;&nbsp;↪ **@AjitRaina-y8w**:Riley——你剪辑掉了那些间隙还是没有？
> [6] **@JnaneshChandrappa**:你好Riley，我是Jnanesh，19岁，来自班加罗尔——一个文学专业的学生，看了你关于vibe coding的视频后开始接触AI。你的内容让我相信像我这样的人也能做到。我完全不懂技术，零编程知识，正在努力学习AI以便快速构建应用并最终创业。你觉得我应该先重点学习哪些AI技能？非常感谢你的时间——喜欢你的内容！此致，Jnanesh
> [7] **@AllenHorn0507**:你可能根本不会看到这条评论……但……我还是想让你知道，你完全改变了我这个盲人的生活！我正在尝试把它改造成一个更偏向代理型AI助手，用于无障碍访问。作为盲人或低视力者，我发现屏幕阅读技术只提供了等式的一半，即消费部分。但在现代工作场所的遗留系统中，这不足以与这些系统交互并做任何有意义的事情。我目睹了你过去几年的成长，为你感到无比自豪，世界上还有像你这样的人。继续前进，继续创造这样棒的项目！！！！ 👍 1
> [9] **@ANNA_family_explains**:我喜欢你开发的功能测试流程！在构建东西时，了解如何快速完成这些检查清单非常有价值。
> [11] **@rogerbruce2896**:你提到提示词在描述里，但我没看到那个提示词。如果你能加上去会很有帮助。谢谢你的好视频！
> [12] **@rick.barcellos**:为什么不直接用Codex来构建它？抱歉如果我错过了这个说明，最近在试用Cursor，在决定是否值得，因为我已经有Codex了。 👍 12
> &nbsp;&nbsp;↪ **@bastianst4859**:每隔一两周就在10种不同工具之间来回切换毫无意义。这周Codex是巅峰，下周Claude Cowork，有时Cursor在另一个CLI里，然后GLM等等。我现在坚持用Codex。下周又会有别的东西成为主角。 👍 2
> [13] **@XLynnTV**:嘿，你能把创建编码代理的提示词发在描述或评论里吗？ 👍 1
> ——其他 6 条:感谢/夸赞([8]@-LightSmit、[10]@bhighb、[14]@nomad4x、[15]@Patbonn、[16]@riftveil_mc、[17]@XBMotivates)
> <details><summary>英文原文</summary>[1] @GrahamMiles:Amzing video as always. My mind is blown. I'm wondering if I could put this on a tablet mounted in our kitchen and it could manage the shopping list, family calendar, call out reminders and appointments, even tie into irrigation and security cameras? Recipes called out as I cook!! I wonderhow much the API costs. Time to have a play around I think.<br>[2] @rogerbruce2896:great video! one thing you did not mention is how much does it cost to actually run Jarvis? If I used it for 4 hours a day or so what would the cost be? Also, I just lost my job, how can I learn to build agents for businesses. Was thinking this would be a great idea until I can land something more permanent. Definitely following you Riley! this was a great fun to watch, but also shows how powerful AI is getting!! 👍 7<br>[3] @WayneBoreland:This is the first Jarvis-style demo I’ve seen that actually made me stop and think, “Okay, this could really become part of how we work.” The voice and face are cool, but the computer-use part is what caught my attention. If this can reliably handle small repeatable tasks without me babysitting it, that’s where I think the real value is. Great video, definitely gave me some ideas. 👍 3<br>[4] @NateNeedham:The computer-use part is where this gets real for me. As a non-developer building actual businesses with this stuff, the question I keep landing on isn't "can it talk back," it's "what will it reliably DO while I sleep?" A Jarvis that handles one annoying recurring task end-to-end beats one that can do everything once. 👍 1<br>[5] @PraneyBehl:From someone who has been building on a similar project in a much different space: not many people see the cuts between the questions and the answers in this video that hide the latency in the responses.  Great work though! 👍 14<br>&nbsp;&nbsp;↪ @theagency007:I have a very similar setup to his, and my latency is just as low as his. It wasn't at first. I had to keep iterating on it, but it is now. 👍 2<br>&nbsp;&nbsp;↪ @AjitRaina-y8w:Riley - did you  cut out the gaps or not?<br>[6] @JnaneshChandrappa:Hi Riley, I'm Jnanesh, 19, from Bangalore — a literature student who got into AI after watching your videos on vibe coding. Your content is what made me believe this was possible for someone like me. I'm a complete non-tech person with zero coding knowledge, trying to learn AI fast to build apps and eventually a startup. What AI skills would you recommend I focus on first? Thanks so much for your time — love the content! Best, Jnanesh<br>[7] @AllenHorn0507:You probably won’t even see this comment… But… even still, I thought I should let you know that you have completely changed this blind guy’s life! I’m trying to adapt it to be more of an agendic AI assistant for accessibility.   Being BLV, I have found that screen reading technology only gives you one half of the equation, which is the consumption portion. However, with legacy systems in modern workplaces, that’s not enough in order to interact with those systems and be able to do anything meaningful.  I’ve watched you grow, over the last few years, and I’m so incredibly proud that there are people like you out there. Keep going and keep creating awesome projects like this!!!! 👍 1<br>[8] @-LightSmit:Cutting the delay is smart but sneaky 👍 2<br>[9] @ANNA_family_explains:I love the feature testing process you have developed! It is very valuable to understand how to fly through these checklists when building things.<br>[10] @bhighb:This is what Siri should be. 👍 1<br>[11] @rogerbruce2896:You mentioned the prompt in in the description but I don't see that prompt. If you can add that it would be helpful. ty for the great video!<br>[12] @rick.barcellos:Howcome not just use Codex to build it? Sorry if I missed that note, looking into Cursor these days and trying to decide if it’s worth it when I already have Codex 👍 12<br>&nbsp;&nbsp;↪ @bastianst4859:The back and forth switching between 10 different tools every 1-2 weeks is pointless. One week Codex is peak, another week Claude Cowork, sometimes Cursor in another CLI, then GLM blablabla. I stick to Codex for now. Next week something else will be the showrunner again. 👍 2<br>[13] @XLynnTV:Yo, think you could post the prompt for creation of the coding agent in the desc or comments? 👍 1<br>[14] @nomad4x:Damn Riley, you just keep cooking! 👍 1<br>[15] @Patbonn:This channel and your videos is amazing! It's my go to when i want to know about new ai and how to use it. Thanks! 👍 1<br>[16] @riftveil_mc:18:49 you actually went dinner bro. 👍 1<br>[17] @XBMotivates:This is incredible! Thanks for the video, Riley!</details>