Show HN: Neui – Go web apps with a built-in AI agent
评分
51精选理由
进入全量动态池,后续可由人工或模型复核精选价值。
AI 点评
「来自 Hacker News 热门(Algolia · 中文化) 的这条信息指向AI 产品形态和落地方式变化,适合用于判断近期 AI 圈的真实动向。」
速览
Show HN: Neui – Go web apps with a built-in AI agent · HN points: 1 · comments: 0 · https://news.ycombinator.com/item?id=50656688
- Contribute to doors-dev/neui development by creating an account on GitHub.
正文
Neui: an AI agent built into your Go web app
Neui is an AI agent and a web framework built as one stack. The framework, Doors (Apache-2.0), lets Go teams build modern interactive apps with no separate frontend and no API layer. Neui adds the agent: it runs inside the user's session, sees the parts of the page you let it see, operates the UI like a user, and brings its own work environment for the jobs a chat alone cannot do.
Every feature you build for users is instantly usable by the agent, with a work environment powerful enough to automate the work your users do by hand.
Contents
- What you get
- Runtime
- Agentic Apps
- Chat
- Work environment
- Compared with CopilotKit and Vercel AI SDK
- Getting started
What you get
The agent operates your UI
Developers mark which parts of the page the agent may see and use, right in the existing markup. The agent then clicks, types and reads like a user, and the app's own logic runs. There is no per-action code to write and no state to mirror.
Capability-based tools with reactive permissions
A tool is one Go function that runs on the server, with no endpoint or permission code to write. Developers decide what the agent can see and do right where they build the UI, so its access is scoped to each user and updates with the screen.
An agent work environment
The agent gets its own file workspace, scripts that run bulk UI work in one step, spreadsheets, web search, MCP connectors, background tasks, and automatic handling of long conversations. One script can call every tool and work across the whole UI in a single step.
Agentic apps
When a user needs functionality your UI doesn't have, the agent builds it on the spot, anything from a single screen to a specialized app. It runs in the page with the user's permissions, and the agent stays in the loop to make the decisions.
Fully-featured chat
Your users get the chat experience they already know from chat apps, with nothing to build or purchase.
Cheaper to run
The conversation is prompt-cache friendly, so input costs an estimated 6 to 14 times less than in copilots that rebuild the prompt for every screen, depending on the provider's cache pricing. Built-in scripts do bulk work without extra model turns or context bloat.
The browser can't steer the agent
The conversation, instructions and tools live on the server, and the browser sends only the user's new message. A tampered browser can't add tools, rewrite history or change what the agent is told.
Runtime
Every open page runs on the server, integrated with the agent harness. You mark in the page template what the agent may see and use.
Works the real UI. The agent reads, fills and clicks the elements you mark, as the user would, and your handlers run as usual. There's no state to mirror and no action to re-implement.
~>neui.Use{
Desc: "Customer's email",
// RW: the agent reads the value in the user's browser or writes its own.
Rights: neui.RW,
} <input type="email" name="email">
Tools in the template. Register agent tools right in the page template, based on the UI context and the user's permissions.
~(if user.IsAdmin() {
~neui.Tool[Refund, Receipt]{
Name: "refund",
Desc: "Refund the order",
Handler: orders.Refund,
}
})
Persistent tools. Go functions registered for the whole app or for one session are available in every chat. The built-in work environment works the same way.
crm := neui.NewModule("crm", "Customer records of the signed-in user")
crm.Tool("find", "Find a customer by name or email", customers.Find)
Page context. Attach data to a part of the page to tell the agent what it shows, such as the records in a view or hints on how to use it.
~neui.Data{
Text: "Open orders of this customer",
Object: orders,
}
App events. Your app can tell the agent when something happens, such as a payment arriving. An idle agent reacts right away, and a busy one picks it up on its next turn.
neui.Instance(ctx).Emit(ctx, "payment_received", map[string]string{"invoice": id}, nil)
Stays in sync without token waste. The framework tracks tools, data and elements as the page changes, and the agent reads them only when it needs to.
Agentic Apps
An agentic app is a program the agent writes and runs for the user in an island, a region of the page. You declare the island in the page template and give it the components and Go functions its apps may use.
~neui.Island{
Name: "workbench",
Desc: "Apps for the user's invoice work",
Template: func(slot gox.Comp) gox.Elem { return <section>~(slot)</section> },
Library: func(l neui.Library) error {
l.Tool("overdue", "Overdue invoices, one page at a time", invoices.Overdue)
l.Tool("remind", "Send a payment reminder", invoices.Remind)
return nekit.IslandRegisterAll(l)
},
}
- The agent writes a program. It builds an app for the user's request from your component library and the tools you declare, and runs it right away.
- The model is called only for decisions. The app handles user actions itself and calls the agent only when a decision is needed. The UI stays responsive, no tokens are spent on routine steps, and the agent is still in the loop.
- Data stays out of the context. The agent works with data through the app's script, without loading it into its context. Data costs no tokens, and text inside it can't steer the agent.
- App changes on the fly. The user can ask for an extra column, another step or a different check, and the agent updates the running app without losing their work.
- Runs with the user's permissions. The app is sandboxed and can do only what the signed-in user can, through the components and functions you declared, with no endpoints to build.
Widgets included. neui.dev/nekit includes a general-purpose widget set built to cover any business flow, from data entry to review and reporting. It takes your theme from CSS variables, and your own components work alongside it.
- Layout. Columns, rows and grids that compose widgets into typical layouts.
- Form. Declarative forms for any purpose: every field type, groups, repeatable lists and multi-step flows, with live validation.
- Table. A full-featured data table with paging, sorting, search, row selection and row actions.
- Markdown cards. A universal output block for text, tables, images and file downloads, plain or as a card, info, success, warning or danger.
Compared with declarative generative UI. In A2UI and similar formats the model describes the screen, and every user action is another model turn. That suits a one-off screen such as a confirmation. An agentic app is cheaper and faster as soon as the user does more than a few things.
Chat
Neui ships a complete chat experience out of the box. Use it as is, configure its theme and features, or fork it to build something of your own.
- Controls users already know. Stop a run, edit and resend a message, queue the next one while the agent works, or duplicate a thread to try another path.
- Persistence out of the box. History, the thread list and search are built in. Use the included storages or plug in your own.
- Runs on the server. The conversation, the running answer and the agent's tools live on the server, and the browser only displays them. Nothing sensitive reaches the client, and a reload or a second tab picks up where the user left off.
- Files both ways. Users attach files to a message, and the agent returns finished files as downloads in its answer.
- Long conversations keep working. Older turns are summarized in the background when the context fills up, without interrupting the user.
- Task management and more. Background jobs show in the chat and can be cancelled, the agent can ask questions with ready answers, and your app can notify the agent when something happens.
Work environment
Besides the chat and the page, the agent has a workspace on the server for real work.
- Filesystem. Each chat gets its own sandboxed filesystem, where the agent reads uploads, unpacks archives and builds new files for the user to download.
- Scripts for bulk work. The agent writes one script that calls its tools and works across the page, so updating 300 invoices takes a single model call.
- Spreadsheets. The agent reads large .xlsx files and turns raw exports into finished reports with totals, charts and highlighting.
- Web and connectors. The agent reads web pages, searches through a service you connect, and uses the tools of your MCP servers.
- Background tasks. Long operations run in the background, and the agent picks up each result when it arrives, so the user keeps chatting.
- Contained and configurable. Resources are capped, and you choose which tools each app or user gets.
Compared with CopilotKit and Vercel AI SDK
The usual alternatives are CopilotKit (plus paid Intelligence), Vercel AI SDK with Sandbox, assistant-ui, OpenAI ChatKit, LangGraph with Agent Server, browser agents and WebMCP. For a Go team each of them means bolting on a React island, CopilotKit and a Node runtime: a second stack.
Each row was checked against neui's code and the competitors' current docs and source. Competitor cells describe the default open-source path.
| Capability | Neui | CopilotKit | Vercel AI SDK |
|---|---|---|---|
| Agent operates the UI | Yes. Developers mark, right in the UI template, which elements the agent may see and use; no per-action code is needed. | Partial. One hand-written frontend tool per action | No. Fully hand-wired: each UI action needs a tool on the server and a handler in the browser |
| Agent work environment | Built in. Its own files and scripts; one script can call every tool and work across the whole UI in a single step | No. One tool call per action; sandbox only through a third-party service; files need own wiring | Partial. Code can call your tools, with Claude only; paid cloud sandbox; files need own wiring |
| Agentic apps | Agent-written app. Built from your components, it runs on the server, handles clicks and data itself, and calls the model only when a step needs judgment | Model per click, or a free-form page. The model fills your components and each click starts a new agent run. Or it writes its own web page, reaching your data through functions the developer registers | Model picks a tool, you pre-wire the screen. The model calls one of your tools and your component shows the result. Clicks run code you wrote in advance; the next agent step is another model request |
| Agent permissions | Built into the screen. Developers decide what the agent can see and do where they build the UI; no permission code to write | Manual. Developers write checks for each agent action; tools sent by the browser are trusted | Manual. Developers write checks for each tool |
| Provider isolation | Yes. Keys, prompt and tools are server-only | Weak. Keys stay on the server, but the browser sends history, tools, context and state on every run, and the server uses them as sent | Partial. Tools declared on the server; chat history sent from the browser |
| Prompt-cache stability | Yes. Fixed tools and system prompt; page state arrives in tool results | No. The system prompt is rebuilt from app state every run | Yes. Server owns tools and prompt; history is only appended |
| Traffic per message | Tiny. Only the new message; history stays on the server, minimal delays | Grows with the conversation. Full history on every run and every tool call | Grows with the conversation by default. Full history on every request and tool call; trimming needs your own server-side store |
| Advanced chat features | Built in. Thread list, full-text search, rewind, clone | Partial. Thread list needs the paid tier; other features require own wiring and backend support | No. No thread list; thread features are yours to build |
| Auto-compaction | Yes. Rolling, in the background, seamless for the user, or manual, and recovers when the history outgrows the model's window, for example after a switch to a smaller model | No | Partial. Manual recipe in the docs |
| Supported platforms | One. Web apps built with Go and Doors | Many. React-first web frontends | Many. Most JavaScript frameworks |
Getting started
go get neui.dev
Neui is a Go module (neui.dev) that plugs into a Doors app: you configure the agent once with options on the Doors app, turn it on per session once the user is known, and render nekit.Chat on the pages where the user should talk to the agent.
Claude, GPT, Gemini and DeepSeek providers are included, plus a generic one for any server with an OpenAI-compatible Chat Completions API, such as Ollama, vLLM or OpenRouter. SQLite thread storage and disk or S3 upload storage are included too.
Start with the quick start and the back office example, and see the package documentation in doc.go, api/doc.go and nekit/doc.go, and the Doors documentation for building the app itself.
相关条目
92
精选OpenRouter 推出提示缓存与粘性路由,大幅降低多轮对话成本
对于高频调用 AI API 的开发者,这个功能堪称直接省钱利器。粘性路由保证了缓存命中率,配合 session_id 零配置接入,值得所有使用 OpenRouter 的团队立即尝试。
91
精选ChatGPT Work:可在跨应用和文件中执行操作的AI Agent
我认为这是AI助手从问答走向执行的关键一步。对需要自动化复杂工作流的专业人士尤其值得关注。ChatGPT Work可能成为生产力工具的新范式。
90
精选前沿实验室代理入侵事件技术时间线:2026年7月事件剖析
这篇技术时间线值得所有AI安全研究员和代理开发者细读——它不只是描述一次攻击,而是为整个行业敲响了代理系统防御体系薄弱的警钟。对正在部署自主代理的团队来说,这是必读的灾难预防手册。
90
精选更好的工具反而让Copilot代码审查更糟?GitHub这样改进
这篇博客值得所有AI产品工程师和ML从业者仔细阅读——它打破了'更强大的工具=更好的AI'的直觉,转而强调与Agent推理模式匹配的工程哲学。对正在优化代码审查或类似Agent产品的团队尤其重要。
88
精选OpenRouter 推出统一多模态 API:单端点支持图像、视频、音频、嵌入与转录
这条消息值得所有做多模态AI应用的开发者关注:OpenRouter用联合API解决了模型切换的痛点,特别适合初创团队或快速原型开发。如果你正被多个API密钥和SDK折磨,这个接口可能是你需要的统一层。
87
精选Anthropic 推出 Claude for Teachers:面向教师的教育 AI 工具
这条消息对教育工作者和AI行业观察者都很有价值。Anthropic没有选择通用聊天机器人,而是专门为教师设计了安全可控的工具,这显示出AI在垂直场景落地的正确思路——不是技术炫技,而是切实解决用户痛点。同时,产品内置的安全护栏也值得其他AI公司参考,尤其是在面向儿童或青少年的场景中。
86
精选OpenRouter发布全新Auto Router:用市场智慧优化模型路由
这条更新值得所有用API开发AI应用的人关注。以前选模型靠经验和测试,现在市场数据帮你选。虽然细节不多,但方向很对。对依赖聚合模型服务的团队尤其重要。
86
精选Claude Code v2.1.211 发布:多项修复与改进
作为一个经常使用 Claude Code 进行自动化编码的开发者,我特别关注这次的安全修复,尤其是权限预览字符绕过和自动模式覆盖钩子决策的问题——这些直接关系到团队协作时的安全边界。后台代理报告的改进也让长时间运行的任务更可靠。建议所有使用者尽快升级。