LLM integration

Calling 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.

Showing artifacts, examples and content with confirmed Node.js applicability. View All CAP

Overview

SAP SHIPSby design

@cap-js/ai is the plugin: it embeds SAP AI Core as a standard CAP service with automatic service-binding resolution and tenant-aware resource groups and deployments, and detects @Common.ValueList and @cds.odata.valuelist fields to put SAP RPT-1 recommendations into draft-enabled Fiori UIs without a handler. The call itself is the SAP Cloud SDK for AI's JavaScript packages, @sap-ai-sdk/foundation-models and @sap-ai-sdk/orchestration, each of which streams a chat completion over server-sent events, and which model a CAP-level agent talks to is cds.requires.llm, whose aicore kind is the default for production and hybrid.

Not covered: At the binding, and at what the local kinds answer with. A production deployment of the recommendations needs an SAP AI Core service binding, and without one local development answers from a mock implementation for UI smoke tests; the auto kind reads a local Claude or OpenCode configuration and mock returns dummy responses, so neither is a model an application ships against. The plugin's own local vector embeddings and the tooling around them are experimental, with breaking changes expected.

SourceCAP plugins — AIchecked
THE COMMUNITY ADDS

A backend SAP's clients do not reach: @saptarishi/cds-plugin-llm registers many provider kinds under the same cds.requires.llm the agent plugin uses, so a development profile on a local Ollama model and a production profile on the Generative AI Hub differ by configuration alone. cap-llm-plugin and @geertjanklaps/cds-toon-ai-protocol-adapter stay on SAP AI Core and change what is sent to it, the first anonymising sensitive fields in SAP HANA Cloud and the second the wire format.

Licence1

LicenceSAP Developer License Agreement 3.2 CAP§ 3AlwaysCovered SAP materials or a covered CAP customer application are used as training data or to develop or refine an AI model or system.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.

Calling a model for inference is not automatically AI training. Section 3 matters when the covered material or application participates in training, model development, refinement or the text-and-data-mining uses it names.

SAP Developer License Agreement 3.2 CAP →

Artifacts7

7 of 7 artifacts
ArtifactSignals
CDS plugins5
@cap-js/aiValue-help recommendations and SAP AI Core as a CAP service
Signals
Use terms
@geertjanklaps/cds-toon-ai-protocol-adapterProtocol adapter serving CAP data as TOON instead of JSON
Signals
Use terms
@saptarishi/cds-plugin-llmCAP service kind putting eleven model providers behind one API
Signals
Use terms
cap-llm-pluginGenerative AI in CAP with fields anonymised through SAP HANA
Signals
Functional boundary+1
ui5-cap-ai-featuresCDS plugin and UI5 controls for AI text features via SAP AI Core
Signals
Functional boundary+1
MCP servers1
@shahid.la/cds-db-nlquery-mcpMCP server answering plain-English questions against a CDS schema
Signals
none
Services1
SAP AI CoreAI runtime on BTP with the Generative AI Hub
Signals
none

Content10

Group by10 of 10 pieces
Piece, what it offers
CAP in the age of AI #5 - agents wrap-up
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, Daniel Schlachter, part 5 of 7, Video
UI5 AI Features library is now an npm Package
SAP Community, Wouter Lemaire, BlogThe reasoningRunnable code
Version drift
CAP in the age of AI #3 - from MCP to A2A
YouTube — SAP Developers playlists, DJ Adams, Johannes Vogt, Stefan Rudi, part 3 of 7, Video
Show 7 more
Natural Language Queries for SAP CAP via MCP: The LLM Translates, CDS Executes
SAP Community, Shahid, BlogThe reasoningA recipeRunnable code
Enhancing Enterprise Applications: AI-powered User Experience with SAP CAP AI Plugin
SAP Community, rupamaity, BlogThe reasoningA recipeRunnable code
cds-toon-ai-protocol-adapter: a pragmatic way to cut AI token costs using SAP CAP
SAP Community, Geert-Jan Klaps, BlogThe reasoningA recipeRunnable code
Elevating Data Privacy in SAP CAP based GenAI Applications with CAP LLM Plugin
SAP Community, AkashAmarendra, BlogThe reasoningRunnable code
A ChatGPT-like chat app built with modern SAP technologies (CAP, SAPUI5) – Part 3/3
SAP Community, Mike Zaschka, part 3 of 3, BlogThe reasoningRunnable code
1 stale part
A ChatGPT-like chat app built with modern SAP technologies (CAP, SAPUI5) – Part 2/3
SAP Community, Mike Zaschka, part 2 of 3, BlogThe reasoningRunnable code
Gone quiet
A ChatGPT-like chat app built with modern SAP technologies (CAP, SAPUI5) – Part 1/3
SAP Community, Mike Zaschka, part 1 of 3, BlogThe reasoningRunnable code
Gone quiet
Enhancing Enterprise Applications: AI-powered User Experience with SAP CAP AI Plugin
SAP Community, rupamaity, BlogThe reasoningA recipeRunnable code
Elevating Data Privacy in SAP CAP based GenAI Applications with CAP LLM Plugin
SAP Community, AkashAmarendra, BlogThe reasoningRunnable code
cds-toon-ai-protocol-adapter: a pragmatic way to cut AI token costs using SAP CAP
SAP Community, Geert-Jan Klaps, BlogThe reasoningA recipeRunnable code
UI5 AI Features library is now an npm Package
SAP Community, Wouter Lemaire, BlogThe reasoningRunnable code
Version drift
Natural Language Queries for SAP CAP via MCP: The LLM Translates, CDS Executes
SAP Community, Shahid, BlogThe reasoningA recipeRunnable code

Seen working7

ArtifactSignals
Samples7
cap-agent-ui5-webui-sampleWorked example of the cap-agent-ui5-webui plugin
No license
cap-openaiCAP service actions calling OpenAI chat completions two ways
No license
cap-ui5-gpt-chatChat app on CAP and SAPUI5 against the OpenAI API
Functional boundary
custom-llm-clientLocal chat client for SAP questions with a CAP LangGraph backend
No license
Sample CAP Application with SAP Cloud SDK for AICAP samples calling SAP AI Core through the SAP Cloud SDK for AI
Functional boundary
SAP-samples/cap-agentic-engineeredFinancial Risk Analyzer built by an agent grounded in SAP MCP servers
none
ui5-ai-features-demoProduct-review screen consuming ui5-cap-ai-features on CAP
No license

Details

Coverage
statecore and community, CAP, Node.js
assessed
relationshipnarrow by design
also inUI5, BTP/BAIP, ABAP
Comparison properties2

These are the questions used to compare what the artifacts do. Values come from their documentation and may apply to a particular ecosystem or runtime. Each recorded value in the comparison opens its statement and sources.

Models it reachesStreams the response
For your agent
Ref
capability:llm-integration
JSON
/capabilities/llm-integration.json
MCP
Connecting an agent