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 →Starting point

SAP-samples/cap-agentic-engineered

A Financial Risk Analyzer built to show what changes when a coding agent is grounded by SAP's MCP servers rather than left to its training data — and it ships the AGENTS.md and skills that did the grounding.

The claim that agents write better SAP code when pointed at live documentation is usually asserted. This is the argument made as an application: a CAP service classifying general-ledger transactions as normal or anomalous over twenty-four engineered features, with an OData V4 service, a Fiori Elements UI and SAP AI Core behind it. What travels beyond the demo is the grounding itself — a reusable AGENTS.md carrying MCP routing rules, and a skills/ folder that triggers on file patterns, routing the agent to the CAP server for models and services, the Fiori server for annotations and the UI5 server for controllers.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Agent guidanceCAPAgent guidancecapabilityPackaged knowledge you hand a coding agent so it gets a framework right unprompted — skills, rule files, instruction packs. Distinct from agent tooling, which is about building agentic features into your application, and from [agent access to your code](capability:agent-code-access), where the agent reads the real project instead of being handed a file about it.Reference appsCAPReference appscapabilityA whole application to read rather than a snippet to copy — somewhere to see how the pieces sit together once there are more than three of them.LLM integrationCAPLLM integrationcapabilityCalling a language model from application code with the tenant, destination and credential handling already solved instead using an SDK call with a hand-rolled key.
Flavors

Who is behind it

SAP SamplesSAP SamplesOrganisationMaintains this
In the atlas: maintains 222
@SAP-samples
maintainerGuilherme SegantiniPersonContributes to this
In the atlas: contributes to 2, wrote 1
@guilherme-segantini
1 contributor

What it declares

Every artifact

Type
Sample
Origin
By SAP

As a sample

Form
A reference application

Connections3

SAP-samples/cap-agentic-engineered connectionsSAP-samples/cap-agentic-engineeredPROVIDES→ demonstrates3demonstrates authoredAgent guidancedemonstrates authoredLLM integrationdemonstrates authoredReference apps

README

quoted from SAP-samples/cap-agentic-engineered under Apache-2.0, read
SAP-samples/cap-agentic-engineered/README.mdOn GitHub

MCP-Grounded SAP Development -- CAP + Fiori Elements Reference Application

REUSE status

A reference application showing how AI coding agents produce higher-quality SAP applications when grounded by SAP MCP servers. The app was built entirely by Claude Code following specs generated by GSD, a spec-driven development tool. The AGENTS.md and skills/ provided the SAP-specific guardrails, routing the agent to the right MCP server (CAP, Fiori, UI5) for each task.

What you get:

  • A working Financial Risk Analyzer as concrete evidence of the methodology
  • A reusable AGENTS.md and skills that tell AI coding agents which MCP server to query for each SAP artifact — portable across Claude Code, Cursor, Copilot, and other MCP-capable tools
  • The spec/ folder with the specs that drove the build — project roadmap, phased requirements, success criteria, and execution logs
  • Test suite covering service behavior, annotations, i18n, and manifest correctness

The Application

The Financial Risk Analyzer classifies General Ledger transactions as normal or anomalous using 24 engineered financial features. It exposes an OData V4 service with a Fiori Elements List Report and an unbound action that triggers batch ML inference via SAP AI Core.

Key capabilities:

  • CDS data model with 24 feature columns for ML risk scoring
  • Unbound OData action (analyzeRisks) for batch inference across all transactions
  • Fiori Elements List Report with custom toolbar action and criticality-based highlighting
  • SAP AI Core integration for XGBoost model predictions, with a built-in mock predictor for local development
  • Role-based access control (RiskAnalyst role for analysis actions)

Prerequisites

  • Node.js >= 18
  • SAP CAP (@sap/cds-dk) installed globally: npm i -g @sap/cds-dk
  • (Optional) SAP AI Core instance for live ML predictions -- the app runs fully locally with the mock predictor

Setup and Run

npm ci
cds watch

Open http://localhost:4004/risk/webapp/index.html in your browser.

Log in with user test-analyst / password pass (mocked authentication in development profile).

Environment Variables (Optional)

To connect to SAP AI Core for live predictions instead of the mock predictor, copy .env.example to .env and fill in your BTP service key credentials:

cp .env.example .env
# Edit .env with your SAP AI Core credentials

