Repository navigation
[Proposal] Answer Artifacts: Make final agent replies readable HTML instead of plain text #9231
Thinker-Joe
started this conversation in
Ideas
Replies: 1 comment
|
讲真,现在真的有点认知过载,同时并行跑N个任务,卡住了需要快速理解问题在那,然后再决策让Agent推进,需要一些新时代的工作来帮助解决问题 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Long Markdown text from agents creates high cognitive load for users.
Reading long text is now the primary bottleneck in human-agent workflows.
We propose a first-class feature: Answer Artifacts.
When an agent completes a task, the platform renders its final response as a clean, visual HTML card (tables, sequence diagrams, key metrics, and callouts).
Users see structured information immediately instead of reading walls of plain text.
This proposal builds directly on Multica's existing render engine. It solves four missing requirements:
Why This Matters
Andrej Karpathy highlighted the core problem (reference link):
His "understanding ladder" shows the ideal progression of output formats:
Plain text → Controlled English (ASD-STE100) → Diagrams → Visual HTML pages → Explainer videos.
Karpathy describes these as "custom, discardable software artifacts."
For short answers, plain text is sufficient. But for multi-step task summaries, system architectures, and data comparisons, visual artifacts save massive human review time.
This matches the core vision in Multica's
VISION.md:Current State in Multica
Multica already contains strong visualization building blocks:
packages/views/editor/dynamic-block.tsx. When an agent outputshtmlormermaidcode blocks, the frontend renders them inline.<multica-artifact>tag parsing and chat artifact cards.Why PR #7188 was Reverted (#7584)
PR #7188 introduced live editable HTML previews in chat, but maintainers reverted it in #7584.
The revert reason was product scope, not code quality or security:
This proposal directly resolves both concerns:
The Economics: Draft vs. Raw HTML
Direct HTML generation by LLMs is inefficient:
With this architecture, rich visual answers remain affordable for daily use.
Proposed Solution
1. User Interface
2. Draft Protocol
The agent returns structured draft blocks instead of raw CSS/HTML coordinates:
The client renderer converts this draft into an interactive SVG/HTML view in ~50 ms.
3. Execution Policy
Off|On Request|Always On (for complex tasks).Security Model
Agent outputs are untrusted inputs. We maintain the strict security posture established in #7188 and #5272:
<iframe sandbox="allow-scripts">withoutallow-same-origin.default-src 'none'. Inline styles only. Prohibit external CDNs, external web fonts, and network calls.<script>tags by default. Allow interactive UI components only via verified template handlers.Questions for Maintainers
@multica/views), or as an ACP agent tool/skill?<multica-artifact>format (feat(views): implement frontend UI artifact viewer and markdown parsing [MYL-41] #5122 / MYL-40: Add chat inline artifact wrapper instructions #5129), or run as a standalone dynamic block?中文摘要 (Chinese Summary)
当前 Agent 执行完毕后,最终回复通常是长篇 Markdown 纯文字,人类用户的阅读与理解成本极高,成为人机协同的核心瓶颈。
Andrej Karpathy 提出的"理解阶梯"指出:纯文字 → 受控语言 (ASD-STE100) → 图表 → 可视化 HTML 页面 → 视频。针对复杂工程总结,可视化页面能显著降低认知负荷。
Multica 当前已有强大的渲染底座(v0.6.0 已支持动态代码块内联渲染),但缺少专门面向"Agent 最终答复"的轻量化机制。前期 PR #7188 被回退(#7584)的核心原因是未闭环(无法交回 Agent)以及范围失控(波及所有人类消息)。
本提案基于 ASD-STE100 规范设计,聚焦解决核心痛点:
All reactions