
Product
15 Mins Read
Building a Workflow Engine That Handles 10M Runs Per Day

Leama Team
Editorial team
An AI prospecting agent can sound suspiciously simple in a headline.
Describe your ideal customer. Receive qualified prospects.
The promise is simple. The work should not be simplistic.
A useful prospecting agent has to turn an incomplete commercial description into a sequence of research and decision steps. It needs to know what to search for, what counts as evidence, when to reject a company, which person matters, which data is trustworthy enough to deliver, and how to explain the result.
This is the practical chain.
1. Turn the ICP into a research brief
The first input is rarely ready for an agent.
A user may say:
We target software companies in the US with about 50 to 200 employees.
That is a start, but it leaves important questions unanswered:
- B2B or B2C?
- Which software categories?
- Which problem does the offer solve?
- Which buyer owns that problem?
- What makes one company more urgent than another?
- Which adjacent categories look similar but should be excluded?
- Which contact fields are required?
A good setup turns the initial description into a structured brief.
That brief should separate required criteria from preferences. It should also make exclusions explicit. Otherwise an agent may stretch the target in order to complete the requested number of prospects.
2. Discover candidate companies
The sourcing stage looks for companies that might fit.
This is not yet qualification. It is candidate generation.
The agent can use combinations of market terms, company descriptions, location information, directories, websites, public announcements, and other permitted business sources to identify possibilities.
A candidate should enter the next step with enough source information to inspect. It should not become a delivered prospect merely because one search result used the right keyword.
This distinction prevents a common failure: treating discovery confidence as qualification confidence.
3. Validate the company
The agent then checks the company against the brief.
Questions can include:
- Does the company sell to businesses?
- Does its actual offer fit the target category?
- Is the apparent size within range?
- Is it active in the selected geography?
- Does the business model support the use case?
- Does it meet any required maturity or growth condition?
- Does an exclusion apply?
The best source is often the company's own website, but no single page should be treated as infallible. Company information can be vague, outdated, or written for marketing rather than classification.
The agent should assemble evidence, not hunt for one sentence that confirms the desired answer.
4. Look for current relevance
A company can fit the ICP and still have no clear reason to prioritize it today.
Current relevance may come from:
- Hiring for a relevant team
- Entering a new market
- Appointing a new leader
- Raising capital
- Launching a product
- Opening a location
- Expanding a partner program
- Publishing a strategic initiative
A signal is not a guarantee of buying intent. It is context.
The agent should describe what happened and why it may matter without claiming knowledge of an internal problem.
"Hiring three SDRs" is observable.
"Their current prospecting process is failing" is an assumption.
Useful output keeps that line clear.
5. Select the buyer
Company qualification comes before contact selection.
The agent uses the offer and company context to identify the role most likely to own, influence, or evaluate the problem.
That may require role logic by company size.
For example:
- Founder at 10 to 30 employees
- VP Sales at 30 to 200 employees
- Revenue Operations or Sales Development leadership at larger companies
The exact logic changes by offer.
A technical product may require a CTO or platform leader. A customer-experience service may require operations or experience leadership. A finance offer may require a CFO or controller.
The agent should prefer relevance over seniority.
6. Match and check contact data
After the buyer is selected, Leama looks for the requested business data.
That can include:
- Name
- Job title
- Business email
- Phone
- LinkedIn profile
- Company website
- Country
- Other relevant social profiles
Each field has a different level of confidence and availability.
A profile match can be ambiguous. A title may be outdated. An email pattern can be plausible but unverified. A phone number may belong to the company rather than the person.
The record should preserve those distinctions where possible. It is better to deliver fewer fields than to turn guesses into facts.
7. Score and explain the prospect
A score helps sort records. The explanation helps trust them.
An ICP score can summarize how well a prospect meets the active criteria. A priority tier can combine fit with current relevance. Neither should stand alone.
The record should also state:
- Why the company matches
- Which criteria were strongest
- Which current signal mattered
- Which buyer was selected and why
- Which uncertainties remain
This gives a salesperson a way to challenge the decision.
It also makes feedback more useful. "Bad lead" teaches very little. "Wrong business model, the company serves consumers" points to a rule that can be corrected.
8. Prepare the outreach context
A suggested outreach angle should help a human begin, not impersonate one.
The agent can connect the offer to a current signal or fit reason. It should avoid fake familiarity, overconfident diagnoses, and empty personalization.
Weak:
Loved what you are doing at Acme. We help companies like yours grow.
Stronger:
Acme is hiring its first SDR team. Ask how the company plans to keep those reps supplied with qualified accounts as they ramp.
The second version uses observable context and gives the salesperson a useful question. It still requires human judgment and rewriting.
9. Deliver the complete record
The prospect should arrive with the context intact.
A complete delivery can include:
- Company and buyer
- Contact details
- Qualification status
- ICP score
- Priority
- Fit note
- Company signal
- Buying trigger
- Outreach angle
- Source links or evidence where supported
Free Leama users receive this in a ClickUp CRM. Paid workflows can add CSV, CRM, or webhook delivery.
The delivery destination should not reduce the record to three columns. When the reasoning disappears, the salesperson has to redo the research.
10. Use human feedback to improve the next run
No agent should be treated as correct by default.
Users need simple ways to mark:
- Correct fit
- Wrong fit
- Wrong buyer
- Incorrect data
- Duplicate
- Useful signal
- Weak signal
- Contacted
- Interested
- Not relevant
That feedback can reveal where the brief, source strategy, qualification rule, or contact logic needs adjustment.
Material changes should remain visible and controlled. "Self-improving" is useful only when the user can understand what changed and why.
What the process is designed to prevent
This chain is designed to prevent five expensive outcomes:
- Enriching companies that never fit
- Selecting irrelevant senior contacts
- Treating stale or ambiguous data as certain
- Sending generic outreach because the record has no context
- Repeating the same targeting mistakes in every run
An AI prospecting agent is not valuable because it uses more steps.
It is valuable when those steps produce a record a good researcher would recognize as sensible, with enough evidence for a human to decide what to do next.
Product
15 Mins Read
Building a Workflow Engine That Handles 10M Runs Per Day

