top of page

Designing An Agentic Support Solution For A B2B Platform

  • Writer: Priank Ravichandar
    Priank Ravichandar
  • Apr 7, 2025
  • 8 min read

Updated: Nov 8, 2025

Defining requirements for an AI agent that will handle customers’ support requests on a B2B payroll & HR platform.




Context

Gusto is a B2B payroll & HR platform used by Small and Medium-Sized Businesses (SMBs) in the United States. The platform currently has an AI assistant (Gus) that is built on a multi-agent architecture. Gus incorporates specialized sub-agents that handle user queries related to Reporting, PTO Approval, and FAQs. Each specialized agent added increases Gus' capabilities and improves the customer experience. This project explores the development of a new specialized agent by researching customer pain points and defining product requirements for a proposed agentic solution for a specific pain point.


Solution Overview


Target User

Small business owners and payroll administrators who manage payroll through Gusto's platform. These users are responsible for ensuring their employees get paid accurately and on time.


The Problem

We identified poor customer support responsiveness for payroll issues as a critical customer pain point through data analysis of user reviews. When payroll incidents occur—such as delayed direct deposits or ACH holds—users are stressed and require urgent clarification and resolution, but existing support processes are too slow. Figuring out our payroll issues is tedious and time-consuming. This often leaves users feeling anxious, powerless, and frustrated.


The Opportunity

An AI agent can transform the support experience by:

  • Proactively detecting issues before users report them.

  • Automatically diagnosing issues to give users instant answers, so they are no longer waiting days for a response from the support team.

  • Providing insight into what's happening with payroll, helping users take appropriate actions.


The Solution

We propose the addition of a Payroll Support Agent for handling payroll-related user queries. This agent aims to provide instant, automated, and contextual resolution for these issues, reducing response times and improving customer trust.


You can find all the project files and prompts in this project’s GitHub repository.



Workflow

Tools: Cursor, ChatGPT


Research Pain Points And Opportunities


Step 1: Research The Gusto Payroll Platform

We start by researching the Gusto platform to get some general context on how customers use the platform and its payroll functionality.


Step 1A: Craft a research prompt to gather context on the platform and its payroll capabilities


We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


Gusto Payroll Platform Research Prompt


Step 1B: Conduct research using the optimized prompt

We run the optimized prompt using GPT-5 to gather general context on how customers use the platform and its payroll functionality. We review and refine the generated output as needed.


Output


Step 2: Research Existing Gusto AI Agents

Gusto has an existing AI agent — Gus. The new agent we are developing will be incorporated into this agent. For example, when a customer mentions a payroll-related task to Gus, it will call the new agent (essentially directing payroll-related requests to this agent). From the customer’s perspective, they are still “talking” to Gus, but really, the new agent is responding to their payroll queries. Therefore, we need to learn about the existing agent to inform our decisions when designing our solution.


Step 2A: Craft a research prompt to gather context on the existing Gusto AI agents


We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


Existing Agent Research Prompt


Step 2B: Conduct research on the existing Gusto AI agents


We run the optimized prompt using GPT-5 to gather general context on how customers use the platform and its payroll functionality. We review and refine the generated output as needed.


Output


Step 3: Extract The Gusto Platform Reviews

Now that we have some general context on the platform and its payroll functionality, let’s gather customer reviews (using Python) to understand what they are saying about the platform’s payroll capabilities. The research only identifies general pain points. We want to identify real, specific customer problems that a payroll agent could address, so we need data from Gusto app’s reviews from the App Store, Google Play, and Trustpilot. Refer to my Extracting App Reviews project for more details on how to do this.


Step 3A: Enter the App IDs and Settings in the code

# =======================
# 🔧 CONFIGURATION
# =======================

# App IDs for each platform
APP_STORE_ID = "1478804271"  # Gusto App Store ID
GOOGLE_PLAY_ID = "com.gusto.money"  # Gusto Google Play Store ID
TRUSTPILOT_URL = "<https://www.trustpilot.com/review/gusto.com>"  # Trustpilot URL

# Platform selection (set to True/False to enable/disable platforms)
SCRAPE_APP_STORE = True
SCRAPE_GOOGLE_PLAY = True
SCRAPE_TRUSTPILOT = True

# Output options
OUTPUT_REVIEWS_ONLY = False  # Set to True to only output raw reviews CSV
OUTPUT_ANALYSIS_ONLY = True  # Set to True to only output analysis CSV
OUTPUT_BOTH = False  # Set to True to output both raw reviews and analysis
SINGLE_FILE = True  # Set to True to combine all reviews into a single CSV file (yourapp_reviews.csv)

Step 3A: Run the code and generate the reviews dataset


Output


Step 4: Identify And Prioritize Customer Pain Points

We can use our research to enhance the analysis of the Gusto reviews.


Step 4A: Craft a pain point analysis prompt to identify customer pain points.


We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


