Skip to content

feat: Add B2B Lead Qualification Agent#616

Open
DMEAGESWAR wants to merge 1 commit into
AditthyaSS:mainfrom
DMEAGESWAR:main
Open

feat: Add B2B Lead Qualification Agent#616
DMEAGESWAR wants to merge 1 commit into
AditthyaSS:mainfrom
DMEAGESWAR:main

Conversation

@DMEAGESWAR

@DMEAGESWAR DMEAGESWAR commented Jun 24, 2026

Copy link
Copy Markdown

🎯 B2B Lead Qualification Agent

Resolves #382

Features Implemented

✅ AI-powered lead qualification scoring (0-100)
✅ Prospect type detection (sales teams, freelancers, agencies, recruiters)
✅ Staffing/recruitment agency detection
✅ Buying signal identification
✅ Niche detection
✅ Personalized outreach message generation
✅ Pain point analysis
✅ Red flag detection

File Added

src/agents/definitions/b2b-lead-qualification-agent.js

How It Works

Analyzes company information and generates comprehensive lead qualification insights.

Summary by CodeRabbit

  • New Features
    • Added a B2B lead qualification agent that evaluates company and lead details to generate qualification scores, classify prospects, identify buying signals and potential agency involvement, infer pain points, surface likely decision makers, and produce tailored outreach recommendations.

@DMEAGESWAR DMEAGESWAR requested a review from AditthyaSS as a code owner June 24, 2026 03:35
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@DMEAGESWAR is attempting to deploy a commit to the aditthyass' projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "issues"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

A new agent definition file for B2B lead qualification is added, exporting a complete configuration object with identity metadata, input schema for company and lead attributes, system prompt instructions, output type, and upstream agent chain references.

Changes

B2B Lead Qualification Agent Definition

Layer / File(s) Summary
Agent metadata, inputs schema, and example inputs
src/agents/definitions/b2b-lead-qualification-agent.js
Exports the agent's id, name, description, category, model/provider defaults, exampleInputs demonstrating company/lead data shape, and the inputs array schema covering required fields (company name, size, industry) and optional fields (LinkedIn URL, recent activity, pain points, decision makers, budget signals) with select and textarea input types.
System prompt, output type, and chain configuration
src/agents/definitions/b2b-lead-qualification-agent.js
Adds the systemPrompt template instructing the model to produce qualification score, prospect type, agency detection, buying signals, niche, inferred pain points, decision makers, outreach strategy, personalized outreach message, and red flags. Sets outputType: "text" and suggestedChainFrom with three upstream agent identifiers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type:feature, level:beginner

Suggested reviewers

  • AditthyaSS
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: addition of a B2B Lead Qualification Agent. It directly matches the primary objective and new functionality introduced in the pull request.
Linked Issues check ✅ Passed The implementation successfully addresses all core objectives from issue #382: niche detection, personalized outreach message generation, AI-based qualification scoring, buying signal identification, agency detection, pain point analysis, and red flag detection. The agent configuration matches the stated requirements.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the stated objectives. The single new file contains only the B2B Lead Qualification Agent definition with no unrelated modifications or scope creep.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Hey @DMEAGESWAR! 👋
Wow — your first contribution to iloveAgents! This is a big deal and I want you to know it means a lot. 🎊
Every agent on this platform started exactly like this — someone like you deciding to spend their time building something useful for everyone. That is something to be proud of.
A few things while you wait for the review:

  • Star the repo if you haven't already. Star it here
  • 📖 Check the Contributing Guide
  • 💬 Drop a comment if you get stuck — I reply within 24 hours
    Can't wait to ship this with you. 🚀
    Welcome to the iloveAgents family. 🙏
    @AditthyaSS

@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

hey @DMEAGESWAR! 👋
It looks like package-lock.json was changed but package.json was not.
This is usually unintentional — it happens when npm install is run locally with a different npm version.
Please revert it by running:
git checkout package-lock.json
Then push again. 🙏
@AditthyaSS

