Three chips on a soft blush pink gradient background; text reads "How to," "Build," and "Real-Time LinkedIn Prospecting Agent"

How to Build a Real-Time LinkedIn Prospecting Agent with PhantomBuster and Claude

Share this post
CONTENT TABLE

Ready to boost your growth?

14-day free trial - No credit card required

You can build a same-turn LinkedIn agent by calling PhantomBuster’s /agents/launch-sync or connecting the official MCP server so Claude gets structured results in one tool call—no polling or Sheets bridge.

Many “real-time LinkedIn agents” still rely on polling. They launch an automation, write the results to Google Sheets, and wait for another system to detect them. This adds latency and failure points. It also breaks the main benefit of an agent: one tool call that returns useful data while the reasoning loop is still active.

Use PhantomBuster’s /agents/launch-sync to stream execution status, or connect the official MCP server so Claude can launch Automations and fetch results in the same turn. Use this same-turn flow to extract, enrich, and prioritize leads. You keep connection requests and messages paced and human-reviewed when needed.

The goal isn’t full autonomy—it’s faster research and better prospecting choices that lift reply rates and help you book more qualified meetings.

Why many LinkedIn agent architectures fail in practice

Why do polling loops break tool calling?

When Claude calls a tool, it needs a result it can use immediately. That usually means structured data, a clear error, or a request for missing information. “Job started, check another system later” is not enough.

It breaks the reasoning loop and moves the workflow state outside the conversation. Instead, return a structured result or error in the same tool call via /agents/launch-sync, then fetch the completed output before responding to Claude. Polling also creates several blind spots:

  • PhantomBuster completes the extraction, but the spreadsheet is not updated.
  • New rows appear, but the polling scenario is inactive.
  • A webhook fires twice and creates duplicate activity.
  • Claude receives old data without knowing when it was generated.

The problem is not Google Sheets, CRMs, or workflow platforms themselves. The problem is using them as the bridge between Claude and the result. Keep Sheets and your CRM at the end of the flow for reporting and handoff—only after Claude has a ranked, decision-ready list.

Once Claude has qualified and prioritized the leads, you send the approved records to a spreadsheet or CRM for collaboration and handoff.

What “real-time” means for LLM tool use

For an agent, real-time does not mean that every operation finishes instantly. LinkedIn extraction and contact enrichment still take time. Real-time means you keep the operation attached to the current tool call so Claude can decide next steps immediately:

  • Claude requests the task.
  • PhantomBuster launches the Automation.
  • The integration receives execution status.
  • The completed output is retrieved.
  • Claude uses that output to choose the next step.

The reasoning loop remains coherent because the agent does not have to reconstruct state from a spreadsheet, webhook, or later conversation. Consider selective enrichment.

Claude might export 100 profiles, determine that only 18 match the ICP closely enough to justify deeper research, enrich those 18, and explain why 10 deserve human attention first. That sequence works best when each result is available to the next decision. The value is not raw speed. It is continuity.

How does PhantomBuster’s Streaming API change the architecture?

What does a same-turn tool call look like with streaming?

PhantomBusters /agents/launch-sync endpoint launches an Automation and streams its execution status in NDJSON format. The stream begins with a start event containing a containerId, followed by heartbeats, an execution summary, and any errors.

Logs can also be included. Open the stream, capture containerId, and on completion, call the results endpoint using the container or Automation id; return normalized objects to Claude.

Don’t treat the streamed summary as the final dataset—fetch the completed result before returning data to Claude. In your wrapper, use the Automation or container id to fetch the result when the run completes, then return a single, structured payload to Claude in the same turn. The flow is:

  1. Launch the Automation via /agents/launch-sync.
  2. Stream status and capture containerId.
  3. On completion, fetch the result using the Automation or container id.
  4. Map to a normalized lead schema and return it to Claude.

This is more precise than claiming that every Automation streams its complete CSV or JSON dataset directly inside the final event.

If you don’t need a custom API, connect PhantomBuster’s MCP server so Claude can launch Automations, retrieve outputs, and build filtered lead lists within your selected workspace—no extra plumbing. Authenticate via OAuth; the MCP server only exposes the workspace you select.

How do you design around rate limits and operational constraints?