Pain Point Analysis Prompt


Step 4B: Conduct the pain point analysis using the optimized prompt


We run the optimized prompt, along with the review dataset and research, to identify customer pain points related to the Gusto payroll product.


Note: I ran a second round analysis as well using GPT-5. The Gusto Payroll Pain Point Analysis represents the refined output from subsequent prompting. The Gusto Payroll Pain Point Analysis (With Additional Prompts) includes the subsequent prompts as well.


Output


Based on the analysis, it seems that “Poor customer support responsiveness” is a critical pain point, which also overlaps with the other three primary pain points identified. Since an AI agent’s capabilities can be expanded over time, it may be best to build the agent with a focus on resolving support issues first, then expand to cover other related issues.


Define Product Requirements


Step 1: Define Requirements

We have now narrowed down a specific customer pain point we want to address using an AI agent. We can use the information gathered to now define the requirements for the Payroll Support Agent.


Step 1A: Craft a requirements prompt

We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


Requirements Generation Prompt


Step 1B: Generate requirements using the optimized prompt


We run the optimized prompt, along with the pain point analysis, platform research, and existing agent research, to identify the requirements for the new payroll agent.


Output


Note: All user interactions are happening via Gus, so there will be no change in the UI. Once the new Payroll Support Agent is introduced, this agent will handle payroll-related questions. From the customer’s perspective, they are still “talking” to Gus, but really, the new agent is responding to their payroll queries.


Step 2: User Flow Diagram And High-Level System Architecture

We can use the requirements to visualize the user experience and the high-level system architecture. This will help the product team better understand the flow, both on the user side and the agent orchestration side.


Step 1A: Craft a visualization prompt


We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


Flow Visualization Diagram Prompt


Step 1B: Generate a user flow diagram and high-level systems architecture using the optimized prompt

We run the optimized prompt, along with the pain point analysis, platform research, and existing agent research, to identify the requirements for the new payroll agent.

Output

Note: The quality of the AI-generated diagrams was not great (even with multiple prompt iterations), so the diagrams were manually created (for the most part).


Step 3: Create Product Requirements Document (PRD) and Technical Specifications

We now have enough information to define the Product Requirements Document (PRD) and the Technical Specifications (Spec). The PRD defines what we’re building and why, which helps align the team on user needs, goals, and success criteria. The Spec defines how we’re building it, which helps describe the architecture, agent orchestration decisions, APIs, and data flows. Since we have a multi-agent system—where architecture and product behavior are deeply intertwined—we need both.


Step 1A: Craft a PRD and Technical Specifications prompt


We construct an initial prompt with basic requirements and optimize it using meta prompting with GPT-5. We review and refine the generated prompt as needed. Refer to my meta prompting resource for more details on how to do this.


PRD And Tech Spec Prompt


Step 1B: Generate PRD and Technical Specifications using the optimized prompt


We run the optimized prompt, along with the pain point analysis, requirements, and PRD template, to generate the PRD and technical spec for the new payroll agent.


Output


Step 1C: Define Gus → Payroll Support Agent Escalation Criteria


We want to define the criteria the orchestrator agent (Gus) must use to route requests to the Payroll agent. It needs to know “what” a relevant payroll support-related query looks like. We can provide context on these scenarios by generating a list of example queries and keywords to assist in identifying relevant queries. We can combine the information from the pain point analysis and the reviews dataset to generate a standard list of example queries and keywords. This information can be attached to the technical specifications.


Relevant Payroll Query Prompt


Output


Note: The example queries and keywords list we are generating are just meant to be a starting point. Further testing and fine-tuning will likely be required. Additionally, these will likely be dynamic lists that the orchestrator agent (Gus) will have to keep updated (either autonomously or with human assistance).


Caveats

This workflow demonstrates how AI can enhance the process of distilling product requirements and technical specifications. It serves as a practical example for product managers and product teams looking to leverage AI assistance in their product development workflow.


Reviewing and refining project files in Cursor
Reviewing and refining project files in Cursor

Key Takeaways

  • Requirements Definition: We can use AI to transform raw user data into structured PRDs and technical specifications, significantly accelerating the requirements gathering process.

  • Data Source Flexibility: While this example uses customer review data, the same methodology applies to other qualitative data sources such as user interviews, survey responses, support tickets, or usability studies.

  • Critical Considerations: When building AI agents or introducing AI capabilities into their products, product teams must consider the following:

    • Multi-agent orchestration and routing logic.

    • Intent detection and context management.

    • User experience consistency across agent handoffs.

    • System architecture for scalable AI integration.

  • Human Review: All project files represent edited and refined versions of raw AI-generated output. Since AI can hallucinate or misunderstand instructions, human review is critical to ensure accuracy, feasibility, and alignment with customer and business goals.

  • Structured Documentation: All documents are in Markdown format for easy reading, version control, and team collaboration.


bottom of page