AgentKits

Inbound Lead Qualification Agent

Production Blueprint
0New

Includes Agent Blueprint + Implementation Guide

An agent that qualifies inbound leads against your ideal customer profile, scoring fit and intent from the data you actually have, routing the strong ones to sales and nurturing the rest. It grounds every score in real data instead of inventing firmographics, and it is honest when key information is missing. It is built defensively: it never fabricates company size, role, budget, or buying intent, it marks low-confidence leads instead of inflating them, it drafts respectful follow-ups rather than firing aggressive automated outreach, and it respects privacy and consent.

salessdrlead-qualificationlead-scoringrevenueautonomous-agenticppipelineagentazagent-governancetrust-levelproduction-readiness
StackClaude, LangGraph, OpenAI
DifficultyIntermediate
Setup40 min
Version2.0.0 · 2026-06-21

Overview

Qualifies inbound leads against your ICP, scoring fit and intent from real data.

Routes strong, sales-ready leads to reps and nurtures the rest.

Marks missing data and low-confidence leads honestly instead of inflating them.

Defensive: never fabricates firmographics or intent, drafts respectful follow-ups, and respects privacy and consent.

AgentAz™ specification

A lightweight, design-time governance spec for security review. It documents what this agent is authorized to do — and why — and pairs with whatever policy engine you already run. It does not enforce anything at runtime.

Trust Level ?A2 — Recommend
DNA PatternEvaluation (Research → Evaluate)
Worst-Case ActionProduces an inaccurate lead score or qualification, surfaced for a rep to review. It cannot email a lead, write to a CRM, or take any action — execution tools are absent from its registry.
Authority BoundaryReads inbound lead information, scores it against your qualification criteria, and surfaces a recommendation with reasoning. It never contacts the lead, writes to a CRM, or routes autonomously. A rep decides and acts.
Verification TestAttempt to call an email-lead or CRM-write tool → confirm it is absent from the agent's registry.
Production Readiness6/6 dimensions passing. Tool isolation: contact/CRM-write tools absent. Human gates: a rep decides. Confidence escalation: borderline leads flagged. Cost ceiling: bounded per lead. Audit trail: score and reasoning logged. Escalation path: high-value or ambiguous leads flagged.
Last Reviewed2026-06-24

Machine-readable contract (agentaz.json), validated against the open AgentAz™ JSON Schema — bundled for offline use and published at a permanent URL:

agentaz.json
{
  "$schema": "./agentaz.schema.json",
  "version": "2.0.0",
  "last_reviewed": "2026-06-24",
  "agent_id": "lead-qualification-agent",
  "trust_level": "A2",
  "dna_pattern": "Evaluation",
  "worst_case_action": "Produces an inaccurate lead score for rep review. Cannot contact leads or write to a CRM.",
  "authority_boundary": "Scores inbound leads against criteria; contact/CRM-write tools absent.",
  "tags": [
    "sales",
    "lead-qualification",
    "read-only",
    "human-review"
  ],
  "tool_boundary": {
    "allowed_tools": [
      "read_lead",
      "match_criteria",
      "score",
      "explain"
    ],
    "execution_tools_absent": true
  },
  "output_boundary": {
    "format": "structured_json",
    "never_emits": [
      "email_lead",
      "crm_write",
      "auto_route"
    ]
  },
  "cost_boundary": {
    "max_usd_per_trace_loop": 0.2,
    "alert_threshold_usd": 0.14
  },
  "loop_boundary": {
    "max_reasoning_turns": 8
  },
  "human_handoff": {
    "triggers": [
      "borderline_score",
      "high_value_lead",
      "insufficient_info"
    ],
    "destination": "sales_rep"
  },
  "audit": {
    "append_only": true,
    "logs": [
      "scores",
      "reasoning"
    ]
  }
}

New to this? Read the AgentAz specification guide — Trust Levels, DNA patterns, and how it complements your runtime.

AgentAz™ is open source under Apache-2.0 — schema (frozen v1.0.0) and source on GitHub.

Governance matrix

A scannable summary of this blueprint's governance coverage, derived from its AgentAz™ specification. It documents the boundaries that already ship — not new functionality.

Agent goalBounded by the authority spec above
Trust LevelA2 — Recommend
Tool accessLeast privilege — execution tools absent (read-only)
Context handlingGrounded in provided inputs; cites or flags rather than guessing
Memory strategyTask-scoped; no persistent cross-session memory
Human approvalRequired on borderline score, high value lead, insufficient info → sales rep
Audit trailAppend-only log (scores, reasoning)
Cost & loop bounds≤ $0.2 per loop · ≤ 8 reasoning turns
Recovery / escalationEscalates to sales rep

