SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Reference

SAP-samples/smartrecruiters-ai-recruiting-custom-agent

A recruiting agent on SAP AI Core that reads SmartRecruiters pipeline data to flag stalled candidates, score disengagement risk and forecast hiring timelines from fixed funnel rates.

Built on SAP AI Core, the agent compares how long candidates sit in each SmartRecruiters pipeline stage against a benchmark for that stage, scores each candidate's disengagement risk from inactivity, seniority and stage, and forecasts time-to-fill from the fixed funnel rates the code carries: 85% of offers become hires, 50% of interviews become offers, 40% of reviews become interviews. A ReAct loop built with LangChain and LangGraph calls deterministic Python functions for the analysis itself and uses the model only to read the question and phrase the answer; daily digests and alerts are pushed to a Microsoft Teams channel through an incoming webhook instead of waiting for a recruiter to open a dashboard. It also ships a multi-currency compensation-analytics module and a toolkit for assessing a migration from SAP SuccessFactors Recruiting, and it runs on mock data with no credentials, falling back to keyword-based routing and template responses when SAP AI Core is unavailable.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Agent toolingBTPAgent toolingcapabilityBuilding an agent into your own application — the tools it may call, the state it keeps between turns, and the framework it runs in. Distinct from MCP servers, which expose an application to somebody else's agent, and from agent guidance, which is knowledge handed to a coding agent.
Optional
SAP AI CoreSAP AI Coreartifactthe model that reads the question and words the answer; the README offers a fallback mode and mock data for running without it.

Who is behind it

SAP SamplesSAP SamplesOrganisationMaintains this
In the atlas: maintains 222
@SAP-samples
maintainerGuilherme DellagustinPersonContributes to this
In the atlas: contributes to 27
@dellagustin-sap
Sid BhattacharyaPersonContributes to this
In the atlas: contributes to 1
@sidbhat
2 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP
Use as
A reference

As a sample

Form
does not say

Connections4

SAP-samples/smartrecruiters-ai-recruiting-custom-agent connectionsSAP-samples/smartrecruiters-ai-recruiting-custom-agentPROVIDES→ demonstrates1demonstrates authoredAgent toolingNEEDS→ connects to2connects to stated If: the LLM synthesis step, when SAP AI Core is reachable the question and the analysis results the agent sends to the model, and the wording it gets back. SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, The ReAct pattern: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agent SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, APIs vs LLMs: Who does what?: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agentSAP AI Coreifconnects to stated If: the SuccessFactors migration toolkit the SuccessFactors Recruiting data the toolkit audits, maps to the SmartRecruiters schema and exports. SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, SuccessFactors Migration Toolkit: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agent SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, SuccessFactors Migration Toolkit: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agentSAP SuccessFactorsif→ optionally needs1optionally needs stated If: the agent's conversational answers; without SAP AI Core it falls back to keyword-based intent detection and template responses the model that reads the question and words the answer; the README offers a fallback mode and mock data for running without it. SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, Quick Start: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agent SAP-samples/smartrecruiters-ai-recruiting-custom-agent — README, Fallback mode: https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agentSAP AI Coreif

README

quoted from SAP-samples/smartrecruiters-ai-recruiting-custom-agent under Apache-2.0, read
SAP-samples/smartrecruiters-ai-recruiting-custom-agent/README.mdOn GitHub

REUSE status

Building an AI Recruiting Agent with SAP AI Core

License Tests Python Version FastAPI SAP AI Core LangChain Code Style Contributions Welcome

Extending SmartRecruiters with predictive intelligence — helping recruiters act before candidates disengage.


SmartRecruiters AI Agent Demo


The spark

Every recruiter knows this moment: a hiring manager asks "when will we fill this role?" and it's hard to give a confident answer. You've got 50 candidates in the pipeline, but half of them have been sitting in "Interview" for three weeks. Are they still interested? Did someone forget to schedule the next round?

Or this one: your top candidate — the one with 10 years of experience who crushed the technical interview — just declined your offer. Turns out they had three other offers and the process took too long.

We kept hearing these stories. And we thought: what if an AI agent could catch these issues early and help recruiters take action?

