DEV Community

Cover image for The Best AI Agent For Frontend - Kombai
Ekemini Samuel
Ekemini Samuel

Posted on • Originally published at envitab.Medium

The Best AI Agent For Frontend - Kombai

AI Agents have evolved a lot from when I started using them in 2022 till now. If you pay close attention, you will notice that these agents are growing not just in capabilities, that is, the kind of task they can do, but in understanding, which in my opinion is far important than the type of tasks they do. I say this for two reasons:

  • An AI agent is as good as the person using it.

  • An AI agent with a deep understanding of a particular context or subject matter will outperform generalistic AI agents long-term.

If you look at this from a wide view, the same applies to humans. A person who has developed knowledge, understanding and expertise in one area, for example, Finance, has built not just skill but discipline over an extended period of time. Say that person wants to learn Product design in 6 months, it won’t be as difficult for someone who has not first focused on a particular skill.

Now to the main purpose of this article. In the coding space, there are lots of AI coding agents and assistants like v0, Cursor, Claude Code, Lovable, Bolt, and Anything. These AI agents can write code and build websites, web apps and mobile apps quite alright. However, if you examine the UI/UX and Frontend, you will notice that they are similar. Either in terms of colour gradients, fonts, typography, framework (mostly Next.js/Vue) and even more technical aspects like state management.

They get the job done, yes, but if you want an actual product you and other people will use, then you definitely have to be unique and quite technical (or you get a technical friend) to help you out.

I have been using the Kombai AI agent for some time now, specifically for the Frontend of my web application, and in this guide, I will show you why it’s the best AI Agent for frontend development while building the frontend of a bookstore application.

Let’s get started!

Prerequisites

To follow along, you need these:

  1. Basic understanding of JavaScript.

  2. NPM Installed.

  3. An IDE like Windsurf, VS Code.

  4. A Kombai account.

Kombai is an AI agent built specifically for frontend development. It converts Figma designs, images, or text into production-ready code with modern web frameworks like React, Next.js, and Tailwind. With Kombai, you have the flexibility to choose the tech stack or framework you want to work with.

Learn more about Kombai in this resource.

What Kombai Does (and Doesn’t Do)

Before we build, it is important to define the scope. To claim Kombai is the "best," we must clarify what it is best at.

Kombai is a specialised Frontend AI Agent.

  • What it does: It specialises in UI, layout, client-side logic, and component architecture. It is designed to work safely within production repositories, understanding your specific design system.

  • What it doesn’t do: It is not a backend or database agent. It won't configure your AWS servers or write complex SQL queries.

By focusing entirely on the frontend, Kombai achieves a level of fidelity in CSS, React state, and accessibility that generalist full-stack agents simply cannot match.

What makes Kombai the best AI coding agent for frontend

Many AI tools can generate code, but their underlying architectures differ. General-purpose models are trained on broad datasets, while some newer agents are highly specialised. This specialisation is key, as the agent's architecture is purpose-built for a specific domain, in this case, frontend development. This focused approach is evident in its core technology.

Let's break down the specific features that result from this specialisation. Here are some reasons why Kombai is different from other AI agents:

Specialised Context Engineering

Instead of generating a generic <button>, the agent can read a project's theme.js file and output a custom <StyledButton variant="primary">. This is the result of specialised context engineering.

Before generating code, the system scans the repository to learn its structure. It identifies the component library, ingests design system tokens (colours, fonts, spacing), and understands existing custom components. The goal is to produce code that is idiomatic to the specific project, helping it align with established patterns and reducing the need for manual refactoring.

Planning and Preview Workflow

The Kombai AI workflow is designed to be more transparent than a simple prompt-to-code process. It operates in stages. First, it generates a step-by-step plan in markdown, detailing how it will build the feature, for example:

  1. Create UserProfileCard.jsx

  2. Add props for userName and avatarUrl

  3. Style using Tailwind CSS

The Frontend developer can then review and edit this plan before execution. Once approved, the system generates the code and presents it in a live preview within an isolated browser sandbox. This allows for a verification step to catch runtime issues or styling problems before committing the code to the local branch.

Figma Interpretation Engine

A common challenge for design-to-code tools is handling imperfect design files if layers aren't clearly grouped.

Kombia’s AI agent's interpretation engine is designed to be more resilient, directly interpreting and converting the Figma design files to code. This approach effectively converts design frames into responsive components with logical DOM structures, rather than relying on pixel-based or absolute positioning.

Built-in RAG for Frontend Libraries

Another key technology at play is (RAG) Retrieval-Augmented Generation. Many general-purpose models may "hallucinate" or use outdated syntax when trying to implement a specific library, as their knowledge is based on a static, broad training dataset.