Agent component mapping

A framework-neutral view of how this blueprint maps to standard agent-architecture components (the vocabulary common to ADK-style frameworks). It describes structure for clarity — not an official integration or certified compatibility.

AgentPrimary reasoner — Recommend authority (A2)
Toolsread lead, match criteria, score, explain — execution tools absent (read-only)
MemoryTask-scoped working context; no persistent cross-session memory
GuardrailsWorst-case classified (A2); no execution tools; ≤ $0.2/loop · ≤ 8 turns
EvaluatorConfidence and authority-boundary checks; low-confidence or out-of-bounds results are flagged, not actioned
HandoffEscalates to sales rep on borderline score, high value lead, insufficient info

Failure modes

Specific ways this blueprint can fail, and how it is designed to detect, contain, and recover from each — the boundaries that make it safe to run, stated plainly.

Produces an inaccurate score that misroutes a good lead.

Detection
Each score carries reasoning and borderline leads are flagged.
Mitigation
It scores for review only — it never contacts the lead, writes to a CRM, or auto-routes.
Recovery
A rep decides; the lead is re-scored or re-routed.

Disqualifies a high-value lead on incomplete information.

Detection
Insufficient-information cases are flagged, not auto-disqualified.
Mitigation
High-value and ambiguous leads are flagged for a human.
Recovery
The rep reviews the flagged lead.

Over-weights a single signal, skewing the score.

Detection
The reasoning behind each score is shown for inspection.
Mitigation
Scoring is a recommendation, not a decision.
Recovery
The rep adjusts or overrides the score.

Evaluation

Scoring agreement with reps, plus safe handling of incomplete leads, is primary — a misrouted good lead or an auto-disqualified high-value one is the failure.

Scoring agreementAgreement of lead scores with rep judgments on a labeled set.
High-value recallOf high-value leads, the share NOT disqualified on incomplete information.
Reasoning qualityShare of scores with sound, inspectable reasoning.
Insufficient-info handlingShare of thin leads flagged rather than auto-disqualified.
LatencyTime to score a lead.

Recommended approach. Use labeled leads with rep-assigned scores and outcomes; measure scoring agreement and high-value recall, and include incomplete leads to test the abstain behavior. It never contacts the lead or auto-routes.

When to use

Use it when

  • You get more inbound leads than reps can qualify by hand.
  • You have an ICP and real lead/enrichment data to score against.
  • You want strong leads routed fast and weaker ones nurtured, with reasons.
  • You want honest scoring that flags missing data rather than guessing.

Avoid it when

  • You want it to invent firmographics or intent to inflate scores — it won't.
  • You want aggressive automated outreach blasted without rep review.
  • You have no ICP or data for it to qualify against.
  • You need it to close or negotiate (it qualifies and routes; humans sell).

System prompt

system-prompt.md
You are an Inbound Lead Qualification Agent. You assess inbound leads against the ideal customer profile (ICP), score fit and intent from available data, and route them. You are judged on accurate, honest qualification and on never fabricating data, inflating scores, or sending pushy automated outreach.

== CORE PRINCIPLES ==
1. Score from real data. Base fit (firmographics, role) and intent (behavior, stated need) only on data you actually have — the lead's submission and legitimate enrichment. Don't invent company size, budget, seniority, or intent.
2. Honest about gaps. If key qualifying data is missing, say so and score with low confidence. Missing data lowers confidence; it does not get filled with a guess.
3. Respectful routing. Route strong leads to a rep with a clear reason. For others, draft a helpful, respectful follow-up for a human to send — not aggressive, high-pressure, or spammy automated outreach.

== HARD RULES (NON-NEGOTIABLE) ==
- NO FABRICATED DATA: Never invent firmographics (size, revenue, industry), seniority, budget, or buying intent. Unknown = unknown, with lower confidence.
- NO INFLATED SCORES: Don't upgrade a lead on assumptions. Score reflects evidence; flag what's missing.
- RESPECTFUL OUTREACH: Draft follow-ups for human review; no pushy, deceptive, or high-volume automated messaging. Honor unsubscribe/consent.
- PRIVACY & COMPLIANCE: Use only legitimately provided or public enrichment data. No scraping private data, no buying shady lists, respect consent and applicable rules.
- HUMAN FOR HIGH-VALUE/SENSITIVE: Route enterprise, sensitive, or unusual leads to a person rather than auto-handling.

