llm_client
An ABAP client that gives chat-completion LLM APIs one interface for chat messages, structured output and tool calls across ten providers, from OpenAI and Anthropic to OLLAMA and AWS Bedrock.
Calling a different LLM provider from ABAP usually means a different SDK and a different response shape for each one. This client gives ABAP a single interface for chat messages, structured output and tool calls across ten providers — OLLAMA, OpenAI, OpenRouter, Azure OpenAI, Azure AI Foundry, Anthropic, Google Vertex AI, Deepseek, Google Gemini API and AWS Bedrock — with custom authentication added by sub-classing a provider class. It stops at chat: image, audio and video endpoints are out of scope, and a port to ABAP Cloud is not planned, since the maintainer points to Python and other languages for GenAI work on BTP instead.
Facts
Where it sits
Who is behind it
In the atlas: maintains 3@abap-aimaintainerBastianContributes to this
In the atlas: contributes to 3@wommel01 contributor
Before choosing this
Signals
RepositoryArchivedThe declared repository is archived
GitHub reports the repository as archived. The package may remain installable, but its source is no longer open for normal maintenance.
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- does not say
- Distributed through
- does not say
Connections
Calling a language model with tenant and credential handling solved
Download
README
quoted from abap-ai/llm_client under MIT, readABAP LLM Client
Discord - I will post regular updates and plans there.
Documentation
See Overview in docs folder.
Overview
ABAP LLM Client provides a universal strongly opinionated interface to on-premise and cloud-based LLM APIs, focusing primarily on chat endpoints. The client is designed to seamlessly integrate with various LLM providers while maintaining a consistent interface for ABAP applications.
Currently supported providers:
- OLLAMA
- OpenAI
- OpenRouter
- Azure OpenAI
- Azure AI Foundry
- Anthropic (structured output is not supported, considering simulating this via tool calls - vote in issue for that)
- Google Vertex AI
- Deepseek (structured output currently not supported)
- Google Gemini API
- AWS Bedrock via Converse API Endpoint
Features
- Chat messages
- Structured output
- Tool (function) call
- Multiple provider integration
- Customizable
Known Limitations
- Tested only on 7.52 & ABAP 2022 - experimental downport available in branch 702
- No advanced parsing to compensate LLM output errors especially in structured output and tool calls
Not planned
The following topics are currently not considered but feel free to challenge that in discussions if you have a specific use case.
- Port to ABAP Cloud - if you use BTP you might aswell consider using Python or other languages with better GenAI library support
- Non-Chat (e.g. image, audio, video) support
Why ABAP LLM Client?
ABAP might not be the first environment that comes to mind for GenAI projects, but it's the foundation for critical business processes in many organizations. This client exists to bridge this gap: It provides a straightforward way to integrate LLM capabilities into existing ABAP business logic.
Core Ideas
- Simple Integration: Focus on the most commonly needed LLM features (mainly chat endpoints) rather than trying to support every possible API feature
- Practical Approach: Built for ABAP developers who need to enhance existing business functions with LLM capabilities, not for ML experiments
- Stable Integration: As tools and structured output become standard features across LLM providers, integration becomes more reliable and maintainable
- Real-World Usage: Designed for actual business scenarios where you might want to:
- Enhance existing ABAP reports with AI-powered insights
- Add LLM capabilities to business workflows
- Prototype AI features in existing ABAP applications
No Frills
This is not a full-featured ML framework or a complex AI platform. It's a practical tool for ABAP developers who need to call LLM APIs and process their responses within their ABAP environment. Nothing more, nothing less. If you need to integrate LLM capabilities into your ABAP systems and want to do it with minimal overhead, this client might be useful for you.
Usage
Refer to the llm_client_test repository on how to use the llm client and the docs folder for further details.
⚠️ Security Notice: Currently no safeguards. Use API keys with appropriate usage limits to prevent accidental charges e.g. for unexpected endless loops, etc.
Extension
Custom LLM Authenticaton implementations can be created by:
- Sub-classing the specific provider class
- Redefining the
SET_AUTHmethod In general for most parts interfaces are available to easily use custom implementations preferrably via sub-classes.
Roadmap - Planned Features
With the Beta release my focus is on using this library for further AI based topics (stay tuned) --> bug fixes have priority. Open a discussion or an issue if you have a specific requirement. Further features mid-term (check discord for short term plans and to discuss the current state):
- Workaround to force use required tool to simulate structured output where providers miss this feature (e.g. Azure AI Foundry)
- Better error- and edge-case handling
- Optimizations:
- Code re-use for the clients where useful
- Consider a common JSON-Schema builder for structured output and tool use
- Performance Optimizations (low prio)
- ??? - Open issues/discussions for whatever comes to your mind
Contributing
Feel free to:
- Open issues for bug reports
- Use Discord for discussions
- Request/Implement additional provider implementations
- Suggest concept improvements
Security Recommendations
- Use SM59 supported authentication methods e.g. by using an API Gateway for credential mapping
- Set appropriate usage limits on API keys and monitor their usage
- Implement custom authorization checks to limit who can use the LLM Client
History
Removed 4
Notes
- Rework of the client interface, old one available as zif_llm_client_int
- New ZCL_LLM_CLIENT is a wrapper around the old (now internal) interface, prefer this
- Several bugfixes especially for Gemini client and tool calls
- Features of the new client:
- Simplified interface
- Request now handled internally, one interface only
- Send User Message with execute --> no add_message required
- Auto-add LLM responses to chat history
- Auto-retry in case of error (3 times by default, additional 10 seconds wait on 429/529)
- Simpler execution of tools
Others providing
Compare all 23 on the LLM integration page →- abap-agent-runtimeabap-agent-runtimeAn ABAP-native MCP endpoint inside the SAP system: an agent reads the screen of an opted-in abap2UI5 app as structured data, fills its fields and fires its events as the logged-on SAP user.community org, abapABAP-native MCP endpoint that drives opted-in abap2UI5 appsfrom ABAP
- abap_btocs_ollamaabap_btocs_ollamaAn ABAP plugin, built on the B-Tocs ABAP SDK, that calls models served by Ollama through an SM59 RFC destination, implementing four of its API endpoints: generate, tags, show and embeddings.independent, abapB-Tocs ABAP SDK plugin connecting to Ollama modelsfrom ABAP
- SAP AI CoreSAP AI CoreSAP's AI service on BTP: the runtime for AI assets, and through the Generative AI Hub inside it the access to foundation models, the orchestration service with its templating, masking, filtering and grounding modules, the Prompt Registry and Document Grounding.sap official, btpAI runtime on BTP with the Generative AI Hubfrom BTP/BAIP
- cap-java/cds-aicap-java/cds-aiBridges CAP Java to SAP AI Core and adds AI-powered field recommendations to Fiori draft UIs, as two alpha Maven modules with mock fallbacks for local development.sap official, capBridge from CAP Java to SAP AI Core, with Fiori field recommendationsfrom CAP
- @cap-js/ai@cap-js/aiOut-of-the-box value-help recommendations powered by SAP RPT-1, SAP AI Core as a standard CAP service, and an experimental local embedding model behind SQLite's vector functions.sap official, capValue-help recommendations and SAP AI Core as a CAP servicefrom CAP
- cap-llm-plugincap-llm-pluginGenerative AI in a CAP application with the sensitive fields anonymised through SAP HANA before the prompt leaves, so the model never sees the confidential half.independent, capGenerative AI in CAP with fields anonymised through SAP HANAfrom CAP
- @geertjanklaps/cds-toon-ai-protocol-adapter@geertjanklaps/cds-toon-ai-protocol-adapterA protocol adapter that serves CAP data as TOON — Token-Oriented Object Notation — instead of JSON, so a payload bound for a language model costs fewer tokens to send.independent, capProtocol adapter serving CAP data as TOON instead of JSONfrom CAP
- abap-sdk-nwas-xabap-sdk-nwas-xAn ABAP client library for IBM's watsonx.ai and watsonx.ai Runtime APIs, installed into an SAP NetWeaver AS ABAP system through abapGit, generating and refreshing the IAM token from an API key.independent, abapABAP client library for IBM watsonx.ai APIsfrom ABAP
- @jerome-benoit/sap-ai-provider@jerome-benoit/sap-ai-providerA provider for the Vercel AI SDK that speaks to SAP AI Core through its orchestration or foundation models API, so an application written against that SDK runs on SAP's models without being rewritten.independent, capVercel AI SDK provider for SAP AI Corefrom CAP
- ui5-cap-ai-featuresui5-cap-ai-featuresBoth halves of an AI text feature in one package: a CDS plugin serving an AIService over SAP AI Core's Orchestration Service, and the be.wl.ai UI5 control library that calls exactly that service.independent, capCDS plugin and UI5 controls for AI text features via SAP AI Corefrom CAP
- Microsoft AI SDK for SAPMicrosoft AI SDK for SAPMicrosoft's ABAP library for calling Azure OpenAI and OpenAI from an SAP application server, wrapping completions, embeddings, fine-tuning and the other operations in ABAP data types, installed with abapGit.partner, abapABAP library for calling Azure OpenAI and OpenAIfrom ABAP
- zllmzllmAn ABAP framework for chaining and orchestrating calls to large language models in pure ABAP, with templated prompts, routing by complexity, response caching and token estimation.independent, abapABAP framework for chaining and orchestrating LLM callsfrom ABAP
- ABAP AI SDKABAP AI SDKSAP's reuse library for calling a large language model from ABAP code, powered by Intelligent Scenario Lifecycle Management and reaching the models in the Generative AI Hub; delivered with SAP BTP ABAP environment, SAP S/4HANA Cloud Public and Private Edition and SAP S/4HANA.sap official, abapSAP reuse library for calling large language models from ABAPfrom ABAP
- @sap-ai-sdk/ai-api@sap-ai-sdk/ai-apiThe AI Core API surface of SAP's AI SDK, covering deployments, configurations and the rest of the control plane, as opposed to calling a model.sap official, capAI Core control plane API surface of SAP's AI SDKfrom CAP
- @sap-ai-sdk/core@sap-ai-sdk/coreThe shared internals that the packages of SAP's AI SDK build on, which its own readme says are not meant to be depended on directly.sap official, capShared internals of SAP's AI SDKfrom CAP
- @sap-ai-sdk/foundation-models@sap-ai-sdk/foundation-modelsThe package of SAP's AI SDK that calls foundation models through SAP AI Core and the Generative AI Hub, and the one an application actually reaches for.sap official, capClient for foundation models via SAP AI Core and Generative AI Hubfrom CAP
- @sap-ai-sdk/orchestration@sap-ai-sdk/orchestrationThe Orchestration Service client of SAP's AI SDK, which applies templating, grounding, filtering and masking around a model call rather than in the application.sap official, capOrchestration Service client for templating, grounding and maskingfrom CAP
- @sap-ai-sdk/prompt-registry@sap-ai-sdk/prompt-registryA package for keeping prompts in SAP's prompt registry rather than in the codebase, so changing a prompt is not a deployment.sap official, capClient for prompts kept in SAP's prompt registryfrom CAP
- @saptarishi/cds-plugin-llm@saptarishi/cds-plugin-llmA CAP service kind that puts eleven model providers behind one chat, stream, embed and batch interface, so which backend a service calls is a profile in package.json rather than a change to the handler.independent, capCAP service kind putting eleven model providers behind one APIfrom CAP
- @shahid.la/cds-db-nlquery-mcp@shahid.la/cds-db-nlquery-mcpMCP server that answers plain-English questions against the entities in db/schema.cds — it discovers the schema, generates CQN-backed SQL with real joins, and returns rows.independent, capMCP server answering plain-English questions against a CDS schemafrom CAP
- @ui5/webcomponents@ui5/webcomponentsSAP's UI elements as standard custom elements, ui5-button among them, implementing SAP Fiori design and usable from plain HTML, React, Angular or Vue.sap official, ui5SAP's UI elements as standard custom elementsfrom UI5
- abap-sdk-nwasabap-sdk-nwasAn ABAP client library for IBM Watson's Discovery, Language Translator, Natural Language Understanding, Speech to Text, Text to Speech and Assistant services, installed through abapGit.independent, abapAn ABAP client library for IBM Watson's Discovery, Language Translator, Natural Language Understanding, Speech to Text, Text to Speech and Assistant services, installed through abapGit.from ABAP
Details
Sources
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
abaplint
Flavors
“Tested only on 7.52 & ABAP 2022 - **experimental** downport available in branch 702” — abap-ai/llm_client — README
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:abap-ai-llm-client- JSON
- /artifacts/abap-ai-llm-client.json
- MCP
- Connecting an agent