A RAG-based system addresses this by connecting the language model to an external, up-to-date knowledge base. Here’s how it works:

  1. Retrieval: When you ask the agent to build a component using, say, Chakra UI, it doesn't just rely on its general knowledge. It first retrieves relevant, up-to-date information and code patterns from its own curated and human-tested database of over 30 frontend libraries (like Tailwind, MUI, Shadcn/ui).

  2. Generation: It then augments the prompt. It essentially tells its AI model: 

“Here is the user's request, and here is the correct, best-practice pattern for doing this in Chakra UI. Now, generate the code."

This RAG-based approach improves the model's output in verified patterns. It's not remembering how to use a library; it's referencing a correct implementation in real-time. This method is designed to improve accuracy and ensure the generated code follows the best practices for that specific library.

Enterprise-Ready Security

For enterprise teams that use AI coding agents, security is non-negotiable. Kombai has these security features implemented from the beginning:

  1. No Training on Your Code: Kombai does not train its base models on your private codebase.

  2. SOC 2 Compliance: It adheres to strict security standards, making it safe for enterprise deployment.

  3. Local Context: It builds context from your local repo to answer questions, keeping data boundaries respectful.

Pricing & Plans

Kombai offers a pricing tier for every stage of development:

  1. Free Plan: Great for students and indie devs. Includes a set amount of credits/month to build small projects.

  2. Pro Plan: Designed for solo founders and freelancers who need higher limits and faster processing.

  3. Enterprise: For teams that need SSO, enhanced security, and custom context limits.

Building the Bookstore app with Kombai

We will be building a bookstore web app with authentication, book listings, a dashboard, and a checkout flow.

First, let’s set up Kombai in your IDE (Windsurf is the IDE used in this article)

Create your Kombai account, sign in and install the extension for your IDE, whether it’s VS Code, Cursor, Windsurf or Trae.

app

If you’re using Windsurf, when you click on the Kombai icon in the left sidebar, it opens like so:

app

On the right, you can read about the latest updates to the Kombai AI agent and learn how to use the features in your IDE.

Click Open Folder to open a folder or workspace and start using Kombai.

In your computer, create a folder and name it “bookstore”. Then open it in the Windsurf IDE with Kombai.

When you start the Kombai extension, it scans your workspace for context awareness. It loads and shows you this modal regarding the Plan Mode. This mode generates a detailed code plan for the task (from your prompts) before the AI agent starts generating the code.

app

Now that Kombai is set up, let’s proceed with building the bookstore app.

Planning before generating code

With most AI tools, the flow for building apps is mostly from text/prompt to action.  When you prompt the AI tool, it immediately starts generating the code for the application. While that is faster, it does not give room to plan the task properly, which is helpful for making iterations during frontend development.

Kombai uses a more professional workflow: Plan, Code and Ask.

  1. Plan: You describe the feature. Kombai generates a detailed markdown plan. This makes sure planning is done before any code generation.

  2. Code: You review and approve the plan. Kombai then executes it, generating files and fixing its own errors.

  3. Ask: You can ask questions about your repo without changing code.

In the Kombai chat, enter this prompt:

We will be building the frontend of a modern bookstore app. Let's plan the bookstore app and UI.
List all required screens, components, and user states for authentication, dashboard, checkout, and book browsing. 
Use React.js + Tailwind + TypeScript. Focus on clean visual hierarchy and modularity.
Enter fullscreen mode Exit fullscreen mode

Note: You can also instruct Kombai to turn your designs into code by either entering a link to the Figma file or directly connecting Figma by clicking on the Connect Figma button in the image.

coding

Before you send the prompt, click on the Code dropdown and select Plan. This will create a structured plan before coding.

app

When you have selected the Plan mode, send the prompt to Kombai. It then lists the tech stack that will be used. You can either let Kombai AI scan the workspace for any files, configure the tech stack to be used and then proceed.

app

Now click on Proceed. The AI agent then prepares a comprehensive plan, including all of these. Scroll down the plan.md document or click on the file icon at the top right to expand the view.

  • Design philosophy: For the design philosophy, the AI agent suggests the visual identity as a modern, clean, editorial-inspired design with a focus on book discovery.

code

  • Screen architecture: The screen architecture shows the screens for the bookstore app, the routes where authentication is required, and the purpose of each screen.

app

  • Component breakdown: The AI agent also lists all the components needed, like the layout, authentication, book components, shopping, dashboard, the shared UI, and other components needed in the bookstore app

app

  • User state management: Next is the state management, which includes the state domains, storage, key data and type definitions.

