Using AI agents to find LinkedIn leads

Learn how to connect LLMs like Claude and ChatGPT to LinkedIn through an API or MCP server, then find, score and message leads from your own account.

Get started

Short answer

To use AI agents for LinkedIn prospecting, connect an LLM to a tool layer that can search profiles, read posts, score leads and send messages from your LinkedIn account. Describe the customer you want, set a score cutoff, and let the agent work inside daily limits you control.

Start with a customer profile the agent can test

An agent can only filter what you describe. If you say marketing managers, it will return people with that title and no reason to buy. Give it three things instead: the company type, the role, and a trigger that suggests the person has the problem you solve.

Company type means size, industry and location. Role means the job title and the work they own. Trigger means something recent you can observe on LinkedIn, such as a post about hiring, a comment about a tool, or a job change. Without a trigger, the agent is guessing.

Turn those three things into a score. Pick must-haves that reject a lead, like works at an agency with 20 to 100 people or is responsible for outbound. Then add nice-to-haves that raise the score, like posted about pipeline this month. Set a cutoff and keep only leads above it. A simple 0 to 100 score works because you can explain why a lead passed.

Too broad to score

  • Find marketing managers.
  • Look for people interested in AI.
  • Target sales leaders in the US.

Ready to score

  • Marketing managers at agencies with 20 to 100 people who posted about lead volume in the last 30 days.
  • VPs of Sales at software companies hiring SDRs, where the VP mentions outbound in their About section.
  • Heads of Operations at German logistics firms who commented on a post about warehouse automation.

If you cannot name the evidence that makes someone a lead, the agent cannot find it. Write the evidence before you write the prompt.

Connect the LLM to LinkedIn data

Chat apps do not see LinkedIn search results on their own. You need a tool layer the model can call. That layer can be a REST API you script against, or an MCP server that exposes tools to Claude, ChatGPT or another client. MCP is easier for chat use. REST is easier for scheduled jobs.

Treat reading and sending as separate permissions. Let the agent search profiles, pull a post and check replies. Do not give a test agent the ability to send until you have watched it score leads and draft messages for a week. The same rule applies to scripts. A script that can only read is safe to run while you tune your profile.

Name the tools in plain language. If the agent has search_people, get_profile and list_replies, it will use them more reliably than if you describe the whole workflow in one prompt. Ask it to return a table with profile URL, score, reason and evidence. That table is what you review.

  1. 1

    Pick the client

    Use Claude Desktop, ChatGPT with a connector, Cursor or a Python script. Chat is fine for a small batch. Use a script when you need to process a list every morning.

  2. 2

    Set up access

    For MCP, add the server URL and complete OAuth. For REST, store the API key in an environment variable, not in your prompt or code.

  3. 3

    List the tools

    Ask the agent which tools it can see. You want search, profile lookup, post lookup and reply lookup before you add anything that sends.

  4. 4

    Test on five profiles

    Give the agent a narrow profile and ask for five leads with a score and a reason. Open each profile yourself. If the reasons are wrong, fix the profile before you run more.

Run lead discovery from a script

Use the chat client to learn what a good result looks like. Then move the same prompt and profile into a script. The script should do four things: search, score, remove duplicates, and write a CSV. It should not send messages. Sending belongs in a separate step after you have checked the list.

Scoring is where most scripts go wrong. Do not ask the model for a score alone. Ask for a score and a short reason that quotes the profile. If the reason is vague, the score is noise. You can sort by score, read the top rows, and reject any lead where the reason does not match your profile.

Keep the CSV columns boring: profile URL, name, company, score, reason and source. A CSV of LinkedIn profile URLs can be imported into an outreach tool later. Do not add fields you will not use.

Paste this job

import csv, os, requests

API_KEY = os.environ['LEAD_API_KEY']
PROFILE = 'Heads of Operations at logistics firms in Germany with 50 to 200 staff. Trigger: commented on warehouse automation posts in the last 30 days.'

resp = requests.post(
    'https://api.example.com/leads/search',
    headers={'Authorization': f'Bearer {API_KEY}'},
    json={'query': PROFILE, 'limit': 100},
)
leads = resp.json()['leads']
kept = [l for l in leads if l['score'] >= 70 and l.get('reason')]

