aicore-sdk-java

aicore-sdk-java is a skill for Claude Code, Codex from SAP/ai-skills-library. It costs 135 tokens per session (1,945 once invoked), scanned A, original, Apache-2.0.

A Java code-generation guide for SAP GenAI Hub using SAP's Java AI SDK. It covers model conversations, streaming, prompt templates, content filtering, embeddings, document search, and Spring Boot integration.

In plain words
What is it for?
Use it to create Java examples for chat, streaming, multi-turn conversations, retrieval-augmented generation (RAG), prompt registries, and Spring Boot applications.
Why use it?
It reduces the risk of inventing Java class names or configuration and directs you to verified SDK references when examples are not available.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Java examples for chat, streaming, multi-turn conversations, retrieval-augmented generation (RAG), prompt registries, and Spring Boot applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sap/ai-skills-library/aicore-sdk-java
About the project

SAP/ai-skills-library is a catalogue for discovering, filtering, and installing AI skills that support SAP digital assistants. SAP users and contributors can install listed skills with the skills CLI across compatible coding agents, while skill authors keep their implementations in their own public repositories and register them with the library. The catalogue contains five of the library's skills and its plugin.

SAP/ai-skills-library · 89 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SAP/ai-skills-library --skill aicore-sdk-java
Clone the repo
git clone --depth 1 https://github.com/SAP/ai-skills-library

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aicore-sdk-java

README.md
[![agentmods](https://agentmods.dev/badge/skills/sap/ai-skills-library/aicore-sdk-java/github.svg)](https://agentmods.dev/skills/sap/ai-skills-library/aicore-sdk-java)
Your own site
<a href="https://agentmods.dev/skills/sap/ai-skills-library/aicore-sdk-java"><img src="https://agentmods.dev/badge/skills/sap/ai-skills-library/aicore-sdk-java/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aicore-sdk-java

Your own site · 80×15
<a href="https://agentmods.dev/skills/sap/ai-skills-library/aicore-sdk-java"><img src="https://agentmods.dev/badge/skills/sap/ai-skills-library/aicore-sdk-java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00135 $0.01945
Opus 5.5 $0.00054 $0.00778
Sonnet 5.5 $0.00027 $0.00389
Haiku 4.5 $0.00014 $0.00194

Measured 2d ago against content hash c5c55d710e5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aicore-sdk-java scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/aicore-sdk-java/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sources & Fallback

Resolve answers in this priority order:

  1. Assets (assets/ directory) — check for a matching template first and serve it directly. Assets are always available offline and contain runnable, tested code.
  2. Context7 MCP — if no asset matches, fetch live docs via Context7: resolve-library-id: SAP/ai-sdk-java, then get-library-docs. Context7 returns the most up-to-date API shapes straight from the repo. Silently fall back to step 3 if Context7 is not installed.
  3. references/SDK_JAVA.md — offline reference when Context7 is unavailable. Use this rather than guessing.

Do not fabricate class names, method signatures, or config shapes. If none of the three sources cover the question, say so and point the user to https://sap.github.io/ai-sdk/docs/java/ directly.


Rules

  1. If no deployment exists, check the SAP AI Core console or contact your admin to list or create one before generating code.
  2. Always include credential guidance in generated code comments; link to Connecting to AI Core for setup details.
  3. Use OrchestrationAiModel constants (e.g. OrchestrationAiModel.GPT_4O_MINI) — never raw model name strings.
  4. Always use OrchestrationClient as the primary client for chat, streaming, embeddings, grounding, and filtering. OpenAiClient (openai artifact) is only for direct OpenAI proxy use cases — do not recommend it for general chat.
  5. Streaming has two distinct APIs — use each correctly:
    • OrchestrationClient.streamChatCompletion() in a Spring Boot controller: always use ResponseBodyEmitter + ThreadContextExecutors.getExecutor().execute() to forward deltas. Never use SseEmitter, Thread.ofVirtual(), or expose a raw Flux from the controller.
    • Spring AI ChatModel.stream() (OrchestrationChatModel / OpenAiChatModel): this method is part of the Spring AI ChatModel interface and legitimately returns Flux<ChatResponse>. Composing the Flux directly (e.g. .doOnNext(…).blockLast()) is correct — do not replace it with ResponseBodyEmitter.
  6. Gather these details before generating code — ask only for what the user hasn't provided:
    • Use case: chat / streaming / multi-turn / embeddings / grounding / filtering?
    • Model: check the SAP AI Core console or the SAP GenAI Hub documentation for available models
    • Build tool: Maven or Gradle?
    • Framework: plain Java / Spring Boot?
  7. For SDK bugs or unexpected runtime behavior: acknowledge the issue, share only verified workarounds from the assets or reference docs, and direct the user to https://github.com/SAP/ai-sdk-java/issues. Do not speculate about SDK internals or diagnose bugs not covered by a source above.

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 150 lines · 135 tokens per session scan A c5c55d710e5f

Subscribe to this mod's changes

aicore-sdk-java is a skill published in the GitHub repository SAP/ai-skills-library (89 stars, last pushed 2d ago), licensed Apache-2.0. It adds 135 tokens to every session and 1,945 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-23.

Related

Other skills, from other repositories

aws-sdk-java-v2-bedrock

Provides Amazon Bedrock patterns using AWS SDK for Java 2.x. Invokes foundation models (Claude, Llama, Titan), generates text and images, creates embeddings for RAG, streams real-time responses, and configures Spring Boot integration. Use when asking about Bedrock integration, Java SDK for AI models, AWS generative…

giuseppe-trisciuoglio/developer-kit · 92 tokens

langchain4j-ai-services-patterns

Provides patterns to build declarative AI Services with LangChain4j for LLM integration, chatbot development, AI agent implementation, and conversational AI in Java. Generates type-safe AI services using interface-based patterns, annotations, memory management, and tools integration. Use when creating AI-powered Java…

giuseppe-trisciuoglio/developer-kit · 85 tokens

chunking-strategy

Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages (10-20%), and semantic boundary detection methods. Validates semantic coherence and evaluates retrieval precision/recall metrics. Use when building retrieval-augmented generation systems, vector…

giuseppe-trisciuoglio/developer-kit · 69 tokens

rag

Implements document chunking, embedding generation, vector storage, and retrieval pipelines for Retrieval-Augmented Generation systems. Use when building RAG applications, creating document Q&A systems, or integrating AI with knowledge bases.

giuseppe-trisciuoglio/developer-kit · 44 tokens

spring-ai

Spring AI for integrating AI/ML models (OpenAI, Azure, Ollama, etc.) into Spring applications. Covers ChatClient, embeddings, RAG, vector stores, and function calling. USE WHEN: user mentions "spring ai", "ChatClient", "LLM integration Spring", "RAG Spring", "embeddings Java", "vector store Spring", "OpenAI Spring…

claude-dev-suite/claude-dev-suite · 109 tokens

flink-udf

Build and deploy Apache Flink user-defined functions (UDFs) in Java for stream processing over Kafka. Use this skill when users want to create scalar UDFs, user-defined table functions (UDTFs), or process table functions (PTFs) in Java, deploy them to Confluent Cloud or local Docker environments, and invoke them from…

confluentinc/agent-skills · 189 tokens