Do not model every profile as an independent tool call. A workflow that launches 500 single-profile operations creates unnecessary overhead and gives Claude hundreds of low-value intermediate results to process. Batch by decision stage (start with 50–100 results), then expand once the loop is stable:

  1. Export a meaningful set of search results.
  2. Remove duplicates and obvious mismatches.
  3. Apply inexpensive ICP rules.
  4. Enrich only the qualified subset.
  5. Return one ranked result set.

Start with a small representative batch and increase it only after the workflow runs reliably. Large searches also need to respect the data LinkedIn makes accessible.

Standard LinkedIn search returns up to approximately 1,000 results, while Sales Navigator People searches return up to approximately 2,500. Split larger markets into mutually exclusive filters by geography, seniority, or company size.

How do you go from search to a prioritized lead list in one turn?

Step 1: How do you expose a PhantomBuster Automation as a callable tool?

PhantomBuster’s official MCP server lets Claude access your Automations from a conversation. Add it as a custom connector, authenticate your PhantomBuster account, and select the workspace Claude can use.

Start with PhantomBuster Automations that collect or enrich data—so you can validate quality before any visible LinkedIn actions:

  • LinkedIn Search Export takes a LinkedIn search URL and returns profile information such as names, headlines, locations, companies, and profile URLs.
  • LinkedIn Profile Scraper takes profile URLs and returns richer information from the profiles that are available to your account.
  • PhantomBuster’s LinkedIn Profile URL Finder matches names and company information with LinkedIn profile URLs. It is useful when the starting point is a CRM or spreadsheet rather than a LinkedIn search.

Together, these Automations form the agent’s read layer. Claude can use them to research, qualify, and prioritize prospects without immediately sending a connection request or message.

Keep outreach Automations out until your research loop reaches less than 2% duplicate rate, stable session health, and consistent scoring across two consecutive runs.

Step 2: How do you define the decision loop Claude runs in one session?

The agent’s job is to turn a prospecting objective into a ranked list the sales team can review. For example: Find 20 VP Marketing prospects at Series B SaaS companies in New York. Have Claude run this loop:

  1. Translate the request into search criteria and qualification rules.
  2. Call LinkedIn Search Export to collect an initial list.
  3. Remove obvious mismatches based on role, seniority, company, and location.
  4. Send the remaining profile URLs to LinkedIn Profile Scraper.
  5. Rank the qualified leads and explain why each one matches.

Filtering before enrichment is important. There is little value in collecting detailed profile data for every search result when many candidates can be excluded using their headline, company, or current title.

Show the scoring logic with weights for role and seniority fit, company and industry fit, geography, relevant activity or timing signals, and confidence in the available evidence. Claude should make uncertainty visible. When a company’s funding stage, employee count, or industry cannot be confirmed, the result should say so rather than convert an assumption into a fact.

Don’t ship a raw export—return a shortlist with evidence so your rep can prioritize follow-ups that are most likely to convert to meetings.

Step 3: How do you add contact enrichment when you need it?

Contact enrichment should follow qualification, not precede it. For research-only workflows, names, roles, companies, and LinkedIn URLs may be enough. When contact details are required, enrich only the qualified subset.

Use PhantomBuster’s Professional Email Finder to return verified work emails for leads that match your fit criteria. Respect provider terms and only contact leads that meet qualification standards. Keep fit and contactability separate. An available email makes a lead reachable, not more qualified.

Step 4: How do you return decision-ready output in the same session?

Return a decision-ready list so you can approve outreach or request another pass immediately. For each prospect, return:

  • Name
  • Current title
  • Company
  • LinkedIn profile URL
  • Professional email, when available
  • Fit score or priority level
  • A short explanation of the ranking
  • Missing or uncertain information

A useful rationale might read: Strong role and location match. The prospect leads marketing at a SaaS company, but the company’s funding stage still needs confirmation. That is more useful than a raw export because it shows both the evidence and its limitation.

The sync vs. async decision rule: what belongs in a live loop

Low-risk actions: keep these synchronous

Read and data-processing tasks are the strongest fit for a live Claude loop. Group them by outcome:

Collect: search export, URL resolution, activity extraction
Enrich: profile and company data extraction, contact enrichment
Decide: data cleaning and deduplication, ICP qualification, lead scoring and comparison These tasks benefit from immediate feedback—you can have Claude tighten an overbroad search and run a smaller second pass while you’re still in the conversation.