Leama Team
Editorial team
An AI prospecting agent can sound suspiciously simple in a headline.
Describe your ideal customer. Receive qualified prospects.
The promise is simple. The work should not be simplistic.
A useful prospecting agent has to turn an incomplete commercial description into a sequence of research and decision steps. It needs to know what to search for, what counts as evidence, when to reject a company, which person matters, which data is trustworthy enough to deliver, and how to explain the result.
This is the practical chain.
1. Turn the ICP into a research brief
The first input is rarely ready for an agent.
A user may say:
We target software companies in the US with about 50 to 200 employees.
That is a start, but it leaves important questions unanswered:
- B2B or B2C?
- Which software categories?
- Which problem does the offer solve?
- Which buyer owns that problem?
- What makes one company more urgent than another?
- Which adjacent categories look similar but should be excluded?
- Which contact fields are required?
A good setup turns the initial description into a structured brief.
That brief should separate required criteria from preferences. It should also make exclusions explicit. Otherwise an agent may stretch the target in order to complete the requested number of prospects.
2. Discover candidate companies
The sourcing stage looks for companies that might fit.
This is not yet qualification. It is candidate generation.
The agent can use combinations of market terms, company descriptions, location information, directories, websites, public announcements, and other permitted business sources to identify possibilities.
A candidate should enter the next step with enough source information to inspect. It should not become a delivered prospect merely because one search result used the right keyword.
This distinction prevents a common failure: treating discovery confidence as qualification confidence.
3. Validate the company
The agent then checks the company against the brief.
Questions can include:
- Does the company sell to businesses?
- Does its actual offer fit the target category?
- Is the apparent size within range?
- Is it active in the selected geography?
- Does the business model support the use case?
- Does it meet any required maturity or growth condition?
- Does an exclusion apply?
The best source is often the company's own website, but no single page should be treated as infallible. Company information can be vague, outdated, or written for marketing rather than classification.
The agent should assemble evidence, not hunt for one sentence that confirms the desired answer.
4. Look for current relevance
A company can fit the ICP and still have no clear reason to prioritize it today.
Current relevance may come from:
- Hiring for a relevant team
- Entering a new market
- Appointing a new leader
- Raising capital
- Launching a product
- Opening a location
- Expanding a partner program
- Publishing a strategic initiative
A signal is not a guarantee of buying intent. It is context.
The agent should describe what happened and why it may matter without claiming knowledge of an internal problem.
"Hiring three SDRs" is observable.
"Their current prospecting process is failing" is an assumption.
Useful output keeps that line clear.
5. Select the buyer
Company qualification comes before contact selection.
The agent uses the offer and company context to identify the role most likely to own, influence, or evaluate the problem.
That may require role logic by company size.
For example:
- Founder at 10 to 30 employees
- VP Sales at 30 to 200 employees
- Revenue Operations or Sales Development leadership at larger companies
The exact logic changes by offer.
A technical product may require a CTO or platform leader. A customer-experience service may require operations or experience leadership. A finance offer may require a CFO or controller.
The agent should prefer relevance over seniority.
6. Match and check contact data
After the buyer is selected, Leama looks for the requested business data.
That can include:
- Name
- Job title
- Business email
- Phone
- LinkedIn profile
- Company website
- Country
- Other relevant social profiles
Each field has a different level of confidence and availability.
A profile match can be ambiguous. A title may be outdated. An email pattern can be plausible but unverified. A phone number may belong to the company rather than the person.
The record should preserve those distinctions where possible. It is better to deliver fewer fields than to turn guesses into facts.
7. Score and explain the prospect
A score helps sort records. The explanation helps trust them.
An ICP score can summarize how well a prospect meets the active criteria. A priority tier can combine fit with current relevance. Neither should stand alone.
The record should also state:
- Why the company matches
- Which criteria were strongest
- Which current signal mattered
- Which buyer was selected and why
- Which uncertainties remain
This gives a salesperson a way to challenge the decision.
It also makes feedback more useful. "Bad lead" teaches very little. "Wrong business model, the company serves consumers" points to a rule that can be corrected.
8. Prepare the outreach context
A suggested outreach angle should help a human begin, not impersonate one.
The agent can connect the offer to a current signal or fit reason. It should avoid fake familiarity, overconfident diagnoses, and empty personalization.
Weak:
Loved what you are doing at Acme. We help companies like yours grow.
Stronger:
Acme is hiring its first SDR team. Ask how the company plans to keep those reps supplied with qualified accounts as they ramp.
The second version uses observable context and gives the salesperson a useful question. It still requires human judgment and rewriting.
9. Deliver the complete record
The prospect should arrive with the context intact.
A complete delivery can include:
- Company and buyer
- Contact details
- Qualification status
- ICP score
- Priority
- Fit note
- Company signal
- Buying trigger
- Outreach angle
- Source links or evidence where supported
Free Leama users receive this in a ClickUp CRM. Paid workflows can add CSV, CRM, or webhook delivery.
The delivery destination should not reduce the record to three columns. When the reasoning disappears, the salesperson has to redo the research.
10. Use human feedback to improve the next run
No agent should be treated as correct by default.
Users need simple ways to mark:
- Correct fit
- Wrong fit
- Wrong buyer
- Incorrect data
- Duplicate
- Useful signal
- Weak signal
- Contacted
- Interested
- Not relevant
That feedback can reveal where the brief, source strategy, qualification rule, or contact logic needs adjustment.
Material changes should remain visible and controlled. "Self-improving" is useful only when the user can understand what changed and why.
What the process is designed to prevent
This chain is designed to prevent five expensive outcomes:
- Enriching companies that never fit
- Selecting irrelevant senior contacts
- Treating stale or ambiguous data as certain
- Sending generic outreach because the record has no context
- Repeating the same targeting mistakes in every run
An AI prospecting agent is not valuable because it uses more steps.
It is valuable when those steps produce a record a good researcher would recognize as sensible, with enough evidence for a human to decide what to do next.
15 Mins Read
Building a Workflow Engine That Handles 10M Runs Per Day