app

  • Authentication flow: The AI agent also creates a visual representation of the authentication flow, from when the user visits the bookstore app, authenticates, adds a book to the cart and checks out. It also includes the Auth States: idle, loading, authenticated, error.

code

  • Checkout user journey: Next, we have the checkout user journey, which includes the steps, screens, actions and validation. The AI agent also includes a progress indicator and a stepper component (1/6 → 6/6).

code

  • Browse page layout: There is also the browse page layout, like the header (search, cart, user), filters sidebar, the book genre, price for each book and ratings.

app

  • Reusable patterns: The AI agent also lists reusable patterns, their usage and props to be used.

coding

  • Accessibility checklist: It also adds the accessibility checklist, like ARIA labels for icon buttons,  Alt text for all book covers, and screen reader announcements for cart updates.

app

  • Performance optimisations: The AI Agent also lists the performance optimisations with the strategies and how they will be implemented in the bookstore application. 

app

The above metrics are important when developing the frontend of a web application, and it’s necessary to consider them before building. Instead of going directly to generating code.

The Kombai AI agent also lists the Todos (10) needed for the bookstore web app.

app

When you’re okay with the plan the AI agent generated, click on Approve Plan.

coding

The AI agent now begins creating the bookstore application with the plan we approved.

Setting up the bookstore project

The Kombai AI agent begins creating the application and installing the needed dependencies with the npm command. Click Run like so:

code

While installing the dependencies, the AI agent loads the terminal to the right side and continues generating the code for the bookstore app. It lists every file it’s creating and the purpose for each one.

app

When the AI agent is done setting up the bookstore app project and generating the code files, it then shows a prompt to run the app with the npm run dev command. Click on the Run button as shown in the image below:

code

After the AI agent runs the bookstore application, it provides a local URL: http://localhost:5173 you can open in your browser to test the application. Also, you can open the preview in the Kombai Browser by clicking on the Kombai Browser.

code

The bookstore app then loads in the browser.

app

You can view all the books displayed like so:

books

Now we have the frontend of the bookstore developed with the Kombai AI agent. Next, we will check the agent-controlled and user-controlled browser features of Kombai.

Agent-controlled and User-controlled Browsers

The Kombai team shipped an update recently called the Kombai browser, which transforms how AI-assisted Frontend development works. It involves an Agent-controlled and User-controlled browser

Let’s go deeper into the capabilities and use cases of each browser.

Agent-controlled Browser

The idea for the Agent-controlled browser is simple: instead of you running your app and manually checking everything, the agent can open your app and use it like a real user.

Watch this video to see the Kombai Agent-controlled browser in action.

It can navigate, click, type, scroll, and perform actions on the web application.

For the bookstore app we’re building, I asked the Agent to:

Open the browser, sign up, log in, and add a book to your cart
Enter fullscreen mode Exit fullscreen mode

With the Agent-controlled browser, it loaded the bookstore app, created an accreated a new account, then logged in and added a book to the cart.

app

After the AI agent adds the book to the cart, it displays like so:

code

The AI agent also provides a summary of all the actions it took on the browser.

code

Here is a video showing how the Agent-controlled browser works when we give it the prompt

User-controlled Browser

The Kombai User-controlled browser lets you preview your app’s local deployment in the browser (optimised for Google Chrome and Chromium-based browsers), with built-in listeners so you can iterate fast by sending elements and errors back to Kombai as context. 

To open the preview, follow these steps:

Click the Start Preview button below the Kombai input box. Kombai will start the dev server. 

code

Once the server is running, click the Kombai Browser button to open the browser preview. Alternatively, press the Kombai Browser button that appears after the code generation process is completed.

You can also prompt the AI agent to make changes to the web app in real-time using the chat window, as shown in the image below.

code

You can also use the select elements button highlighted below to select any section that needs an update. This makes implementing additional changes faster using the user-controlled browser.

Bookstore app

You can also initialise a GitHub repository directly with the AI agent by giving it a prompt and clicking on the Run button.

Initialise a GitHub repository, git add. git commit, and git push
Enter fullscreen mode Exit fullscreen mode

code

You can clone the GitHub repository, install the required dependencies and run the bookstore application.

git clone https://github.com/Tabintel/bookstore.git
Enter fullscreen mode Exit fullscreen mode
cd bookstore
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

And that’s it! We have built the frontend of a bookstore application with Kombai and tested it out using the Agent and User-controlled browsers.

Next Steps

The major takeaway from developing the frontend of applications with Kombai is that the AI agent works as an AI coding “partner”, not a plugin for an IDE. You can make updates to the bookstore by adding a community feature where other users can post comments on books they buy.

Optimise your frontend development today, start building with Kombai!

Top comments (0)