SmartRecruiters already provides powerful tools for sourcing, tracking, and hiring candidates. But now you can add a predictive layer — an agent that proactively surfaces issues before they become problems.


🎯 What We Built

The SmartRecruiters AI Recruiting Agent does three things:

1. Spots bottlenecks. It compares how long candidates sit in each stage against benchmarks. When someone's been in "Interview" for 18 days (benchmark is 7), the agent flags it, identifies likely causes, and suggests next steps.

🚨 CRITICAL: Senior Software Engineer - Interview Stage
   6 candidates stuck avg 18 days (benchmark: 7)
   Root cause: Geographic scheduling delays
   → Schedule batch video interviews this week

2. Predicts disengagement risk. A senior engineer sitting in your pipeline for two weeks likely has other opportunities. The agent scores each candidate's risk based on inactivity, seniority, and stage — then tells you who to prioritize today.

3. Forecasts timelines. Using conversion rates (50% of interviews become offers, 85% of offers get accepted), it predicts when you'll actually fill each role. Data-driven answers instead of estimates.

4. Analyzes compensation competitiveness. Multi-currency salary analysis across 9 currencies (USD, INR, EUR, GBP, AUD, CHF, CAD, HKD, CLP) with interactive dashboards showing compa ratios, regional comparisons, and market competitiveness — all with country flags and beautiful charts.

AI Recruiting Agent Web Interface
Ask questions in plain English, get actionable answers

Features at a Glance
FeatureStatusDemo
📊 Bottleneck Detection✅ ReadyView UI
⚠️ Risk Prediction✅ ReadyView UI
📈 Timeline Forecasting✅ ReadyView UI
💰 Compensation Dashboard✅ ReadyTry It
💬 Teams Integration✅ ReadyView Card
🔄 SF Migration Toolkit✅ ReadyRead Docs
🤖 LLM Fallback Mode✅ ReadyWorks without AI Core
📊 Mock Data Demo✅ ReadyZero credentials required

Extending SmartRecruiters

SmartRecruiters is a leading talent acquisition platform providing:

  • Attract — Career sites, sourcing, CRM, job distribution
  • Select — ATS, AI matching, screening, scheduling
  • Hire — Analytics, offer management, onboarding

This agent adds a predictive intelligence layer on top of SmartRecruiters data:

SmartRecruiters providesThis agent adds
Candidate trackingBottleneck detection with root causes
Pipeline visibilityDisengagement risk prediction
Hiring analyticsTimeline forecasting with confidence
Dashboard reportingProactive Teams alerts

Think of it as an early warning system built on your existing SmartRecruiters data.


💡 Why an Agent, Not a Dashboard?

Dashboards are great for exploration, but recruiters are busy — back-to-back calls, juggling multiple open roles, responding to messages. They need insights that come to them at the right moment.

So we built an agent that:

  • Pushes alerts to Teams when something needs attention
  • Answers questions in plain language ("who's at risk?")
  • Explains why — not just "6 candidates stuck" but "scheduling delays in APAC region"
  • Suggests actions — not just problems, but what to do about them
Three Personas, Three Experiences

This agent is designed for three distinct users:

👔 Hiring Managers — Need to know if roles will be filled on time

  • Get proactive alerts about bottlenecks and at-risk candidates
  • See timeline forecasts with confidence levels
  • Daily digest at 8 AM with 3-5 critical issues

👥 Recruiters — Need to coordinate and prioritize

  • Daily action list (9 AM): "Call John Doe - offer at risk"
  • Validate offer competitiveness before sending
  • Track actions with status (pending → in_progress → completed)

🌟 Candidates — Need to know what's happening

  • Magic link login (no password needed)
  • Application timeline with progress tracker
  • Stage-specific FAQ ("What is the interview stage?")


💰 Compensation Intelligence

The agent includes a comprehensive compensation analytics module that helps you ensure offers are competitive:

🌍 Multi-Currency Overview
🇺🇸 USD: 14 candidates (avg $118K) ↔ $118K USD
🇮🇳 INR: 4 candidates (avg ₹22.9L) ↔ $27K USD  
🇦🇺 AUD: 2 candidates (avg A$131K) ↔ $85K USD
🇨🇭 CHF: 2 candidates (avg CHF 77.5K) ↔ $88K USD
5 Standard Reports
ReportWhat It Shows
🌍 Multi-Currency OverviewAll offers grouped by currency with country flags and USD equivalents
📊 Offer CompetitivenessWhich offers are below/at/above market with compa ratios
🗺️ Regional ComparisonCompare salaries across regions (USD-normalized)
💰 Top 10 OffersHighest-paid candidates across all currencies
🔍 Data QualityCoverage stats, data sources, outlier detection

Features:

  • Extracts salary from SmartRecruiters AnnualSalary property or job compensation ranges
  • Calculates compa ratios (offered salary / market midpoint)
  • Normalizes to USD for cross-currency comparison
  • Interactive Chart.js visualizations
  • Color-coded badges (🔴 below market, 🟢 at market, 🔵 above market)
  • REST API for programmatic access

Quick Start:

# Open dashboard
http://localhost:8080/compensation

# Or query via API
curl http://localhost:8080/api/compensation/reports/multi_currency_overview

See COMPENSATION_DASHBOARD_GUIDE.md for full documentation.


🏗️ The Tech Stack

ComponentTechnologyRole
LLMSAP AI Core (gpt-4o-mini)Natural language understanding and response generation
Agent PatternReAct (Reasoning + Acting)Structured decision-making loop
FrameworkLangChain + LangGraphTool orchestration and agent workflow
Data SourceSmartRecruiters APIReal-time candidate and job data
BackendFastAPIAsync REST API serving the UI and Teams
NotificationsMicrosoft Teams Adaptive CardsProactive alerts via webhooks

The core agent is about 8,300 lines of Python. No complex infrastructure, no Kubernetes, no microservices.

Architecture Diagram
Frontend API Layer Agent Core Business Logic External Services Web UI Compensation Dashboard Microsoft Teams FastAPI Server Health Checks Background Jobs LangGraph ReAct Agent Fallback Mode LangChain Tools Analysis Functions Bottleneck Detection Risk Prediction Timeline Forecasting Compensation Analytics SAP AI Core SmartRecruiters API SuccessFactors API
APIs vs LLMs: Who does what?

This is important: the LLM doesn't do the analysis. Here's how we split responsibilities:

TaskHandled byWhy
Fetch candidates and jobsSmartRecruiters APISource of truth for recruiting data
Calculate bottleneck severityPython codeDeterministic, testable, fast
Score candidate riskPython codeConsistent scoring rules
Forecast hiring timelinesPython codeMath-based conversion modeling
Understand user questionsSAP AI Core LLMNatural language is messy
Generate human-readable responsesSAP AI Core LLMMakes data conversational
Send alerts to TeamsTeams Webhook APIDirect HTTP POST

The LLM is the "voice" of the agent — it interprets what you're asking and explains results in plain language. But the actual analysis happens in deterministic Python functions. This keeps results consistent and explainable.

The ReAct pattern

ReAct stands for Reasoning + Acting. It's a loop where the agent:

  1. Thinks — "The user asked about bottlenecks. I should call the bottleneck analysis tool."
  2. Acts — Calls the analyze_bottlenecks() function
  3. Observes — Gets back structured data (jobs, stages, days stuck, severity)
  4. Thinks again — "I have the data. Now I should explain this clearly."
  5. Responds — Uses the LLM to generate a natural language summary
User: "Show me bottlenecks"
         ↓
    ┌─────────────────┐
    │  THINK          │  → "User wants bottleneck analysis"
    └────────┬────────┘
             ↓
    ┌─────────────────┐
    │  ACT            │  → Call analyze_bottlenecks()
    └────────┬────────┘
             ↓
    ┌─────────────────┐
    │  OBSERVE        │  → Get structured results from API + analysis
    └────────┬────────┘
             ↓
    ┌─────────────────┐
    │  RESPOND        │  → LLM synthesizes into readable answer
    └─────────────────┘

Why ReAct instead of just prompting the LLM with all the data? Control. We decide which tools to call and when. The LLM handles language, not logic.

How the agent processes a request

When you ask "who's at risk?", here's the full flow:

1. USER INPUT
   "Who's at risk of dropping out?"
              ↓
2. INTENT DETECTION
   Keywords: "risk", "dropping" → Route to risk analysis
              ↓
3. API CALL (SmartRecruiters)
   GET /candidates → Returns 100 candidates with status, stage, timestamps
              ↓
4. ANALYSIS (Python)
   For each candidate:
   - Days inactive? → +20 or +40 points
   - Senior in early stage? → +25 points
   - Offer pending too long? → +30 points
   → Returns ranked list with scores
              ↓
5. LLM SYNTHESIS (SAP AI Core)
   Prompt: "Summarize these at-risk candidates for a recruiter..."
   → Returns conversational response
              ↓
6. RESPONSE TO USER
   "You have 3 candidates who need immediate attention..."
Fallback mode

If SAP AI Core is temporarily unavailable, the agent doesn't break. It falls back to:

  1. Keyword-based intent detection — still routes to the right analysis
  2. Template responses — pre-formatted summaries of the data
  3. Full functionality — all the analysis still works, just less conversational

This means the agent is always useful, even without LLM access.


The analysis under the hood

Bottleneck detection

We set benchmarks for each stage:

  • In Review: 5 days
  • Interview: 7 days
  • Offer: 5 days

If the average time exceeds 1.5x the benchmark, it's moderate. Over 2.5x? Critical.

The agent also identifies likely causes. Interview delays in a job with candidates across multiple countries? Probably scheduling across time zones. Long review times? The hiring manager may need a nudge.

Risk scoring

We add up points:

  • Inactive over 14 days: +40
  • Inactive over 7 days: +20
  • Senior candidate (5+ years) in early stage: +25
  • Offer pending: +30
  • Offer pending over 5 days: +15
  • In Interview over 10 days: +20

Scores over 50 mean "reach out this week." Over 80? Prioritize them today.

Timeline forecasting

Simple funnel math:

  • 85% of offers become hires
  • 50% of interviews become offers
  • 40% of reviews become interviews

Multiply through your current pipeline and you get predicted hires. Compare against openings to see if you're on track.


💬 Pushing to Teams

The best feature might be the Teams integration. Instead of recruiters checking the agent, the agent checks on them.

Teams Adaptive Cards
Daily digest lands in your Teams channel every morning

We built four card types:

  • Daily digest — summary of everything, with an AI-written executive summary
  • Bottleneck alerts — only fires when there's something critical
  • Risk alerts — only when candidates need immediate attention
  • Forecast updates — weekly "here's where we stand"

Set up an Incoming Webhook in Teams, add the URL to your config, run python scheduler.py digest, and you're done.


Connecting to SmartRecruiters

SmartRecruiters
Pulling candidate data via the SmartRecruiters API

The SmartRecruiters API uses OAuth2 client credentials:

# Step 1: Exchange client credentials for access token
token_response = requests.post(
    'https://api.smartrecruiters.com/identity/oauth/token',
    data={'grant_type': 'client_credentials'},
    auth=(client_id, client_secret)
)
token = token_response.json()['access_token']

# Step 2: Use token to fetch data
response = requests.get(
    'https://api.smartrecruiters.com/candidates',
    headers={'Authorization': f'Bearer {token}'},
    params={'limit': 100}
)

We cache tokens and refresh them before expiry. The agent also works with mock data for demos and development — set USE_MOCK_DATA=true and you're ready to go.


What we learned

1. Resilience matters. Building a keyword-based fallback means the agent stays useful even during connectivity issues. Always have a backup plan.

2. "Why" is more important than "what." Telling a recruiter "6 candidates are stuck" isn't helpful. Telling them "6 candidates are stuck because interviews can't be scheduled across time zones — try batch video calls" is actionable.

3. Meet people where they are. The Teams integration drove significantly more engagement than the web UI. Bring insights to where people already work.

4. Mock data is a feature. Not just for development — it's great for demos, onboarding, and showing stakeholders what the tool does without exposing real candidate data.


🔄 SuccessFactors Migration Toolkit