@mergify mergify Bot added the needs-fix label Jun 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/agents/definitions/b2b-lead-qualification-agent.js`:
- Line 13: The exampleInputs object has a company_size value of "50-200
employees" which does not match the available select options defined in the
schema. Update the company_size field in exampleInputs to use the correct value
"51-200 employees" to ensure the example input aligns with the declared select
options and can be used for example-driven runs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e77d6666-9854-47a9-8875-916b520d3ba1

📥 Commits

Reviewing files that changed from the base of the PR and between 7d17a11 and 697cbc8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (1)
  • src/agents/definitions/b2b-lead-qualification-agent.js

model: "gpt-4o-mini",
exampleInputs: {
company_name: "TechCorp Solutions",
company_size: "50-200 employees",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align exampleInputs.company_size with the declared select options.

exampleInputs.company_size is "50-200 employees", but the allowed option is "51-200 employees". This creates an invalid preset value for example-driven runs.

Suggested fix
   exampleInputs: {
     company_name: "TechCorp Solutions",
-    company_size: "50-200 employees",
+    company_size: "51-200 employees",
     industry: "SaaS & Cloud Services",

Also applies to: 34-41

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agents/definitions/b2b-lead-qualification-agent.js` at line 13, The
exampleInputs object has a company_size value of "50-200 employees" which does
not match the available select options defined in the schema. Update the
company_size field in exampleInputs to use the correct value "51-200 employees"
to ensure the example input aligns with the declared select options and can be
used for example-driven runs.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/agents/definitions/b2b-lead-qualification-agent.js (1)

13-13: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align exampleInputs.company_size with the declared select options.

The example value "50-200 employees" does not match any option in the schema. It should be "51-200 employees" to align with the select options defined at lines 34-41.

Suggested fix
  exampleInputs: {
    company_name: "TechCorp Solutions",
-   company_size: "50-200 employees",
+   company_size: "51-200 employees",
    industry: "SaaS & Cloud Services",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agents/definitions/b2b-lead-qualification-agent.js` at line 13, The
exampleInputs.company_size field contains the value "50-200 employees" which
does not match any of the select options defined in the schema. Update the
company_size example input value to "51-200 employees" to align with the actual
select options available in the form schema.
🧹 Nitpick comments (1)
src/agents/definitions/b2b-lead-qualification-agent.js (1)

87-101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Consider using structured output type for better downstream processing.

The system prompt explicitly requests a "structured analysis" with 10 numbered sections, but outputType is set to "text". While freeform text can work, using a structured output type (e.g., "json") would enable more reliable parsing and downstream integration, especially given the specific fields requested (qualification score, prospect type, buying signals, etc.).

If structured JSON output is desired, the systemPrompt should specify the exact JSON schema and outputType should be changed to "json" or equivalent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agents/definitions/b2b-lead-qualification-agent.js` around lines 87 -
101, The systemPrompt in the b2b-lead-qualification-agent requests structured
analysis with 10 numbered sections but the outputType is set to "text" instead
of a structured format. Change the outputType from "text" to "json" and update
the systemPrompt to specify the exact JSON schema with fields matching the 10
sections: qualification_score, prospect_type, agency_detection, buying_signals,
niche_detection, key_pain_points, decision_makers, outreach_strategy,
personalized_outreach, and red_flags. This will enable reliable parsing of the
agent's response in downstream processing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/agents/definitions/b2b-lead-qualification-agent.js`:
- Line 13: The exampleInputs.company_size field contains the value "50-200
employees" which does not match any of the select options defined in the schema.
Update the company_size example input value to "51-200 employees" to align with
the actual select options available in the form schema.

---

Nitpick comments:
In `@src/agents/definitions/b2b-lead-qualification-agent.js`:
- Around line 87-101: The systemPrompt in the b2b-lead-qualification-agent
requests structured analysis with 10 numbered sections but the outputType is set
to "text" instead of a structured format. Change the outputType from "text" to
"json" and update the systemPrompt to specify the exact JSON schema with fields
matching the 10 sections: qualification_score, prospect_type, agency_detection,
buying_signals, niche_detection, key_pain_points, decision_makers,
outreach_strategy, personalized_outreach, and red_flags. This will enable
reliable parsing of the agent's response in downstream processing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b9408b1-e2d8-4fbd-86f5-c74b8ae982c6

📥 Commits

Reviewing files that changed from the base of the PR and between 697cbc8 and 96f0c9f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (1)
  • src/agents/definitions/b2b-lead-qualification-agent.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

B2B lead qualification agent

1 participant