SAP-samples/btp-sourcing-decision-board
A procurement decision-support system that runs a cooperative and an adversarial AI agent strategy over a sourcing RFQ in parallel and cross-validates their recommendations on a live decision board.
The Sourcing Decision Board analyses a sourcing event by running a cooperative, iterative-refinement AI strategy and an adversarial, debate-style strategy in parallel, then compares the two before a procurement professional sees a recommendation. A Flask backend built on SAP AI CoreSAP AI CoreSAP's AI service on BTP: the runtime for AI assets, and through the Generative AI Hub inside it the access to foundation models, the orchestration service with its templating, masking, filtering and grounding modules, the Prompt Registry and Document Grounding.sap official, btp and SAP Generative AI Hub calls the agents, a React and SAPUI5 frontend shows a live decision board with streaming updates, and a SQLiteSQLiteAn embedded SQL database engine used as a selectable local cache store by CAP caching plugins. database keeps the full decision history. It needs an SAP BTP account with AI Core and Generative AI Hub access, runs locally from python server.py, and deploys to Cloud Foundry with cf push.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerSwenContributes to this
In the atlas: contributes to 1@swfuchs1 contributor
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
- Use as
- A reference
As a sample
- Form
- does not say
Connections
Building an agent into your own application
A cross-platform JavaScript runtime that servers, command line tools and scripts written in JavaScript are run with. For the things here, the prerequisite a repository names when its build is a set of npm scripts.
AI runtime on BTP with the Generative AI Hub
An embedded SQL database engine used as a selectable local cache store by CAP caching plugins.
Cloud Foundry runtime of SAP BTP for polyglot applications
Download
README
quoted from SAP-samples/btp-sourcing-decision-board under Apache-2.0, readSourcing Decision Board
Description
AI-Powered Strategic Sourcing Decision Support System
The Sourcing Decision Board is a procurement decision support system implementing parallel, heterogeneous agentic loop strategies for sourcing award optimization. Instead of relying on a single AI approach, it runs multiple independent AI strategies simultaneously and cross-validates their recommendations before presenting results to procurement professionals.
Key Features
- 🤖 Dual-Strategy AI Execution: Cooperative (Iterative Refinement) and Adversarial (Debate/Challenge) approaches
- ✅ Automated Cross-Validation: Compare results from different strategies for higher confidence
- 📊 Real-Time Decision Board: Live execution monitoring with streaming updates
- 💾 Complete Persistence: SQLite database with full decision history
- 🔍 Decision History: Browse, search, and filter previous RFQ decisions
- 🎯 Intelligent Dual-Sourcing: Automated optimization of supplier splits
- 📈 Strategy Comparison Dashboard: Side-by-side analysis of AI recommendations
- 🔐 Human-in-the-Loop: Structured governance framework for final decisions
Technology Stack
- Backend: Python 3.11+ / Flask
- Frontend: React + SAPUI5
- AI/ML: SAP AI Core + SAP Generative AI Hub
- Database: SQLite (with full audit trail)
- Deployment: SAP BTP Cloud Foundry ready
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/api/decision | POST | Create new decision |
/api/decision/<id> | GET | Get decision data |
/api/decisions | GET | List all decisions (paginated) |
/api/decision/<id>/execute | POST | Execute AI agents |
/api/decision/<id>/execute_dual | POST | Execute dual strategies |
/api/decision/<id>/progress | GET | Get execution progress |
/api/decision/<id>/stream | GET | Stream execution via SSE |
Requirements
- Python 3.11 or higher
- SAP BTP account with AI Core enabled
- SAP Generative AI Hub access
- Node.js 18+ (for React frontend build)
Download and Installation
Quick Start
# Clone repository
git clone https://github.com/SAP-samples/btp-sourcing-decision-board.git
cd btp-sourcing-decision-board
# Install Python dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your SAP AI Core credentials
# Build React frontend
cd react-app
npm install
npm run build
cd ..
# Run locally
python server.py
Visit http://localhost:5000 to access the application.
Environment Variables
# SAP AI Core Configuration
SAP_AI_CLIENT_ID=your-client-id
SAP_AI_CLIENT_SECRET=your-client-secret
SAP_AI_AUTH_URL=https://your-subdomain.authentication.eu10.hana.ondemand.com
SAP_AI_API_URL=https://api.ai.prod.eu-central-1.aws.ml.hana.ondemand.com
SAP_AI_DEPLOYMENT_ID=your-deployment-id
# Application Settings
ENABLE_AI_AGENTS=true
PORT=5000
DB_PATH=decisions.db
Usage
- Create a Decision — POST supplier/RFQ data to
/api/decision - Select Strategy — Choose Single or Dual (recommended) strategy execution
- Review Results — View AI recommendations in the Comparison Dashboard
- View History — Browse all previous decisions with search and filtering
Deployment to SAP BTP Cloud Foundry
# Login to Cloud Foundry
cf login
# Deploy application
cf push
See TESTING_GUIDE.md for detailed testing and deployment instructions.
Known Issues
No known issues.
How to obtain support
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
Contributing
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.
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.
Details
Sources
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
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-btp-sourcing-decision-board- JSON
- /artifacts/sap-samples-btp-sourcing-decision-board.json
- MCP
- Connecting an agent