Build this layer first. Validate the data quality, ranking logic, and error handling before deciding whether account-touching automation is necessary.

Account-touching actions: keep these paced and often reviewed

Connection requests, messages, comments, follows, and multi-step sequences create visible account activity. They should not run automatically just because Claude gives a lead a high score. Separate recommendation from execution:

  1. Claude recommends an action.
  2. Rules check eligibility and prevent duplicates.
  3. A human approves the campaign when needed.
  4. PhantomBuster executes through a paced schedule.
  5. Results and warnings are logged.

Keep safeguards outside Claude: configure an account governor to set working windows, pacing, acceptance checks, exclusions, and pause conditions before any sequence goes live. LinkedIn enforcement responds to behavioral patterns. Sudden spikes from a previously quiet account typically trigger more friction than steady, baseline activity. P

hantomBuster calls this your profile activity DNA—the pattern of actions your account normally performs in terms of volume, timing, and mix. Two accounts can run a similar workflow and experience different outcomes because their previous activity patterns are different.

Avoid a slide-and-spike pattern where activity stays low, rises abruptly, and then disappears again.

Responsible execution boundaries: how to avoid the always-on outbound trap

Why “real-time” does not mean “always-on”

Same-turn execution is useful for research, not continuous outreach. A system that extracts, decides, and sends without review can turn one poor assumption into several visible actions.

Build in layers: start with extraction, add approved connection activity once the workflow is stable, and introduce follow-up only after genuine acceptance delays.

What to keep human-reviewed

Keep human approval where mistakes could affect the account or brand:

  • Final outreach messages
  • Strategic or high-value accounts
  • Leads supported by weak or incomplete evidence
  • Sensitive prospects that require manual handling

Human review is not a failure of automation. It is a control point. As Michel Lieben notes, teams often adopt AI personalization before validating the offer itself. Better copy cannot fix poor targeting or a weak reason to contact someone.

How to pace account-touching actions

Don’t fixate on a single “safe” number—set predictable working windows, ramp gradually, and add automatic pauses on warnings. Use:

  • Predictable working windows
  • Gradual increases in activity
  • Delays between visible actions
  • Follow-up only after connection acceptance
  • Lower starting activity for dormant accounts
  • Automatic pauses when warning signals appear

What matters is not only volume. It is how sharply activity changes from the account’s established pattern.

How to handle platform caps and common failure modes

Split large searches, batch inputs, and resume incomplete work rather than expecting one run to return everything. Monitor five areas:

  • Session health: If you see more than 2 disconnects per run, pause and reauthenticate.
  • Run size: When runs approach client or tool timeouts, reduce batch sizes.
  • Schema changes: Normalize missing or renamed fields before Claude evaluates them.
  • Duplicates: Check canonical LinkedIn URLs and CRM history before adding records.
  • Permissions: Keep research tools separate from message-sending tools.

Different failures require different responses. Search caps call for narrower queries. Session friction calls for a pause. Automation errors call for logs and output inspection.

Worked example: How do you go from a company name to a prioritized lead list in one Claude turn?

The prompt

Find 15 VP-level marketing leaders at Series B SaaS companies in the Bay Area. Prioritize people who have posted on LinkedIn recently and whose companies have announced a significant funding round. Return a ranked list with name, title, company, profile URL, and a one-sentence reason for the ranking.

What the agent does

  1. Claude translates the request into search and qualification criteria.
  2. It calls LinkedIn Search Export to collect profile URLs and basic information.
  3. It removes titles, locations, and companies that clearly fall outside the brief.
  4. It sends the remaining profiles to LinkedIn Profile Scraper for deeper review.
  5. When recency matters, it uses PhantomBuster’s LinkedIn Activity Extractor to pull posts and engagement from your profile list.
  6. It enriches the qualified subset when contact details are required.
  7. It ranks the top 15 and states which evidence is confirmed, missing, or uncertain.

Continuity means you can ask Claude—right away—to refine filters, explain scores, or prep a CRM-ready export.

The output