For organizations migrating from SAP SuccessFactors Recruiting to SmartRecruiters, this project includes a comprehensive migration assessment toolkit:

  • Data Quality Audit — Validates completeness, validity, and integrity of SF data
  • Field Mapping — Normalizes SF statuses and entities to SmartRecruiters schema
  • Migration Readiness Score — Calculates overall readiness (0-100) with recommendations
  • Dry Run Simulation — Test transformation logic without committing changes
  • Bulk Export — Generate CSV files for SmartRecruiters bulk import
  • Multi-format Reports — JSON, HTML, Teams cards, and SAP UI5 dashboards

See SF_INTEGRATION_README.md for complete documentation.


⚡ Quick Start

Everything's open source:

GitHub: github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agent

git clone https://github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agent.git
cd smartrecruiters-ai-recruiting-custom-agent
pip install -r requirements.txt
python app.py

Works out of the box with mock data. Add your SAP AI Core and SmartRecruiters credentials for the full experience.


📚 Documentation

Core Documentation
API Documentation by Persona

See the full API Reference for all endpoints, covering hiring manager intelligence, recruiter workflows, and candidate-facing APIs.

Additional Resources

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • Code standards and style guide
  • Pull request process
  • Development setup
  • Testing requirements

License

Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.


This project started as an experiment in agentic AI for HR tech — and showed us that recruiters really value an assistant that helps them stay ahead of candidate engagement.


Apache-2.0, read

History

Latest

v1.1.0

Features 6, Changed 4

Notes
Added
  • 💰 Compensation Intelligence Dashboard - Multi-currency salary analysis module
    • 5 standard reports: Multi-Currency Overview, Competitiveness, Regional Comparison, Top Offers, Data Quality
    • Support for 9 currencies: USD, INR, EUR, GBP, AUD, CHF, CAD, HKD, CLP
    • Country flags and interactive Chart.js visualizations
    • Compa ratio calculation with market competitiveness flagging
    • REST API endpoints for programmatic access
    • Extracts salary from SmartRecruiters AnnualSalary custom property
    • USD normalization for cross-currency comparison
  • Created sr_compensation_data.py - Real SmartRecruiters salary data extraction
  • Created compensation_reports.py - Standard report definitions
  • Created compensation-dashboard.html - Interactive UI
  • Added COMPENSATION_DASHBOARD_GUIDE.md user documentation
  • GitHub issue and PR templates for better community contributions
Changed
  • Refactored compensation_analytics.py from INR-only to multi-currency aware
  • Updated tools.py - Compensation tools now use real SmartRecruiters data
  • Updated agent.py - Added compensation query detection in fallback mode
  • Enhanced README with compensation section and Mermaid architecture diagram
  1. v1.0.0

    Security 5, Features 18

    Notes
    Added
    • Initial release of SmartRecruiters AI Recruiting Agent
    • Pipeline bottleneck detection with root cause analysis
    • Candidate dropout risk prediction with scoring (0-100 scale)
    • Hiring timeline forecasting with conversion rates
    • SuccessFactors migration toolkit with data audit and bulk export
    • Microsoft Teams integration with adaptive cards
    • SAP AI Core LLM integration via generative-ai-hub-sdk
    • Mock data support for zero-credential demos
    • FastAPI REST API with OpenAPI documentation
    • Background scheduler for automated Teams alerts
    • ReAct agent pattern with LangGraph
    • Fallback mode with keyword matching (works without LLM)
    • OAuth2 integration with SmartRecruiters API
    • Cloud Foundry deployment support (manifest.yml, runtime.txt)
    • Token caching and cost tracking
    • Rate limiting (30 requests/minute)
    • Input validation and prompt injection detection
    • Comprehensive documentation:
    Security
    • Apache 2.0 license with REUSE compliance
    • Environment variable validation
    • CORS middleware configuration
    • Rate limiting to prevent abuse
    • Input sanitization for chat messages

Details

Sources3
Added by handdiscovered herechecked
github.com/SAP-samples/smartrecruiters-ai-recruiting-custom-agenttree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainbtp, ai-and-agents
Contributors2

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sap-samples-smartrecruiters-ai-recruiting-custom-agent
JSON
/artifacts/sap-samples-smartrecruiters-ai-recruiting-custom-agent.json
MCP
Connecting an agent