# Four Mechanisms Behind EGP Code, an AI-Powered Landing Page Editor

DevFeed: [Four Mechanisms Behind EGP Code, an AI-Powered Landing Page Editor](<https://devfeed.tech/articles/four-mechanisms-behind-egp-code-an-ai-powered-landing-page-editor-56815.md>)

Original publisher: [Read original article](<https://engineering.mercari.com/en/blog/entry/20260610-how-egp-code-works/>)

Author: Mattsuu

Published: 2026-06-10T11:00:58Z

Content type: article

Language: en

Sources: [Mercari Engineering](<https://devfeed.tech/sources/mercari-engineering.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Firestore](<https://devfeed.tech/topics/firestore.md>), [data](<https://devfeed.tech/topics/data.md>), [test](<https://devfeed.tech/topics/test.md>), [API](<https://devfeed.tech/topics/api.md>), [lint](<https://devfeed.tech/topics/lint.md>), [Web Components](<https://devfeed.tech/topics/web-components.md>), [OpenAI](<https://devfeed.tech/topics/openai.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [api](<https://devfeed.tech/tags/api.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [css](<https://devfeed.tech/tags/css.md>), [errors](<https://devfeed.tech/tags/errors.md>), [firestore](<https://devfeed.tech/tags/firestore.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [lint](<https://devfeed.tech/tags/lint.md>)

## AI overview

This article explains four mechanisms inside EGP Code, Merpay's internal AI editor for building landing pages: a recursive agent loop, real-time synchronization through Firestore, browser-based testing, and a mapping table connecting preview elements to HTML. It also describes how the editor combines AI instructions, manual HTML editing, previewing, and publishing.

## Source excerpt

Hi, I'm @mattsuu a frontend engineer at Merpay. This is Day 7 of Merpay & Mercoin Tech Openness Month 2026. EGP Code is an internal editor for building landing pages (LPs) with AI. We covered the background in Why we built EGP Code, an HTML-based AI editor for landing pages; this article digs into four [...]