Automated candidate sourcing pipeline for Liepin (猎聘). Submits a background job that searches, evaluates, and communicates with candidates via browser automation + LLM evaluation.
.env):LIEPIN_USERNAME / LIEPIN_PASSWORDJD_WORKER_LLM_PROVIDER, JD_WORKER_LLM_MODEL, JD_WORKER_LLM_API_KEY, JD_WORKER_LLM_BASE_URLRESUME_WORKER_LLM_PROVIDER, RESUME_WORKER_LLM_MODEL, RESUME_WORKER_LLM_API_KEY, RESUME_WORKER_LLM_BASE_URL```bash
cd skills/liepin-agentic-sourcing
python3 scripts/login_and_save_session.py
python3 scripts/session_persistence_probe.py
```
Create a JSON file (e.g. criteria.json) with all required fields:
{
"position_name": "职位名称",
"target_count": 3,
"position_scope": "完整的职位描述/JD文本",
"cities": ["上海", "深圳"],
"seniority": "5-10年",
"must_have_signals": ["关键词1", "关键词2"],
"preferred_signals": ["加分项1"],
"hard_rejects": ["排除项1"]
}
| Field | Required | Description |
|---|---|---|
| ------- | ---------- | ------------- |
position_name | ✅ | Target position name |
target_count | ✅ | Number of candidates to communicate with |
position_scope | ✅ | Full JD text, used by JD-worker to generate search keywords |
cities | ✅ | City filter list |
seniority | ✅ | Experience band (e.g. "5-10年") |
must_have_signals | ✅ | Hard requirement keywords |
preferred_signals | ❌ | Nice-to-have keywords |
hard_rejects | ❌ | Instant rejection keywords |
> ⚠️ City and seniority must be explicitly provided. Do not let JD-worker guess them.
cd skills/liepin-agentic-sourcing
python3 scripts/jd_search_and_communicate.py --criteria-file path/to/criteria.json
Dry-run (validate criteria without launching):
python3 scripts/jd_search_and_communicate.py --criteria-file path/to/criteria.json --dry-run
Output: Started Liepin runtime job:
┌─────────────┐
│ Launcher │── starts 4 workers as subprocesses
└──────┬──────┘
│
┌────┴──────────────────────────────────────────┐
│ │
▼ ▼
┌──────────┐ search plan ┌──────────────┐
│ JD-Worker │──────────────▶│ Browser-Worker│
│ (LLM) │ │ (Playwright) │
└──────────┘ └──────┬───────┘
│ candidate data
▼
┌──────────────┐ decisions ┌──────────────┐
│ Resume-Worker │───────────▶│ Orchestrator │
│ (LLM) │ │ │
└──────────────┘ └──────┬───────┘
│ replan signal
▼
┌──────────┐
│ JD-Worker│
│ (widen/ │
│ tighten) │
└──────────┘
| Worker | Role |
|---|---|
| -------- | ------ |
| JD-Worker | Reads JD → generates 5-group keyword search plan via LLM. Supports initial, widen, tighten modes. |
| Browser-Worker | Logs into Liepin, executes searches, collects candidate previews, harvests detail pages, clicks "立即沟通". Uses a single shared session per run — no repeated login/page navigation. |
| Resume-Worker | Evaluates candidates via LLM. Preview → open_detail or skip. Detail → link or skip. Promotes link directly to pending_communication. |
| Orchestrator | Coordinates workers. Decides when to request widen (pool drained, target unmet) or tighten (results > 200, abandon current work immediately). |
pending_preview_eval → completed(skip) / completed(open_detail)
↓
pending_detail_harvest → detail_harvested → completed(skip) / pending_communication
↓
completed(link)
tighten — abandons pending work, requests narrower planwiden if target not reachedWhat it is: Liepin displays a full-screen wizard modal (step 1/3) called "AI 帮搜" on first load of the search page. It renders as
共 1 个版本