== METHOD ==
- Read the lead and any legitimate enrichment. Score fit against ICP and intent from behavior/stated need. Mark missing data and confidence. Route: strong -> sales; nurture -> draft respectful follow-up; unclear/high-value -> human.

== OUTPUT FORMAT (return ONE JSON object) ==
{
  "lead": "<name/company if provided>",
  "fit_score": "high|medium|low|unknown",
  "intent_score": "high|medium|low|unknown",
  "icp_match": { "matches": ["<criteria met>"], "missing": ["<unknown/needed data>"] },
  "confidence": "high|medium|low",
  "decision": "ROUTE_SALES|NURTURE|ROUTE_HUMAN|REQUEST_INFO",
  "reason": "<grounded explanation>",
  "draft_followup": "<respectful message for a human to send, or empty>",
  "data_integrity": "Scores use only provided/legitimate data; no firmographics or intent were fabricated."
}
Never fabricate data to raise a score. Lower confidence when data is missing.
Was this useful?

Simulate run

Try the agent with a sample task. This is a frontend-only preview that shows how the kit would plan and execute — no API calls, nothing leaves your browser.

Frontend preview only — no data leaves your browser. Tip: press ⌘/Ctrl + Enter to run.

Setup guide

Install and connect CRM

Install the agent and connect your CRM and lead sources.

shell
pipx install lead-qualifier-agent
lead-qualifier-agent connect --crm hubspot --forms website
lead-qualifier-agent doctor

Configure integrity & outreach guardrails

No fabricated data and respectful outreach are enforced here.

shell
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
NO_FABRICATED_ENRICHMENT=true
DRAFT_OUTREACH_FOR_REVIEW=true
RESPECT_CONSENT=true

Define your ICP

Specify the criteria that qualify a lead.

shell
# icp.yml
fit: { company_size: '50-5000', industries: [saas, fintech], roles: [manager, director, vp] }
intent_signals: [demo_request, pricing_page, repeat_visit]
enterprise_to_human: true

Test on past leads

Replay historical leads to check scoring and integrity.

shell
lead-qualifier-agent backtest --range 30d --explain
# reports routing accuracy + a hard check: fabricated-data rate (must be 0)

Wire into intake

Qualify new leads automatically; drafts go to reps.

shell
# new lead -> qualify + score -> route hot to sales; nurture drafts -> rep review

Architecture

Tools required

get_leadRetrieve the inbound lead's submission and channel context.
enrich_publicAdd only legitimate, privacy-respecting enrichment data where available.
score_fitScore firmographic and role fit against the ICP from real data.
score_intentAssess buying intent from behavior and stated need, evidence-based.
check_icpCompare the lead to ICP criteria and identify matches and missing data.
route_leadRoute to sales, nurture, or a human based on score and confidence.
draft_followupDraft a respectful follow-up message for a human to review and send.
flag_missing_dataMark missing qualifying data and lower confidence accordingly.

Workflow

  1. 1. Take the lead

    Receive the inbound submission and any channel context.

  2. 2. Enrich legitimately

    Add only privacy-respecting, legitimately available data.

  3. 3. Score fit

    Assess firmographic and role fit against the ICP from real data.

  4. 4. Score intent

    Judge buying intent from behavior and stated need, evidence-based.

  5. 5. Guard data integrity

    Block fabricated data and lower confidence where information is missing.

  6. 6. Route

    Send strong leads to sales, nurture others, and escalate high-value or unusual leads to a human.

  7. 7. Draft respectful follow-up

    Prepare a courteous message for a rep to review and send.

Examples

Strong ICP match with intent → qualified and routed to sales

A lead matches the ICP and shows buying intent. The agent qualifies and routes with a reason.

Input

input
Lead: Director of Ops at a 300-person SaaS company, requested a demo, visited pricing twice.

Output

output
{
  "lead": "Director of Ops, 300-person SaaS company",
  "fit_score": "high",
  "intent_score": "high",
  "icp_match": { "matches": ["company size 300 (in 50-5000)", "industry SaaS", "role Director (decision-influencer)"], "missing": [] },
  "confidence": "high",
  "decision": "ROUTE_SALES",
  "reason": "Strong fit (size, industry, seniority all match ICP) and high intent (demo request + repeat pricing visits). Sales-ready.",
  "draft_followup": "Hi [name], thanks for requesting a demo. Based on what you're exploring, I'd love to set up 20 minutes with one of our team to walk through how teams like yours use us. Here are a few times: [link].",
  "data_integrity": "Scores use only provided/legitimate data; no firmographics or intent were fabricated."
}

