| name | boss-agent-cli-job-search |
| description | CLI tool for AI agents to search BOSS Zhipin jobs with welfare filtering, local shortlisting, and compliance-first automation |
| triggers | ["search for jobs on BOSS Zhipin","find jobs with specific benefits like weekends off","help me search for Python jobs in Shanghai","add jobs to my shortlist and compare them","analyze job descriptions and optimize my resume","show me my job search statistics","configure BOSS agent CLI for job hunting","check if I'm logged into BOSS Zhipin"] |
boss-agent-cli Job Search Skill
Skill by ara.so — Devtools Skills collection.
What It Does
boss-agent-cli is a Python CLI tool designed for AI agents to assist with job searching on BOSS Zhipin (and other platforms like Zhilian). It operates in low-risk compliance mode by default, focusing on read-only operations, local organization, and user-initiated actions. Key features include:
- Job Search: Keyword search with 8-dimension filtering (city, salary, experience, etc.)
- Welfare Filtering: Auto-pagination to find jobs with specific benefits (e.g., "weekends off, five insurances")
- Local Shortlist: Save jobs locally with tags, notes, and comparison tools
- AI Enhancements: JD analysis, resume polishing, interview prep, communication coaching
- Schema-Driven: All commands output JSON envelopes (
{ok, data, error, hints}) to stdout
- Multi-Platform: Supports BOSS Zhipin (default), Zhilian (read-only), 51job (placeholder)
Compliance boundaries: Sensitive operations (greeting, applying, exchanging contacts, recruiter candidate search) are blocked by default and return COMPLIANCE_BLOCKED. Users must complete these actions manually on the official platform.
Installation
uv tool install boss-agent-cli
patchright install chromium
pip install boss-agent-cli
Requires Python ≥ 3.10. All state stored in ~/.boss-agent/.
Authentication & Setup
boss doctor
boss login
boss status
boss status --live
Login credentials are encrypted locally with Fernet + PBKDF2 machine binding. No data leaves the machine except explicit API calls.
Core Commands
Job Discovery
boss search "Golang" --city 广州
boss search "Python" --city 上海 --welfare "双休,五险一金"
boss search "前端" \
--city 北京 \
--salary 20-40 \
--experience 3-5 \
--degree 本科 \
--scale 100-499 \
--stage 已融资 \
--welfare "双休,五险一金,年终奖" \
--limit 50
boss show 3
boss detail <security_id>
boss history
Welfare filtering uses --welfare "benefit1,benefit2" with AND logic. The tool auto-paginates to fetch all matches and can sort by local match score with --sort score.
Local Shortlist & Organization
boss shortlist add <security_id> <job_id> --tags 后端,远程 --notes "Interesting tech stack"
boss shortlist list
boss shortlist compare --tag 远程
boss shortlist remove <shortlist_id>
boss stats
boss watch add <security_id> <job_id>
boss preset save "golang-remote" --query "Golang" --city 广州 --welfare "远程,双休"
boss preset run "golang-remote"
AI-Powered Features
boss ai config --provider openai --api-key-env OPENAI_API_KEY --model gpt-4o
boss ai config --provider atlas --api-key-env ATLAS_API_KEY --model deepseek-ai/deepseek-v4-pro
boss ai analyze-jd <security_id>
boss ai polish ~/resume.txt
boss ai optimize ~/resume.txt <security_id>
boss ai fit ~/resume.txt
boss ai interview-prep <security_id> ~/resume.txt
boss ai chat-coach <security_id> "想问一下团队规模"
Resume Management
boss resume set ~/my-resume.pdf
boss resume show
boss me
Recruiter Mode (BOSS Zhipin Only)
boss hr jobs list
boss hr jobs online <job_id>
boss hr jobs offline <job_id>
Note: Candidate data pipelines (search, resume, chat) are blocked by default in recruiter mode.
System & Configuration
boss schema
boss schema --format openai-tools
boss schema --format anthropic-tools
boss platforms
boss export
boss config list
boss config set default_city 广州
boss config set default_salary_range "15-30"
boss config reset
boss clean
Python SDK Usage
from boss_agent_cli import AuthManager, BossClient, AuthRequired
from boss_agent_cli.platforms.platform import Platform
auth_mgr = AuthManager()
if auth_mgr.is_authenticated():
with BossClient(auth_mgr) as client:
result = client.search_jobs(
query="Golang",
city="广州",
welfare_filter=["双休", "五险一金"],
limit=20
)
if result["ok"]:
for job in result["data"]["jobs"]:
print(f"{job['job_name']} at {job['brand_name']}")
print(f" Salary: {job['salary']}")
print(f" Welfare: {', '.join(job.get('welfare', []))}")
else:
print("Please run: boss login")
with BossClient(auth_mgr) as client:
detail = client.get_job_detail("abc123xyz")
if detail["ok"]:
jd = detail["data"]
print(f"Description: {jd['description']}")
print(f"Requirements: {jd['experience']}, {jd['degree']}")
platform = Platform.get_platform("zhipin")
print(f"Using platform: {platform.name}")
Working with JSON Envelopes
All commands output structured JSON to stdout with this schema:
{
"ok": bool,
"data": dict | None,
"pagination": dict | None,
"error": {
"code": str,
"message": str,
"recoverable": bool,
"recovery_action": str | None
} | None,
"hints": list[str] | None
}
Parsing in Python:
import json
import subprocess
def run_boss_command(args: list[str]) -> dict:
"""Run boss command and parse JSON output."""
result = subprocess.run(
["boss"] + args,
capture_output=True,
text=True,
check=False
)
if result.returncode != 0:
error_data = json.loads(result.stdout)
if error_data.get("error", {}).get("code") == "AUTH_EXPIRED":
subprocess.run(["boss", "login"], check=True)
return run_boss_command(args)
raise RuntimeError(error_data["error"]["message"])
return json.loads(result.stdout)
search_result = run_boss_command([
"search", "Python",
"--city", "上海",
"--welfare", "双休,五险一金",
"--limit", "30"
])
if search_result["ok"]:
jobs = search_result["data"]["jobs"]
print(f"Found {len(jobs)} jobs")
if jobs:
job = jobs[0]
shortlist_result = run_boss_command([
"shortlist", "add",
job["security_id"],
job["encrypt_job_id"],
"--tags", "python,remote"
])
Agent Integration Patterns
Pattern 1: MCP Server (Recommended for Claude Desktop / Cursor)
Add to claude_desktop_config.json or cursor/.cursorrules:
{
"mcpServers": {
"boss-agent": {
"command": "uvx",
"args": ["--from", "boss-agent-cli[mcp]", "boss-mcp"]
}
}
}
This exposes 35 low-risk tools to the MCP host. Install MCP extras: pip install boss-agent-cli[mcp]
Pattern 2: Subprocess Shell Agent
def get_boss_capabilities() -> dict:
"""Fetch self-describing schema."""
result = subprocess.run(
["boss", "schema", "--format", "openai-tools"],
capture_output=True,
text=True,
check=True
)
return json.loads(result.stdout)["data"]["tools"]
tools = get_boss_capabilities()
Pattern 3: Direct Python Import
from boss_agent_cli import BossClient, AuthManager
from boss_agent_cli.ai.service import AIService
class JobSearchAgent:
def __init__(self):
self.client = BossClient(AuthManager())
self.ai = AIService()
def find_and_analyze(self, query: str, city: str) -> dict:
"""Search jobs and analyze top result."""
search = self.client.search_jobs(query, city=city, limit=5)
if not search["ok"]:
return search
top_job = search["data"]["jobs"][0]
detail = self.client.get_job_detail(top_job["security_id"])
if detail["ok"]:
analysis = self.ai.analyze_jd(detail["data"])
return {"job": detail["data"], "analysis": analysis}
return detail
Configuration Reference
Config stored at ~/.boss-agent/config.json:
{
"default_city": "广州",
"default_salary_range": "15-30",
"default_experience": null,
"default_degree": null,
"request_interval": [2.0, 4.0],
"log_level": "INFO",
"login_timeout": 300,
"cdp_address": null,
"export_dir": "~/.boss-agent/exports",
"platform": "zhipin",
"ai": {
"provider": "openai",
"base_url": null,
"api_key_env": "OPENAI_API_KEY",
"model": "gpt-4o",
"temperature": 0.7,
"max_tokens": 2000
}
}
Update via boss config set <key> <value> or edit JSON directly.
Troubleshooting
Auth Issues
boss doctor --live-probe
boss status
boss logout
boss login
Platform Switching
boss --platform zhilian search "Python"
boss config set platform zhilian
Rate Limiting / Risk Control
- Tool uses Gaussian delay (2-4s default) between requests
- Stops on platform risk detection (doesn't evade)
- Never use for bulk operations (blocked by design)
Error Codes
AUTH_REQUIRED: Run boss login
AUTH_EXPIRED: Session expired, re-login
COMPLIANCE_BLOCKED: Operation not allowed in low-risk mode
PLATFORM_ERROR: Platform API issue, check boss doctor
NOT_SUPPORTED: Feature unavailable for this platform
Browser Bridge Issues
python -m boss_agent_cli.bridge.daemon --serve
boss doctor --live-probe
Bridge only used for login and local export, not for evading detection.
Common Workflows
Workflow 1: Daily Job Hunt
boss search "Python后端" --city 上海 --welfare "双休,五险一金" --sort score
boss detail <security_id>
boss shortlist add <security_id> <job_id> --tags "interesting"
boss shortlist list
boss stats
Workflow 2: Targeted Application Prep
boss search "DevOps" --city 北京 --experience 3-5
boss detail <security_id>
boss ai analyze-jd <security_id>
boss ai optimize ~/resume.pdf <security_id>
boss ai interview-prep <security_id> ~/resume.pdf
Workflow 3: Recruiter Job Management
boss hr jobs list
boss hr jobs online <job_id>
Environment Variables
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export ATLAS_API_KEY="..."
export BOSS_CDP_ADDRESS="http://localhost:9222"
export BOSS_CONFIG_DIR="~/.custom-boss-config"
Platform Support Matrix
| Platform | Seeker | Recruiter | Status |
|---|
BOSS Zhipin (zhipin) | ✅ Full | ✅ Jobs only | Default |
Zhilian (zhilian) | 🟡 Read-only | ❌ Not supported | Write/social blocked |
51job (qiancheng) | 🚧 Placeholder | ❌ Not supported | Returns NOT_SUPPORTED |
boss --platform zhilian search "Java"
boss platforms
Best Practices for AI Agents
- Always check schema first:
boss schema is the source of truth for capabilities
- Parse JSON envelopes: Check
ok field before processing data
- Handle errors gracefully: Use
recoverable and recovery_action for retry logic
- Respect compliance: Don't attempt to bypass
COMPLIANCE_BLOCKED errors
- Use local shortlist: Store and compare jobs locally, don't spam searches
- Leverage AI features: Use
ai commands for analysis, don't just dump JDs to user
- Configure once: Set defaults with
boss config to simplify subsequent calls
Further Reading