with open('leads.csv', 'w', newline='') as f:
    w = csv.writer(f)
    w.writerow(['profile_url', 'name', 'company', 'score', 'reason', 'source'])
    for l in kept:
        w.writerow([l['url'], l['name'], l['company'], l['score'], l['reason'], l['source']])

print(f'kept {len(kept)} of {len(leads)}')

Write outreach that references the lead's post

The first line decides whether the message reads as human. It should name the post or comment the lead wrote and what it was about. Do not open with I came across your profile. That could be sent to anyone.

Give the agent a rule: use one fact from the lead's recent activity, one sentence about why that matters to their role, and one question. Keep the note under 200 characters if you are sending a connection request. For a follow-up message, you have more room but the same rule applies. If the message still works with a different name, it is too generic.

Write the note in your own voice. If you would not say I noticed your insightful post, remove it. The agent can copy your tone from a few examples. Paste two past messages you sent that got replies and two you would never send. That contrast is more useful than a list of adjectives.

Generic note

  • Hi Sarah, I came across your profile and was impressed by your background. I help agencies grow with AI. Open to a chat?
  • Hi Sarah, hope you are well. I wanted to reach out about our platform.

Note tied to evidence

  • Sarah, your post on SDR churn at 40-person agencies matched what we see. We score leads against a profile so teams stop calling poor fits. Worth a 10-minute compare?
  • Sarah, you commented that warehouse automation projects stall on data quality. We map those gaps before the build. Want the one-page checklist?

Example

  1. Suggested reply

    Sarah, your post about SDR hiring at 40-person agencies hit a nerve. We score inbound leads against a profile so your team stops calling poor fits. Open to comparing notes?

  2. Prospect

    We are looking at that now. How do you handle the scoring part?

  3. You

    Start with must-haves like agency size and outbound ownership, then use recent posts as a trigger. I can walk you through the setup on a 10-minute call. Tuesday or Thursday?

Handle replies and book meetings

An agent can watch replies and sort them. The sorting should be simple: interested now, not now, wrong person, and question. Interested now means the person asked about a call, price, or next step. Not now means they gave a later date. Wrong person means they pointed you to someone else. Question means they need an answer before they will book.

Do not let the agent invent an answer to a product question. Give it a short playbook with your real answers. If the playbook does not cover the question, the agent should hand the thread to you. That is the difference between a useful assistant and a confident one that makes things up.

Book only after the lead confirms a time window. The agent can send your scheduling link when someone says yes. It should not send the link in the first reply to every person who says interesting. A calendar link is a close, not an opener.

Interested now

Reply
Answer from the playbook, then send your scheduling link
What the agent can do
The call itself and any pricing question

Not now

Reply
Ask for a later date and tag the lead
What the agent can do
The decision to keep the lead in the group

Wrong person

Reply
Ask for the right contact and record the name
What the agent can do
The intro or warm handoff

Question

Reply
Draft an answer from the playbook and stop if the answer is missing
What the agent can do
Any answer that is not in the playbook

Doing this with Kinlead

Kinlead has a REST Agent API and an MCP server. Claude, ChatGPT, Cursor and other MCP clients can find leads, check replies and draft answers from the chat. Lead search uses LinkedIn's standard search, so a Sales Navigator seat is not required.

The Steal Customers agent watches competitor company pages and optional founder or employee profiles, reads comments on recent posts, and turns commenters who look like buyers into leads. Each lead keeps the post URL, what the post was about and what they commented. Outreach runs from your own LinkedIn account through Unipile at one action every 5 minutes, inside the limits and send window you set.

  • Leads are scored 0 to 100 against the customer you describe or your website. Leads below the fit line are not kept.
  • Connection notes are AI-written and under 200 characters, with an opening that says why that person became a lead.
  • Queued messages can be read and edited on the Actions page before they send, and any campaign can be paused.
  • Replies from every campaign land in one inbox, sorted by intent, with interested replies first.

Pick hand-off mode if you want to read every reply before a response goes out. In the AI reply modes, replies send on their own.

Frequently asked questions

Related

Get started with Kinlead

Prefer markdown? Using AI agents to find LinkedIn leads.md