SAP-samples/codejam-code-based-agents
A CodeJam teaching code-based AI agents in Python or TypeScript, from a first agent through custom tools to deployment on SAP BTP and integration with Joule.
The material for the "Build code-based AI Agents on SAP Business Technology Platform" CodeJam builds an agent on Generative AI Hub in 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, btp, then adds custom tools using the SAP-RPT-1 model and SAP's grounding service, in one of three stacks: Python with CrewAI and LiteLLM, Python with LangGraphLangGraphAn agent runtime that describes a loop as a graph of nodes and edges and carries the state between turns. For the things here it is the harness an agent's planning and tool calls run in, and the state that a CDS checkpointer persists. and LiteLLM, or TypeScript with LangGraph and the SAP Cloud SDK for AI. Each stack has the same ten exercises, from understanding Generative AI Hub through a multi-agent system and a web-search tool to deployment on Cloud Foundry with A2A and integration into SAP Joule. The Developer Advocates provide a fully functioning system and a subaccount for the duration of the session, so a participant needs only a laptop with a Chromium-based browser.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerAntonio MaradiagaContributes to this
Developer Advocate
In the atlas: contributes to 10@ajmaradiagadavbizer93Contributes to this
In the atlas: contributes to 2@davbizer93Thomas JungContributes to this
Developer Advocate
In the atlas: contributes to 15, wrote 6@jung-thomasKevin RiedelsheimerContributes to this
In the atlas: contributes to 11@KevinRiedelsheimerShrinivasan NeelamegamContributes to this
In the atlas: contributes to 4@neelamegamsNora von ThenenContributes to this
In the atlas: contributes to 3@noravthVitaliy RudnytskiyContributes to this
In the atlas: contributes to 6, wrote 1@SygyzmundovychDaniel WroblewskiContributes to this
In the atlas: contributes to 3@thecodester8 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
- Use as
- A reference
As a sample
- Form
- Workshop or CodeJam material
Connections
Building an agent into your own application
Calling a language model with tenant and credential handling solved
AI runtime on BTP with the Generative AI Hub
Browser-based development environment with dev spaces
Download
README
quoted from SAP-samples/codejam-code-based-agents under Apache-2.0, readCodeJam - Build code-based AI Agents on SAP Business Technology Platform
Description
This repository contains the material for the "Build code-based AI Agents on SAP Business Technology Platform" CodeJam.
Overview
In this CodeJam, you will learn how to build state-of-the-art AI agents using Generative AI Hub, Python and JavaScript. You will also gain the skills to create custom tools for your agents, including leveraging the SAP-RPT-1 model and SAP's grounding service. Finally, you will deploy your agents to BTP.
For this CodeJam you will use one of:
- Python, CrewAI and LiteLLM
- Python, LangGraph and LiteLLM
- TypeScript, LangGraph and SAP Cloud SDK for AI
You will learn more about the following SAP technologies:
- Generative AI Hub on SAP AI Core
- SAP-RPT-1
- Grounding Service
- SAP AI Launchpad
- Business Application Studio (Python)
Python Solution Diagram

Session prerequisites
For this CodeJam, the Developer Advocates provide a fully functioning system. You only need a laptop with a chromium-based browser installed.
Exercises
For this CodeJam you can choose between three different technology stacks. Both Python options use the same SAP AI services — they differ in the agent framework. The JavaScript option uses TypeScript and LangGraph.
If you are unsure which path to choose, ask the instructor for guidance.
Python (CrewAI + LiteLLM)
- Exercise 00 - Understanding Generative AI Hub in SAP AI Core
- Exercise 01 - Setup SAP Business Application Studio and your personal development space
- Exercise 02 - Build your first AI Agent
- Exercise 03 - Build your first agent tool
- Exercise 04 - Building a multi-agent system
- Exercise 05 - Add the Grounding service
- Exercise 06 - Discover Connected Crimes with Web Search
- Exercise 07 - Use your AI Agents to solve the crime
- Exercise 08 - Deploy your agent to Cloud Foundry with A2A
- Exercise 09 - Integrate your agent into SAP Joule
Python (LangGraph + LiteLLM)
- Exercise 00 - Understanding Generative AI Hub in SAP AI Core
- Exercise 01 - Setup SAP Business Application Studio and your personal development space
- Exercise 02 - Build your first AI Agent
- Exercise 03 - Build your first agent tool
- Exercise 04 - Building a multi-agent system
- Exercise 05 - Add the Grounding service
- Exercise 06 - Discover Connected Crimes with Web Search
- Exercise 07 - Use your AI Agents to solve the crime
- Exercise 08 - Deploy your agent to Cloud Foundry with A2A
- Exercise 09 - Integrate your agent into SAP Joule
JavaScript (LangGraph + SAP Cloud SDK for AI)
- Exercise 00 - Understanding Generative AI Hub in SAP AI Core
- Exercise 01 - Setup SAP Business Application Studio and your personal development space
- Exercise 02 - Build your first AI Agent
- Exercise 03 - Build your first agent tool
- Exercise 04 - Building a multi-agent system
- Exercise 05 - Add the Grounding service
- Exercise 06 - Discover Connected Crimes with Web Search
- Exercise 07 - Use your AI Agents to solve the crime
- Exercise 08 - Deploy your agent to Cloud Foundry with A2A
- Exercise 09 - Integrate your agent into SAP Joule
The instructor will start you on the first exercise. Proceed to the next exercise once the instructor tells you to.
For this CodeJam you are provided with a subaccount on SAP BTP. The subaccount is only available for the duration of this CodeJam.
Frequently asked Questions
You can find a list of frequently asked questions in the Frequently Asked Questions Document
Further Learning on AI
YouTube Videos
SAP Developers YouTube channel: SAP Business AI playlist
Learning
- Learning Journey - Solving Business Problems using SAP's Generative AI Hub
- Basic Trial of Generative AI Hub
Feedback
If you can spare a couple of minutes at the end of the session, please provide feedback to help us improve next time.
Use this Give feedback link to create a special "feedback" issue, and follow the instructions in there.
Thank you!
Other CodeJams
CodeJam Community
Known Issues
How to obtain support
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
License
Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.
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
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-codejam-code-based-agents- JSON
- /artifacts/sap-samples-codejam-code-based-agents.json
- MCP
- Connecting an agent