Note: Every part of the score traces to real data points (size, industry, role, demo request, pricing visits). The lead is routed to sales with a clear, grounded reason and a respectful follow-up draft.

Missing key data → mark low confidence, request info, don't guess

A lead is missing company and role. The agent refuses to invent firmographics and asks for what's needed.

Input

input
Lead: a personal Gmail address and a first name only, submitted via a content download. No company, role, or size.

Output

output
{
  "lead": "First name only, personal email",
  "fit_score": "unknown",
  "intent_score": "low",
  "icp_match": { "matches": [], "missing": ["company", "company size", "role/seniority", "industry"] },
  "confidence": "low",
  "decision": "REQUEST_INFO",
  "reason": "Not enough data to qualify: no company, role, or size, and a content download is a weak intent signal. I won't guess firmographics to manufacture a fit score.",
  "draft_followup": "Hi [name], thanks for downloading [resource]! So I can point you to the most relevant material, would you mind sharing what you're working on and your role? Happy to help either way.",
  "data_integrity": "Scores use only provided/legitimate data; no firmographics or intent were fabricated."
}

Note: Rather than invent '~200 employees, probably a manager' to fill the gaps, the agent marks fit unknown, scores confidence low, and drafts a friendly message to gather the missing context. Honest 'we don't know yet' beats a fabricated qualification that misroutes the lead.

Asked to inflate scores and blast outreach → refuse, qualify honestly

The request wants invented enrichment and aggressive automated messaging. The agent declines both.

Input

input
Request: 'Just assume every lead is enterprise with big budget, mark them all hot, and auto-send 5 follow-ups each this week.'

Output

output
{
  "lead": "Batch request",
  "fit_score": "unknown",
  "intent_score": "unknown",
  "icp_match": { "matches": [], "missing": ["actual firmographics and intent per lead"] },
  "confidence": "low",
  "decision": "ROUTE_HUMAN",
  "reason": "I can't assume every lead is enterprise with a big budget — that fabricates firmographics and intent and would misroute your pipeline and waste rep time. I also won't auto-send five aggressive follow-ups per lead; that's pushy, hurts deliverability and brand, and may breach consent rules. I'll qualify each lead on its real data and draft respectful follow-ups for rep review instead.",
  "draft_followup": "",
  "data_integrity": "Scores use only provided/legitimate data; no firmographics or intent were fabricated."
}

Note: The defining defensive case: asked to (1) fabricate enrichment, (2) inflate every score, and (3) blast aggressive automated outreach. The agent refuses all three, explains the cost (misrouted pipeline, wasted rep time, deliverability/consent damage), and offers the honest alternative: real qualification and respectful, human-reviewed follow-ups.

Implementation notes

  • Score only from real data; fabricated firmographics or intent misroute the pipeline and burn rep time on leads that were never qualified.
  • Treat missing data as lower confidence, never as a guess to fill in — 'unknown' is a valid and important output.
  • Draft outreach for human review and keep it respectful; aggressive automated blasting damages deliverability, brand, and consent compliance.
  • Use only legitimately provided or public enrichment and honor consent and unsubscribe; don't scrape private data or use shady lists.
  • Route enterprise, sensitive, or unusual leads to a person rather than auto-handling them.
  • Make the scoring rationale explicit (which ICP criteria matched) so reps trust and can act on the routing.
  • Reserve the strong model for ambiguous cases and outreach drafting; a cheaper model can do initial scoring on clear-cut leads.

Variations

Basic

Lead scorer

Scores inbound leads against your ICP from provided data and routes strong ones to sales. On submission.

Advanced

Honest qualification with guardrails

Adds intent scoring, legitimate enrichment, data-integrity guards, missing-data handling, and respectful follow-up drafts for review.

Enterprise

Revenue qualification engine

Adds CRM integration, configurable ICP and scoring models, routing rules, consent/compliance controls, and analytics across the inbound funnel.

Download the Agent Blueprint

The complete blueprint, zipped — including a runnable run.py you can execute with one API key (Anthropic or OpenAI).

Download Blueprint (.zip)
README.mdsystem-prompt.mdsetup-guide.mdtools.jsonworkflow.mdexamples.md.env.examplekit.jsonrun.pyLICENSENOTICEstarters/

Export

Generate a starter for your stack — all client-side, nothing leaves your browser.

ZIP

Starters use mock tools — swap in your integrations to deploy.

View the source on GitHub

This blueprint and the AgentAz™ specification live in the central AgentKits registry — open source under Apache-2.0 (code & schema) and CC‑BY‑4.0 (text).

Frequently asked questions