Set AI_CORE_MOCK=true (the default) to use the built-in mock predictor without any external services.

Running Tests

npm test

The test suite includes:

TestWhat it verifies
test/integration/risk-service.test.jsOData service behavior, CRUD, action execution
test/integration/annotations.test.jsCDS annotation correctness
test/unit/feature-extractor.test.jsFeature engineering logic
test/unit/ai-core-client.test.jsAI Core client with mocked responses
test/unit/i18n.test.jsAll i18n keys used in code exist in properties file
test/unit/manifest.test.jsManifest.json structure and route configuration
test/unit/risk-labels.test.jsRisk classification label mappings
test/feature-columns.test.jsFeature column definitions and ML contract

Repository Structure

cap-agentic-engineered/
+-- AGENTS.md                  # MCP routing rules and SAP development patterns (reusable)
+-- db/
|   +-- schema.cds             # GLTransactions entity with 24 ML feature columns
|   +-- data/                  # Sample GL transaction data (CSV)
+-- srv/
|   +-- risk-service.cds       # OData V4 service definition with unbound action
|   +-- risk-service.js        # Service handler with AI Core integration
|   +-- lib/
|       +-- ai-core-client.js  # SAP AI Core inference client
|       +-- mock-predictor.js  # Local mock predictor (no AI Core needed)
|       +-- feature-extractor.js  # 24-feature engineering pipeline
|       +-- feature-columns.js # ML contract: CDS field <-> model feature mapping
|       +-- risk-labels.js     # Risk classification labels and criticality
+-- app/
|   +-- services.cds           # Service binding for Fiori app
|   +-- risks/
|       +-- annotations.cds    # UI annotations (LineItem, SelectionFields, etc.)
|       +-- webapp/
|           +-- manifest.json  # Fiori Elements List Report configuration
|           +-- ext/controller/ListReportExt.controller.js  # Custom action handler
+-- test/                      # Unit and integration tests
+-- spec/                     # GSD specs: roadmap, phased requirements, execution logs
+-- skills/                    # SAP MCP skills (auto-trigger on file patterns)

Reusing the AGENTS.md and Skills

The AGENTS.md defines which MCP server to query for each type of SAP artifact — CDS models, Fiori annotations, UI5 controllers — so the generated code is grounded in live API documentation rather than stale training data. The skills in skills/ enforce those rules automatically: when the agent touches a file matching a skill's path pattern (e.g., srv/**/*.cds), the skill fires and instructs it to query the correct MCP server before writing code.

Copy AGENTS.md and skills/ into your own CAP + Fiori Elements project, configure the MCP servers in .claude/settings.json (instructions inside the file), and your AI coding agent will automatically query the right server for each task.

Scope

This application is designed for local development only. It demonstrates the MCP-grounded methodology and the resulting application quality — not a production ready app. For a comprehensive CAP reference covering BTP deployment, HANA, XSUAA, draft editing, compositions, and multi-app frontends, see SAP-samples/cap-sflight.

How to Obtain Support

This repository is provided as-is. For questions about SAP CAP, Fiori Elements, or AI Core, use the SAP Community.

For questions about Claude Code or MCP, see the Claude Code documentation.

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 and cap-agentic-engineered contributors. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Apache-2.0, read

Details

Sources3
sap-ai-mcp-serversdiscovered herechecked
github.com/SAP-samples/cap-agentic-engineeredtree, 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 viasap-ai-mcp-servers
first seen in the atlas
ecosystem and domaincap, ai-and-agents
Flavors1
Node.js
“- [Node.js](https://nodejs.org/) >= 18” — SAP-samples/cap-agentic-engineered — READMEchecked
Contributors1

From the repository’s contributor list, .

History in the atlas2
  1. Entered from the sap-ai-mcp-servers catalogue, which is credited as the source; written from the repository's own README rather than from the catalogue's line about it. Hard rule 7: skills are indexed, never authored here. The catalogue files it under skills; its own README calls it a reference application showing what grounding does, so it is typed sample and demonstrates rather than provides. VISION §5: evidence is never an option you depend on.
  2. First seen.
For your agent
Ref
artifact:sap-samples-cap-agentic-engineered
JSON
/artifacts/sap-samples-cap-agentic-engineered.json
MCP
Connecting an agent