# Aicore SDK java

> Aicore SDK java is an open-source agent skill for developer tools. Generates Java code for calling SAP GenAI Hub models via the SAP AI SDK. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/SAP/ai-skills-library/tree/main/plugins/aicore-skills/skills/aicore-sdk-java
- **Repository:** https://github.com/sap/ai-skills-library
- **GitHub stars:** 162
- **License:** Apache-2.0
- **Skill name:** aicore-sdk-java
- **Collection:** https://github.com/SAP/ai-skills-library
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an agent write Java and Kotlin code that calls SAP GenAI Hub models through the com.sap.ai.sdk packages. It points the agent to ready-made code templates for common patterns such as chat, streaming, multi-turn conversations, embeddings, grounding, prompt registry templates, content filtering and data masking, and falls back to live SDK documentation or an offline reference when no template matches.

The skill sets working rules for the agent: it prefers the orchestration client for most tasks, uses named model constants instead of raw model strings, and includes credential guidance in generated code. For Spring Boot streaming it prescribes a specific response-emitter pattern, while Spring AI model streaming is handled differently.

The skill expects Java 17 or newer and a Maven or Gradle build, plus an SAP AI Core service key supplied through an environment variable or VCAP services. It does not cover JavaScript or TypeScript, which belong to a separate SAP skill.

## When your agent uses it

> Generate working Java boilerplate for SAP GenAI Hub using the SAP AI SDK for Java (com.sap.ai.sdk). Covers chat completion, streaming, multi-turn conversations, prompt templates, content filtering, data masking, embeddings, RAG/grounding, prompt registry, and Spring Boot streaming. WHEN: user asks for Java or Kotlin code that calls a GenAI Hub model, wants a Java starter project, asks how to use com.sap.ai.sdk in their app, or asks how to integrate AI Core into a Spring Boot or plain Java application. DO NOT USE FOR: JavaScript/TypeScript code — use `aicore-sdk-js`.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Java scripts](https://github.com/SAP/ai-skills-library/tree/HEAD/plugins/aicore-skills/skills/aicore-sdk-java)
- [No network calls found in its scripts](https://github.com/SAP/ai-skills-library/tree/HEAD/plugins/aicore-skills/skills/aicore-sdk-java)
- [License: Apache-2.0](https://github.com/SAP/ai-skills-library/tree/HEAD/plugins/aicore-skills/skills/aicore-sdk-java)

## Features

- **Chat and streaming templates:** Ready-made Java examples for single-turn chat completion and streamed responses through the orchestration client.
- **Multi-turn conversations:** Templates for keeping message history across a conversation with a GenAI Hub model.
- **Embeddings and grounding:** Examples for generating text embeddings and for retrieval-augmented grounding with a vector store.
- **Filtering and data masking:** Templates for content filtering with Azure and LlamaGuard, and for DPI-based data anonymization.
- **Spring Boot integration:** Guidance for streaming responses in Spring Boot controllers and for using Spring AI with the SDK.
- **Prompt registry templates:** Examples for loading managed prompt templates from the SAP prompt registry.

## Good for

- Write a Java chat call to a GPT model on SAP GenAI Hub
- Add streaming responses to a Spring Boot controller
- Build a multi-turn chatbot with message history in Java
- Generate text embeddings with the SAP AI SDK
- Add retrieval-augmented grounding to a Java app
- Apply content filtering or data masking to model calls

## Install

### Claude Code

This skill ships in the `aicore-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add SAP/ai-skills-library
/plugin install aicore-skills@ai-skills-library
```

Or copy only this skill to `~/.claude/skills/aicore-sdk-java`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/ai-skills-library.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/aicore-sdk-java &&
cp -R "$tmp/plugins/aicore-skills/skills/aicore-sdk-java" ~/.claude/skills/aicore-sdk-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/aicore-sdk-java` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/aicore-sdk-java` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/ai-skills-library.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/aicore-sdk-java &&
cp -R "$tmp/plugins/aicore-skills/skills/aicore-sdk-java" ~/.agents/skills/aicore-sdk-java &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/aicore-sdk-java` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/aicore-sdk-java` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/ai-skills-library.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/aicore-sdk-java &&
cp -R "$tmp/plugins/aicore-skills/skills/aicore-sdk-java" ~/.cursor/skills/aicore-sdk-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/aicore-sdk-java` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/SAP/ai-skills-library.git --path plugins/aicore-skills/skills/aicore-sdk-java
```

Or copy the folder to `~/.gemini/skills/aicore-sdk-java` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/aicore-sdk-java`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SAP/ai-skills-library.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/aicore-sdk-java &&
cp -R "$tmp/plugins/aicore-skills/skills/aicore-sdk-java" ~/.copilot/skills/aicore-sdk-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/aicore-sdk-java` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/SAP/ai-skills-library.git
```

Then copy `ai-skills-library/plugins/aicore-skills/skills/aicore-sdk-java` into your agent's skills folder as `aicore-sdk-java`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

Java 17 or newer, Maven or Gradle, and an SAP AI Core service key set in the AICORE_SERVICE_KEY environment variable or VCAP services.

### Which language does Aicore SDK java cover?

Java and Kotlin code that uses com.sap.ai.sdk. JavaScript and TypeScript are handled by a separate skill.

### Where does the skill get its code examples?

It first uses templates in its assets folder, then live SDK documentation through Context7 if available, and finally an offline reference file.

### Which Java packages does Aicore SDK java add to a project?

It uses the orchestration artifact for most tasks, with core for custom resource groups and additional artifacts for batch, OpenAI, and the SAP RPT model.

### How do I install Aicore SDK java in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/aicore-sdk-java to use it in all your projects, or to .claude/skills/aicore-sdk-java in one project. Or install the aicore-skills plugin, which includes it: /plugin marketplace add SAP/ai-skills-library, then /plugin install aicore-skills@ai-skills-library.

### Does Aicore SDK java run scripts?

Yes. It runs Java scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Aicore SDK java?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Aicore SDK java?

The closest alternatives to Aicore SDK java are Aicore SDK js, Aicore SDK python, Java springboot, Sap cloud integration and Kotlin springboot.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Aicore SDK js](https://ai-powered.com/skills/aicore-sdk-js): Aicore SDK js is an open-source agent skill for developer tools.
- [Aicore SDK python](https://ai-powered.com/skills/aicore-sdk-python): Aicore SDK python is an open-source agent skill for developer tools.
- [Java springboot](https://ai-powered.com/skills/java-springboot): Java springboot is an open-source agent skill for developer tools.
- [Sap cloud integration](https://ai-powered.com/skills/sap-cloud-integration): Sap cloud integration is an open-source agent skill for developer tools.
- [Kotlin springboot](https://ai-powered.com/skills/kotlin-springboot): Kotlin springboot is an open-source agent skill for developer tools.
- [Azure AI voicelive java](https://ai-powered.com/skills/azure-ai-voicelive-java): Azure AI voicelive java is an open-source agent skill for cloud and infrastructure.
- [Azure AI projects java](https://ai-powered.com/skills/azure-ai-projects-java): Azure AI projects java is an open-source agent skill for cloud and infrastructure.
- [Azure AI agents persistent java](https://ai-powered.com/skills/azure-ai-agents-persistent-java): Azure AI agents persistent java is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/aicore-sdk-java
