Visitors arrive with questions, not an information architecture
A portfolio usually asks visitors to understand its categories, cards, and project names before they can form a view of the designer. Recruiters, collaborators, and peers often arrive with the opposite starting point. They already have a question: Have you worked in healthcare? Why does this project matter? Which case study best shows systems thinking?
Site Agent is the guide I built across this portfolio. It does not offer unlimited conversation, and it does not replace the Archive. Its job is narrower: understand the page a visitor is reading and the recent conversation, answer from public material, then connect that answer to a useful page.
The design question was not how to put AI on a website. It was which judgments could be handed to a model, and which paths the website should always control itself.
Split authority before styling intelligence
I did not ask the model to run the whole experience. Contact, resume, all work, open project, and related-page requests have deterministic answers, so local code recognizes and executes them. The model is reserved for the work that needs language: comparing projects, explaining a method, summarizing the current article, or understanding a very short follow-up.
This division lets the model speak without giving it navigation authority. Project links, follow-up suggestions, and related work are rebuilt by the site from the final answer, current path, and public index. An unstable response cannot invent a route and send a visitor somewhere that does not exist.
The current page becomes the default subject
The early version behaved more like site-wide search. It knew what the portfolio contained, but it did not always know what the visitor was looking at. The failure was clearest on a project page. A visitor could ask “Why does it matter?” and receive a site-wide recommendation about another project.
Each request now carries the current path. Site Agent first decides whether the question refers to this page, explicitly names another entry, or asks about the portfolio as a whole. On a project page, short prompts such as “What methods did you use?”, “What should I notice?”, or “Why this approach?” stay anchored to that project. The subject changes only when the visitor names something else or clearly asks a site-wide question.
Current page
The project or article at the current path becomes the default subject.
Explicit reference
A named project overrides the current page instead of fighting the ranking.
Short continuity
Visible conversation clears on navigation; recent browser-local context expires after 15 minutes of inactivity.
Site-wide request
The search widens only when the visitor asks about all work, experience, or methods.
Treat failure as a normal route
Site Agent reaches OpenRouter through an Astro API route. Free models can be slow, return nothing, break a response format, or include provider reasoning artifacts. I could not design the interaction around the assumption that the model would always cooperate.
Each model attempt has a 4.5-second limit and all candidates share a 9-second budget. If there is no API key, a provider times out, or every candidate fails, the server builds a contextual fallback from the public index. The browser keeps an independent network timeout as a second boundary. The fallback is less flexible than a model answer, but it can still explain the current page, surface related work, and provide direct routes.
Waiting has a limit
The model cannot hold the interface in a thinking state indefinitely. The time budget is an interaction rule.
Only public material
Context comes from the generated public index, not internal notes, credentials, or unpublished project files.
Failure keeps a next step
The fallback preserves project explanation and navigation instead of handing a technical error to the visitor.
It began as a shape-shifting entrance
Site Agent began as a floating orb. Refraction, transparency, and an internal dot field helped it grow out of the page. The orb stretched into a prompt, then expanded again into a glass answer window. Day and night photobooth scenes tested whether the same material could survive very different backgrounds. I also owe an early thank-you to my friend Zihan Huang, whose conversation about agents on personal sites helped me treat this as a native site object instead of an attached support widget.
That exploration established the dot field and the idea of one object unfolding through the interaction. It also exposed the mismatch. The orb, prompt, and answer still read as three different objects. Glass copy depended too much on the page behind it. The material demonstration was louder than the job of helping someone understand their current page.
The current capsule makes continuity useful
The current version returns to a solid ink capsule in the center of the utility bar. One container stretches into the prompt, grows into the answer window, and collapses along the same path. It no longer needs refraction to prove that it exists, and page content no longer sits behind the answer copy.
The dot field remains as a state signal. It drifts at rest, settles toward the bottom through prompt and window states, and gains energy only during thinking. The visual change now explains system state instead of staging a separate material performance.
The article and the agent have to change together
Site Agent depends on the portfolio, so content maintenance is part of the product. A build script turns public projects and articles into an index with separate project, article, bilingual, and evidence fields. The agent definition states what it can answer, what it cannot access, how long an answer should be, and when thin evidence should be acknowledged. Safety, local suggestions, and fallback behavior stay in deterministic code.
The harness matters because it gives every content change a clear synchronization surface. A title or slug change affects the index and routes. A change to current-page semantics requires a context and suggestion check. A change to the public knowledge boundary triggers a generated-material audit. Site Agent is not a feature that was placed on the portfolio and left alone. It grows with the site, and it has to be checked with the site.
What it demonstrates now
This project does not have public conversion or usage data, and I do not want to disguise a working implementation as user impact. What it demonstrates is a set of concrete design decisions: put the language model in the narrow role it can handle, keep navigation and safety inside a system that can be verified, make failure remain useful, and use one visual object to connect those layers into a coherent interaction.
访客带着问题来,不是带着信息架构来
作品集通常要求访客先理解分类、卡片和项目名,再自己拼出「这个设计师擅长什么」。但招聘者、合作者和同行进入网站时,手上往往已经有问题:「做过医疗项目吗?」「这个项目为什么重要?」「哪个案例最能说明系统思考?」
Site Agent 是我给这个作品集做的全站向导。它不负责无限聊天,也不替代 Archive。它只做一件更具体的事:理解访客正在看的页面和刚刚问过的内容,用公开材料给出短回答,再把回答接回真正有用的页面。
设计问题不是「怎么把 AI 放进网站」,而是「哪些判断可以交给模型,哪些路径必须一直掌握在网站自己手里」。
先拆开权限,再谈智能
我没有让模型负责整个体验。联系、简历、全部作品、打开项目和相关页面这些动作都有确定答案,所以它们由本地代码识别和执行。模型只处理需要语言理解的部分,例如比较项目、解释方法、总结当前文章,或者接住一句很短的追问。
这个分工让模型可以说话,但不能擅自决定导航。回答里的项目链接、后续建议和相关项目都由网站根据最终答案、当前路径和公开索引重新组装。即使模型输出不稳定,访客也不会被带去一个不存在的页面。
当前页面就是默认主语
早期版本更像一个全站搜索框。它知道网站里有什么,却不一定知道访客此刻在看什么。最明显的问题出现在项目详情页:访客问「为什么它重要」,系统可能把问题理解成全站推荐,然后回答另一个项目。
现在每次请求都会带上当前路径。Site Agent 先判断问题是在说本页、明确提到了另一个项目,还是在问整个作品集。如果访客停留在一个项目页,像「用了什么方法」「还有什么值得看」「为什么这样做」这样的短问句都会默认指向当前项目。只有明确点名其他作品或提出全站问题时,主语才会切换。
当前页面
路径对应的项目或文章先成为默认主语。
明确点名
访客写出另一个项目名时,显式引用优先。
短期连续性
可见对话换页后清空,浏览器里短期保留最近上下文,15 分钟无活动后删除。
全站问题
只有在访客明确询问全部作品、经历或整体方法时,系统才放宽到整个 Archive。
把失败状态当作正常路径
Site Agent 通过 Astro API route 接入 OpenRouter。免费模型会出现延迟、空回复、格式错误和 provider 自带的推理痕迹,所以我没有把「模型总会成功」写进交互假设。
每次模型尝试都有 4.5 秒上限,全部模型共享 9 秒预算。没有 API key、模型超时或所有候选都失败时,服务器会直接用公开索引生成与当前页面相关的 fallback。浏览器端还有独立的网络超时兜底。失败后的回答可能没有模型那么灵活,但仍然会解释当前页面、推荐相关作品并提供直接入口。
等待有上限
模型不能无限占住 thinking 状态。时间预算本身就是界面规则。
只读公开内容
上下文来自生成后的公开索引,不包含内部记录、凭证或未公开项目材料。
失败仍有下一步
fallback 保留项目解释和导航,不把技术不可用直接甩给访客。
先做成一个会变形的入口
Site Agent 最早是一枚悬浮 orb。我用折射、透明度和内部点阵让它从背景里长出来,再把 orb 拉长成输入框,继续扩成玻璃回答窗。日间和夜间的 photobooth 用来检查同一套材质在不同背景上是否仍然成立。也谢谢朋友 黄子涵 早期和我讨论个人站点 agent,让我更早把它当作站点原生物件,而不是外接客服。
这组探索确定了点阵和「一个对象逐步展开」的方向,也暴露了问题。orb、输入框和回答窗仍然像三件不同的东西;玻璃正文的可读性太依赖背后的页面;视觉机制也比「帮助访客理解当前页面」更抢注意力。
后来,我把连续性留给一个 capsule
当前版本收回到底栏中央的一枚实心 ink capsule。同一个容器从静止态拉伸成输入态,再长成回答窗口,关闭时沿着同一条路径收回。它不再靠折射证明自己存在,页面内容也不再成为正文的背景。
点阵保留为状态线索。静止时缓慢漂移,进入输入和窗口状态时落向容器底部,只有 thinking 时才提高能量。这样视觉变化开始解释系统状态,而不是单独表演材质。
文章和 Agent 必须一起更新
Site Agent 依赖作品集本身,所以内容维护也是产品的一部分。构建脚本从公开项目和文章生成索引,并把项目、文章、双语字段和可检索证据分开。agent definition 规定它能回答什么、不能读取什么、语气多长、什么时候应该承认材料不足。安全规则、本地建议和 fallback 则留在确定性代码里。
这套 harness 的价值不是让 prompt 看起来完整,而是让一次内容改动有清楚的同步范围:项目标题或 slug 改了,要更新索引和导航;当前页面语义改了,要检查 context 与 suggestion;公开知识边界变了,要重新审计生成材料。Site Agent 不是放上去就结束的功能,它跟作品集一起生长,也必须跟作品集一起被检查。
它现在证明了什么
这个项目没有可以公开的转化率或使用量,我不会把「能运行」包装成用户影响。它现在能证明的是一套具体的设计判断:把语言模型放在适合它的位置,把导航和安全留给可验证的系统,把失败设计成仍然有用的状态,再让视觉对象把这些层连接成一次完整体验。