Name Title Company Priority Ranking rationale
Sarah Chen VP Marketing Acme SaaS High Strong role and location match, with recent posts on product-led growth. Funding stage appears relevant but should be confirmed.
Michael Torres VP Growth Marketing Beta Corp High Owns the target function and has recent demand-generation activity. Company-stage evidence is incomplete.
Aisha Patel Head of Marketing Delta Cloud Medium Strong company and functional fit, but seniority is slightly below the requested VP level.

This is decision-ready output. The team can review the list, confirm uncertain evidence, choose who to contact, and plan outreach with the right approvals and pacing.

What this architecture does not do: why those limits matter

  • It does not replace human judgment on outreach: The agent can research, enrich, score, and prioritize leads, but incomplete data and ambiguous signals still require review. Human judgment matters most for strategic accounts, sensitive industries, and messages that make specific claims about a prospect.
  • It does not guarantee safety through volume limits alone: Staying below a commonly cited number does not mean an activity pattern will look normal for a specific account. Gradual ramping, stable pacing, and consistent working windows matter more than chasing a universal “safe” threshold.
  • It does not eliminate the need for monitoring: Track session disconnects, reauthentication requests, failed runs, missing fields, duplicates, enrichment gaps, and declining lead quality. A workflow can keep returning rows while the underlying results become less useful.

The practical goal is not maximum activity. It is a system that stays useful, reviewable, and stable over time.

Conclusion

A real-time LinkedIn prospecting agent keeps research, enrichment, and prioritization in one decision loop. This works because PhantomBuster’s streaming API and MCP server let you return structured, qualified leads to Claude in the same turn—before you commit to any outreach. Build the research layer first. Validate data quality, ranking logic, and ICP fit.

Add account-touching actions only after the workflow runs reliably and your team understands what good output looks like. When you do add outreach, keep it paced, human-reviewed, and separate from the agent’s recommendation layer.

That’s how you build a system that improves reply rates and meeting quality without risking account health. Start your free trial

FAQ

Which PhantomBuster Automations work best for synchronous agent use?

LinkedIn Search Export, LinkedIn Profile Scraper, LinkedIn Profile URL Finder, LinkedIn Activity Extractor, and Professional Email Finder work best because they return data Claude can qualify and prioritize without creating visible account activity. Start with these before adding connection or messaging Automations.

Should Claude automate connection requests in the live loop?

No. Claude can recommend the action and explain why a lead qualifies, but connection requests and messages should run through separate pacing, eligibility, and approval controls. This works because outreach safety depends on rate limits, working windows, and duplicate checks that sit outside the agent’s reasoning loop.

How should the agent handle large LinkedIn searches?

Split large markets into narrower, non-overlapping searches using mutually exclusive filters like geography, seniority, or company size. Process them in batches of 50–100 results and deduplicate before enrichment. Standard LinkedIn search returns approximately 1,000 results; Sales Navigator People searches return approximately 2,500.

How do I connect PhantomBuster’s MCP server to Claude?

Add PhantomBuster’s MCP server as a custom connector in Claude. Authenticate via OAuth and select the workspace you want Claude to access. The server exposes Automations, output retrieval, lead search, and filtered list creation—no custom API wrapper needed.

What happens if a streaming run times out?

If the /agents/launch-sync stream times out before completion, your wrapper should fall back to polling the container or Automation status until the run finishes or fails. Return an error to Claude if the run does not complete within your timeout threshold, so it can retry with a smaller batch or narrower scope.

How do I keep outreach paced if multiple reps share the same account?

Use a shared account governor that tracks total daily activity across all reps. Set a team-wide cap, distribute it across reps proportionally or by priority, and pause all sequences when the cap is reached. This works because LinkedIn enforcement evaluates account-level patterns, not per-user behavior.

What metrics show the agent is improving pipeline quality?

Track reply rate, meeting booking rate, and the ratio of qualified meetings to total outreach. Compare leads scored by Claude against your baseline prospecting method. If reply rates increase and fewer meetings turn out to be poor fits, the agent’s qualification and prioritization logic is working.

How do I split large markets on LinkedIn without overlap?

Use mutually exclusive filters like geographic regions, seniority levels (IC vs. Manager vs. VP), or company size brackets. Run separate searches for each segment, deduplicate by canonical LinkedIn URL across all results, and merge the qualified leads into one ranked list before enrichment.

Related Articles