How to build an AI agent for enterprise platforms and why LLMs fail
Analytics platform developers share their experience building an AI agent to generate visual workflows and explain why simple LLM integration fails.

An enterprise analytics platform team decided to build a full-fledged AI agent capable of turning text prompts into visual data processing workflows. The goal was to lower the entry barrier for business users and speed up onboarding without losing control over validation. However, the implementation proved much more complex than simply attaching a large language model.
- The team initially attempted to make the AI agent directly generate the platform's internal XML package format.
- Simple tasks worked, but complex scenarios caused context exhaustion and high failure rates.
- Deploying a swarm of agents made performance worse, dropping success rates below 10%.
- Browser-based agents using Playwright also failed due to high token consumption and slow execution.
First attempt: direct XML generation
The initial approach was to have the agent analyze tasks and generate the platform's proprietary zip-archived XML workflows using Python scripts. While simple tasks were handled within minutes, workflows with 5 to 10 nodes took up to 20 minutes to generate without providing proper user feedback during the process.
For large-scale workflows with dozens of nodes, the agent quickly exhausted its context window, lost planning coherence, and produced broken packages. Maintaining custom scripts for every new node type became unsustainable, and experimenting with a multi-agent swarm dropped the successful generation rate to under 10%.
Read alsoHeretic LLM jailbreak tool creator Philipp Weidmann passes away at 41Second approach: browser agents via Playwright
Another team experimented with connecting Codex, Claude, or OpenCode to the platform interface via Playwright to build workflows visually. While demos looked impressive as the agent clicked through elements, practical application revealed that the model relied on trial-and-error by analyzing the DOM tree and screenshots.
Each cycle consumed significant computational resources and tokens, turning a 15-minute human task into a 30-minute agent run. Due to context limitations, the agent frequently lost track of details and made incorrect assumptions, making it unsuitable for production environments.
What this means for developers and businesses
This case study demonstrates that integrating artificial intelligence into complex enterprise software requires robust architectural design rather than superficial LLM integration. Reverse-engineering code or blindly emulating user actions through a browser hits hard limits on context windows, token costs, and stability. Businesses and engineering teams must leverage structured internal assets, such as reliable test suites, rather than relying solely on prompt magic.
Source: Все публикации подряд на Хабре



