AI agents

Neui integrates AI agents directly into Go server-rendered UIs

The new Neui framework allows Go developers to build interactive apps where AI agents operate the UI, manage files, and generate sub-apps without a separate frontend or API layer.

Server rack with Go mascots interacting with UI elements
Illustration generated for this article

GitHub user doors-dev has released Neui, a novel web framework that merges AI agents with server-rendered user interfaces. Published on November 26, 2026, this tool enables Go teams to build applications where the agent runs inside the user session, interacting with marked UI elements and managing its own work environment. This approach eliminates the need for separate frontend code or distinct API layers for agent interactions.

What happened

Neui is built on top of Doors, an Apache-2.0 licensed framework that allows developers to create modern interactive applications using only Go. Unlike traditional architectures that require a React or Vue frontend alongside a backend, Neui integrates the AI agent directly into the server-side rendering pipeline. The agent can see specific parts of the page, click buttons, type into fields, and read data exactly as a human user would, triggering the application’s existing logic without requiring duplicate state management or per-action code.

The framework introduces the concept of "agentic apps," where the AI can generate and run specialized mini-applications within a designated region of the page. These sub-apps are built from a library of components and tools provided by the developer, allowing the agent to handle complex workflows like invoice processing or data review. The agent remains in the loop for decision-making but handles routine user actions locally, reducing token usage and latency. This structure ensures that every feature built for human users is immediately available to the agent, scoped by the same permissions and context.

How it works

Developers control agent access by marking specific HTML elements in their Go templates. Using directives like neui.Use, they define whether the agent can read or write to a field. Tools are registered directly in the template context, meaning permissions are dynamic and tied to the current user’s role and the visible screen state. For example, an admin might see a refund tool that a regular user cannot access, with no extra permission checks needed in the backend code. The browser sends only the user’s new message to the server, while the conversation history, tools, and agent state remain securely on the server side.

The agent operates within a dedicated work environment that includes a sandboxed filesystem, spreadsheet handling, and scripting capabilities. It can execute bulk operations via scripts that call multiple tools in a single step, avoiding the cost of multiple model turns. When the agent needs to perform a complex task, it can write and run a temporary program within an "island" component. This program interacts with the UI and data directly, calling the large language model only when a judgment is required. This method keeps data out of the prompt context, reducing costs and preventing sensitive information from influencing the agent’s behavior unintentionally.

Key details

  • Unified stack: Built on the Doors framework, Neui requires no separate frontend or API layer for agent interactions.
  • UI operation: The agent clicks and types in marked UI elements, running existing app logic without mirroring state.
  • Server-side security: Conversation history, tools, and instructions stay on the server; the browser sends only new messages.
  • Agentic apps: The agent can generate and run temporary sub-applications within page islands using provided components.
  • Work environment: Includes sandboxed filesystem, spreadsheet processing, web search, and bulk scripting capabilities.
  • Cost efficiency: Prompt caching and local script execution reduce input costs by an estimated 6 to 14 times compared to standard copilot implementations.

Why it matters

For software engineers building with Go, Neui offers a significant reduction in architectural complexity. Traditional AI integration often involves maintaining a separate JavaScript frontend, wiring up API endpoints for each agent action, and managing state synchronization between client and server. By allowing the agent to operate the existing server-rendered UI, developers avoid duplicating logic and permissions. This means faster development cycles and fewer bugs related to state desynchronization. The capability-based permission model, defined right in the template, ensures that security scales naturally with the UI structure.

The economic implications for running AI-heavy applications are also notable. Standard chatbot implementations often resend full conversation history and context with every request, leading to high token costs and latency. Neui’s approach of keeping state on the server and using scripts for bulk work minimizes the data sent to the model. For teams dealing with large datasets or complex workflows, such as financial reporting or customer support, this efficiency can make advanced AI features financially viable where they previously were not. It shifts the burden from constant model inference to efficient local execution.

What you can do

  • Install the Neui module using go get neui.dev to start experimenting with the framework.
  • Review the Doors documentation to understand how to build the base server-rendered application.
  • Mark UI elements in your Go templates with neui.Use to define what the agent can see and modify.
  • Register tools directly in your page templates to scope agent capabilities to specific user contexts.
  • Explore the nekit widget set for pre-built components like tables, forms, and layouts that support agentic workflows.
  • Check the back office example in the repository to see how to configure providers like Claude, GPT, or Gemini.
  • #go
  • #ai-agents
  • #web-frameworks
  • #server-side-rendering
  • #developer-tools

Tools from the Bytechap store

Keep reading

All stories