Leama Team
Editorial team
An AI prospecting agent can sound suspiciously simple in a headline.
Describe your ideal customer. Receive qualified prospects.
The promise is simple. The work should not be simplistic.
A useful prospecting agent has to turn an incomplete commercial description into a sequence of research and decision steps. It needs to know what to search for, what counts as evidence, when to reject a company, which person matters, which data is trustworthy enough to deliver, and how to explain the result.
This is the practical chain.
1. Turn the ICP into a research brief
The first input is rarely ready for an agent.
A user may say:
We target software companies in the US with about 50 to 200 employees.
That is a start, but it leaves important questions unanswered:
- B2B or B2C?
- Which software categories?
- Which problem does the offer solve?
- Which buyer owns that problem?
- What makes one company more urgent than another?
- Which adjacent categories look similar but should be excluded?
- Which contact fields are required?
A good setup turns the initial description into a structured brief.
That brief should separate required criteria from preferences. It should also make exclusions explicit. Otherwise an agent may stretch the target in order to complete the requested number of prospects.
2. Discover candidate companies
The sourcing stage looks for companies that might fit.
This is not yet qualification. It is candidate generation.
The agent can use combinations of market terms, company descriptions, location information, directories, websites, public announcements, and other permitted business sources to identify possibilities.
A candidate should enter the next step with enough source information to inspect. It should not become a delivered prospect merely because one search result used the right keyword.
This distinction prevents a common failure: treating discovery confidence as qualification confidence.
3. Validate the company
The agent then checks the company against the brief.
Questions can include:
- Does the company sell to businesses?
- Does its actual offer fit the target category?
- Is the apparent size within range?
- Is it active in the selected geography?
- Does the business model support the use case?
- Does it meet any required maturity or growth condition?
- Does an exclusion apply?
The best source is often the company's own website, but no single page should be treated as infallible. Company information can be vague, outdated, or written for marketing rather than classification.
The agent should assemble evidence, not hunt for one sentence that confirms the desired answer.
4. Look for current relevance
A company can fit the ICP and still have no clear reason to prioritize it today.
Current relevance may come from:
- Hiring for a relevant team
- Entering a new market
- Appointing a new leader
- Raising capital
- Launching a product
- Opening a location
- Expanding a partner program
- Publishing a strategic initiative
A signal is not a guarantee of buying intent. It is context.
The agent should describe what happened and why it may matter without claiming knowledge of an internal problem.
"Hiring three SDRs" is observable.
"Their current prospecting process is failing" is an assumption.
Useful output keeps that line clear.
5. Select the buyer
Company qualification comes before contact selection.
The agent uses the offer and company context to identify the role most likely to own, influence, or evaluate the problem.
That may require role logic by company size.
For example:
- Founder at 10 to 30 employees
- VP Sales at 30 to 200 employees
- Revenue Operations or Sales Development leadership at larger companies
The exact logic changes by offer.
A technical product may require a CTO or platform leader. A customer-experience service may require operations or experience leadership. A finance offer may require a CFO or controller.
The agent should prefer relevance over seniority.
6. Match and check contact data
After the buyer is selected, Leama looks for the requested business data.
That can include:
- Name
- Job title
- Business email
- Phone
- LinkedIn profile
- Company website
- Country
- Other relevant social profiles
Each field has a different level of confidence and availability.
A profile match can be ambiguous. A title may be outdated. An email pattern can be plausible but unverified. A phone number may belong to the company rather than the person.
The record should preserve those distinctions where possible. It is better to deliver fewer fields than to turn guesses into facts.
7. Score and explain the prospect
A score helps sort records. The explanation helps trust them.
An ICP score can summarize how well a prospect meets the active criteria. A priority tier can combine fit with current relevance. Neither should stand alone.
The record should also state:
- Why the company matches
- Which criteria were strongest
- Which current signal mattered
- Which buyer was selected and why
- Which uncertainties remain
This gives a salesperson a way to challenge the decision.
It also makes feedback more useful. "Bad lead" teaches very little. "Wrong business model, the company serves consumers" points to a rule that can be corrected.
8. Prepare the outreach context
A suggested outreach angle should help a human begin, not impersonate one.
The agent can connect the offer to a current signal or fit reason. It should avoid fake familiarity, overconfident diagnoses, and empty personalization.
Weak:
Loved what you are doing at Acme. We help companies like yours grow.
Stronger:
Acme is hiring its first SDR team. Ask how the company plans to keep those reps supplied with qualified accounts as they ramp.
The second version uses observable context and gives the salesperson a useful question. It still requires human judgment and rewriting.
9. Deliver the complete record
The prospect should arrive with the context intact.
A complete delivery can include:
- Company and buyer
- Contact details
- Qualification status
- ICP score
- Priority
- Fit note
- Company signal
- Buying trigger
- Outreach angle
- Source links or evidence where supported
Free Leama users receive this in a ClickUp CRM. Paid workflows can add CSV, CRM, or webhook delivery.
The delivery destination should not reduce the record to three columns. When the reasoning disappears, the salesperson has to redo the research.
10. Use human feedback to improve the next run
No agent should be treated as correct by default.
Users need simple ways to mark:
- Correct fit
- Wrong fit
- Wrong buyer
- Incorrect data
- Duplicate
- Useful signal
- Weak signal
- Contacted
- Interested
- Not relevant
That feedback can reveal where the brief, source strategy, qualification rule, or contact logic needs adjustment.
Material changes should remain visible and controlled. "Self-improving" is useful only when the user can understand what changed and why.
What the process is designed to prevent
This chain is designed to prevent five expensive outcomes:
- Enriching companies that never fit
- Selecting irrelevant senior contacts
- Treating stale or ambiguous data as certain
- Sending generic outreach because the record has no context
- Repeating the same targeting mistakes in every run
An AI prospecting agent is not valuable because it uses more steps.
It is valuable when those steps produce a record a good researcher would recognize as sensible, with enough evidence for a human to decide what to do next.