
Share
This article reveals a simplified yet powerful two-tier AI system for handling customer feedback, explaining how primary and secondary agents work together to analyze data and generate actionable insights efficiently.
I’ve been diving deep into integrating AI agents into UserJot, our feedback, roadmap, and changelog platform. The goal was to analyze customer feedback at scale, identify patterns across hundreds of posts, and auto-generate changelog entries. After weeks of experimenting, reverse engineering tools like Gemini CLI and OpenCode, and running numerous tests, I’ve landed on a robust two-tier model that works well in practice.
Forget complex hierarchies; you need exactly two levels:
I tried three-tier and four-tier systems where agents talked to other agents, but they all broke down. The two-tier model is simpler and more reliable.
Here’s the architecture I settled on:
User → Primary Agent (maintains context)
├─→ Research Agent (finds relevant feedback)
├─→ Analysis Agent (processes sentiment)
└─→ Summary Agent (creates reports)
Each subagent operates in complete isolation, while the primary agent handles all the orchestration.
Every subagent call should be like a pure function with the same input producing the same output. No shared memory, no conversation history, no state. This might seem limiting at first, but it offers several key benefits:

Here’s how I structure subagent communication:
// Primary → Subagent
{
"task": "Analyze sentiment in these 50 feedback items",
"context": "Focus on feature requests about mobile app",
"data": [...],
"constraints": {
"max_processing_time": 5000,
"output_format": "structured_json"
}
}
// Subagent → Primary
{
"status": "complete",
"result": {
"positive": 32,
"negative": 8,
"neutral": 10,
"top_themes": ["navigation", "performance", "offline_mode"]
},
"confidence": 0.92,
"processing_time": 3200
}
No conversation history or state, just task in and result out.
You have two effective strategies for decomposing tasks:
Vertical decomposition for sequential tasks:
"Analyze competitor pricing" →
1. Gather pricing pages
2. Extract pricing tiers
3. Calculate average prices
Horizontal decomposition for parallel tasks:
"Generate a comprehensive report on user feedback" →
1. Research Agent: Find relevant feedback posts
2. Analysis Agent: Process sentiment and categorize feedback
3. Summary Agent: Create a structured report
By following these principles, you can build robust AI agent systems that handle complex tasks efficiently and reliably. I’ve pushed a basic version of this system to production as a beta, and it’s mostly working well so far.
Tags
Original Sources
About the author
Kai built ML infrastructure at a Bay Area startup before developing an obsession with transformer architectures and inference optimisation that eventually pulled him out of product work entirely. A stint at a compute research lab sharpened his instinct for what actually matters in a model release versus what is marketing. He writes from the inside — from the perspective of someone who has debugged the systems he is describing at three in the morning. He is allergic to hype and instinctively drawn to the unglamorous plumbing questions that everyone else skips over.
More from The Engineer →This Week's Edition
21 August 2025
88 articles
Related Articles
Related Articles
More Stories