SAP Cloud SDK for AI is the official Software Development Kit (SDK) for SAP AI Core, SAP Generative AI Hub, and Orchestration Service.
Integrate chat completion into your business applications with SAP Cloud SDK for AI. Leverage the generative AI hub of SAP AI Core to make use of templating, grounding, data masking, content filtering and more. Setup your SAP AI Core instance with SAP Cloud SDK for AI.
- Requirements and Setup
- Packages
- SAP Cloud SDK for AI Sample Project
- Local Testing
- Support, Feedback, Contribution
- Security / Disclosure
- Code of Conduct
- Licensing
- Enable the AI Core service in SAP BTP.
- Ensure the project is configured with Node.js v20 or higher, along with native ESM support.
For further details, refer to the individual sections under Packages.
This project publishes multiple packages and is managed using pnpm
This package provides tools to manage your scenarios and workflows in SAP AI Core.
- Streamline data preprocessing and model training pipelines.
- Execute batch inference jobs.
- Deploy inference endpoints for your trained models.
- Register custom Docker registries, sync AI content from your own git repositories, and register your own object storage for training data and model artifacts.
$ npm install @sap-ai-sdk/ai-api
For details on the client, refer to this document.
This package incorporates generative AI foundation models into your AI activities in SAP AI Core and SAP AI Launchpad.
$ npm install @sap-ai-sdk/foundation-models
For details on foundation model clients, refer to this document.
This package provides LangChain model clients, built on top of the foundation model clients of the SAP Cloud SDK for AI.
$ npm install @sap-ai-sdk/langchain
For details on LangChain model client, refer to this document.
This package incorporates generative AI orchestration capabilities into your AI activities in SAP AI Core and SAP AI Launchpad.
$ npm install @sap-ai-sdk/orchestration
For details on orchestration client, refer to this document.
We have created a sample project demonstrating the different clients' usage of the SAP Cloud SDK for AI for TypeScript/JavaScript. The project README outlines the set-up needed to build and run it locally.
To test SAP Cloud SDK for AI features locally during application development, follow these steps:
- Download a service key for the AI Core service instance.
- Set the downloaded service key as the
AICORE_SERVICE_KEY
environment variable in the local environment.
The SDK parses the service key from the environment variable to interact with the AI Core service. This setup enables local testing of clients such as orchestration and OpenAI, provided that deployments for orchestration and OpenAI exist in SAP BTP.
This project is open to feature requests, bug reports and questions via GitHub issues.
Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Copyright 2024 SAP SE or an SAP affiliate company and ai-sdk-js contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.