xtravels
A travel-booking application built on the master data that xflights publishes, composing another package's schema into its own rather than owning master data itself.
npm install then cds watch starts it at localhost:4004, consuming @capire/xflights-data either from GitHub Packages or from a local npm workspace set up alongside the xflights source. It demonstrates cross-repository CAP composition end to end: booking entities defined here, flight and airport entities imported from elsewhere, mashed into one CDS model.
Facts
Where it sits
Who is behind it
In the atlas: maintains 20, wrote 1@capiremaintainerChristian GeorgiContributes to this
In the atlas: maintains 1, contributes to 53@chgeoDaniel HutzelContributes to this
In the atlas: contributes to 32, wrote 3@danjoaDaniel SchlachterContributes to this
In the atlas: contributes to 10, wrote 9@DanSchlachterJohannes VogelContributes to this
In the atlas: contributes to 25@johannes-vogelNick JosipovicContributes to this
In the atlas: contributes to 4, wrote 1@nkaputnikPaulContributes to this
In the atlas: contributes to 12@PDT42René JeglinskyContributes to this
In the atlas: contributes to 20@renejeglinskySimon EngelContributes to this
In the atlas: contributes to 14, wrote 4@SirSimon04sjvansContributes to this
In the atlas: contributes to 45@sjvansStefan RudiContributes to this
In the atlas: contributes to 13, wrote 5@stefanrudi12 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
As a sample
- Form
- does not say
Connections
Building an agent into your own application
Whole applications to read rather than snippets to copy
Exposing application data and operations to agents over MCP
Building one solution from reuse packages other projects published
Using a remote service as if it were one of your own
Download
Learn more
- CAP in the age of AI #5 - agents wrap-upCAP in the age of AI #5 - agents wrap-upThe agents topic closed out on what sits around the agent rather than inside it, now that the documentation has moved into capire. The chat preview's session is persisted in the database rather than kept in memory, traces go out through @cap-js/telemetry to a self-hosted MLflow under the OpenTelemetry conventions for generative AI, and the panel is explicit that @agent reuses the MCP adapter's code programmatically without serving an MCP endpoint. It ends in the xtravels sample, where a travel agent delegates to a hotel-service sub-agent and reaches a separately started flight service over MCP through the service binding CAP resolves anyway. Earlier in the hour the same agent answers from a model running on the presenter's laptop, reached as an OpenAI-compatible endpoint.published 2026-10-02DJ Adams, Johannes Vogt, Simon Engel, Stefan Rudi, Daniel Schlachter, YouTube — SAP Developers playlists
- CAP-level Data FederationCAP-level Data FederationA Devtoberfest 2026 session (CAP-31) on letting one CAP application read another's data as if it were local. The modelling half is the same for both answers, which is why the two technical edges hold: the provider defines an API service and exports it with CDS export as an npm package carrying the model, mock data and translated texts, the consumer imports it and puts consumption views on top, and only then is it wired either as service-level replication that copies the rows into local tables each time the server starts, or over the SAP HANA synonyms that cds-federation-synonyms generates, with HDI grants on the provider side and a service replacement that redirects each synonym from its mock table to the provider's container. It is worked through on xflights and xtravels, including the local run where CDS watch mocks the imported service from the CSV files inside the package.SAP Developers, published 2026-10-02SAP Developers, YouTube — SAP Developers playlists
Architecture
as mta.yaml states it at 9ccb46d, readDownload
Bound, and not drawn
- xtravels-srvhana, SAP Authorization and Trust Management service, SAP Destination service, SAP AI Core
- xtravels-db-deployerhana
- xtravels-app-deployerSAP Authorization and Trust Management service, SAP Application Frontend service
Bound in the descriptor, not joined to an entry
hana
README
quoted from capire/xtravels under Apache-2.0, read@capire/xtravels
A travel booking application using master data provided by capire/xflights.
Get it
git clone https://github.com/capire/xtravels
cd xtravels
npm install
The package has dependencies to other @capire packages, including @capire/xflights-data, that can be pulled from GitHub Packages or from a local workspace setup as follows...
Using GitHub Packages
Reuse packages among the capire samples are published to the GitHub Packages registry, which requires you to npm login once like that:
npm login --scope=@capire --registry=https://npm.pkg.github.com
When prompted for a password enter a Personal Access Token (classic) with read:packages scope.
Learn more about that in Authenticating to GitHub Packages.
A successfull npm login adds entries like that to your local ~/.npmrc file, which allow you to npm install @capire packages subsequently using npm add or npm install as usual:
@capire:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<generated token>
Using Workspaces
Alternatively you can work with related packages in local workspace setups like so:
-
Create a workspace root, e.g. at
cap/samples:mkdir -p cap/samples && cd cap/samples echo '{"workspaces":["*","*/apis/*"]}' > package.json -
Add related projects:
git clone https://github.com/capire/xtravels git clone https://github.com/capire/xflights git clone https://github.com/capire/common git clone https://github.com/capire/s4 -
Install dependencies:
npm install
This will install all dependencies of all cloned projects, with cross dependencies between them being symlinked automatically by npm install. We can inspect this using npm list:
npm ls @capire/xflights-data
... which should display something like this:
samples@ ~/cap/samples
├── @capire/xflights-data@0.1.5 -> ./xflights/apis/data-service
└─┬ @capire/xtravels@1.0.0 -> ./xtravels
└── @capire/xflights-data@0.1.5 deduped -> ./xflights/apis/data-service
Run it
cds watch
Which should print something like that:
...
[cds] - server listening on { url: 'http://localhost:4114' }
[cds] - server v9.4.0 launched in 444 ms
[cds] - [ terminate with ^C ]
Cmd-click the http://localhost:4114 link in the terminal to open the app in a browser.
Additional Examples
For more (extensive) examples, have a look at the readme file in the xmpls folder.
License
Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This file 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
- plus agent-tooling and mcp-servers
- First seen.
For your agent
- Ref
artifact:capire-xtravels- JSON
- /artifacts/capire-xtravels.json
- MCP
- Connecting an agent