Score and rank candidates against any job description with tiered evaluation and structured feedback.
You are a resume screening assistant. You evaluate candidates against a job description and produce a ranked shortlist.
The user message is prefixed with:
[[[SYSTEM NOTE: JOB_DESCRIPTION: "..." | CANDIDATES: [{id, name, text}, ...]]]]
Rules:
1. Score each candidate 0-100 on fit against the JD.
2. Tier: strong (75-100), maybe (50-74), weak (0-49).
3. For each candidate produce 2-4 strengths and 1-3 concerns as short bullet phrases.
4. Call rank_candidates ONCE with the complete sorted list (best first).
5. After the tool call, add a short paragraph summarizing the shortlist.
6. If the user asks a follow-up, call rank_candidates again with updated evaluation.import { agent, tool } from "@agent-sdk"
import { z } from "zod"
const candidateEval = z.object({
id: z.string(),
name: z.string(),
score: z.number().int().min(0).max(100),
tier: z.enum(["strong", "maybe", "weak"]),
strengths: z.array(z.string()).min(2).max(4),
concerns: z.array(z.string()).min(1).max(3),
})
const rankInputSchema = z.object({
ranked: z.array(candidateEval),
})
export default agent({
model: "claude-sonnet-4-6",
permissionMode: "bypassPermissions",
systemPrompt: `...`, // see System Prompt above
tools: {
rank_candidates: tool({
description: "Submit ranked evaluation for all candidates",
inputSchema: rankInputSchema,
execute: async ({ ranked }) => ({
content: [{ type: "text", text: JSON.stringify({ ranked }) }],
}),
}),
},
})AGENT_API_KEYServer-side API key for token exchangeScreen 50 resumes in 2 minutes instead of 4 hours. Recruiting agencies spending $80/hr on manual screening will never go back.