{"ref":"artifact:cap-js-ai","page":"/artifacts/cap-js-ai","json":"/artifacts/cap-js-ai.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"cap-js-ai","name":"@cap-js/ai","artifact_type":"cds-plugin","ecosystem":"cap","domain":"ai-and-agents","origin_ring":"sap-official","description":{"one_line":"Out-of-the-box value-help recommendations powered by SAP RPT-1, [SAP AI Core](artifact:btp-ai-core) as a standard CAP service, and an experimental local embedding model behind SQLite's vector functions.","short":"Value-help recommendations and SAP AI Core as a CAP service"},"links":{"npm":"https://www.npmjs.com/package/@cap-js/ai","repo":"https://github.com/cap-js/ai"},"compat":{"runtimes":["node"]},"type_properties":{"distribution":{"value":["npm"],"sources":[{"url":"https://github.com/cap-js/ai","title":"@cap-js/ai — README","checked":"2026-10-18","quote":"npm add -D @cap-js/ai @cap-js/sqlite@^3.1 @huggingface/hub \\"}]}},"provides":[{"capability":"capability:llm-integration","what_it_does":"UI recommendations powered by SAP AI Core, simplified access to SAP AI Core resources as a CAP service, and vector embedding support.","facets":[{"key":"model_access","value":"SAP AI Core","source":{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README","checked":"2026-10-15","quote":"@cap-js/ai adds UI recommendations powered by SAP AI Core, simplified access to SAP AI Core resources, and vector embedding support for CAP applications."},"sources":[{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README, Recommendations","checked":"2026-10-15","quote":"A production deployment requires an SAP AI Core service binding."}],"applies_to":{"ecosystems":["cap"]}}],"sources":[{"url":"https://github.com/cap-js/ai#readme","title":"cap-js/ai — README","checked":"2026-09-27","quote":"`@cap-js/ai` adds UI recommendations powered by SAP AI Core, simplified access to SAP AI Core resources, and vector embedding support for CAP applications."},{"url":"https://cap.cloud.sap/docs/plugins/#ai","title":"CAP plugins — AI","checked":"2026-10-15","quote":"Additionally, the AI Plugin embeds SAP AI Core as a standard CAP service following the Calesi pattern, giving you automatic service binding resolution along with tenant-aware access including managed resource groups and deployments."}]},{"capability":"capability:retrieval-augmented-generation","what_it_does":"Redirects the standard `sqlite` database so that `VECTOR_EMBEDDING` and the vector functions run against a local ONNX model, the current default being sentence-transformers/all-MiniLM-L6-v2. Without it, capire states that SQLite and H2 emulate `vector_embedding` with character-hash vectors, which match spelling rather than meaning, so this is what makes a similarity search on a laptop behave like the one on SAP HANA. The README declares it experimental and points production vector workloads at SAP HANA's vector engine, and capire scopes it to local development.","sources":[{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"In CAP Node.js, the `@cap-js/ai` plugin makes the standard `sqlite` database generate semantic embeddings locally, without any external service."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"It requires `@sap/cds` `^10.1` and `@cap-js/sqlite` `^3.1`, and is experimental and intended for local development only."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"On SQLite and H2, the `vector_embedding` function is emulated using lexical character-hash vectors by default."},{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README, Local vector embeddings with SQLite (experimental)","checked":"2026-09-21","quote":"Use SAP HANA's vector engine for production vector workloads."}]}],"requires":[{"ref":"artifact:sap-cds","for":"The runtime the plugin is loaded by: `@sap/cds` ^10.1 for the local embeddings on [SQLite](external:sqlite), while the package's other capabilities still support `@sap/cds` 9.","requirement":"required","sources":[{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README, local embeddings on SQLite","checked":"2026-09-22","quote":"This requires `@sap/cds` `^10.1` and `@cap-js/sqlite` `^3.1` (the package's other capabilities still support `@sap/cds` 9)."}]},{"ref":"artifact:cap-js-sqlite","requirement":"conditional","role":"local-embedding-database","condition":"The local vector embeddings are used: capire states the plugin requires @sap/cds ^10.1 and @cap-js/sqlite ^3.1 for them. The recommendations and the AICore service do not involve SQLite.","for":"The database the plugin redirects so that the vector functions run against a local ONNX model instead of the character-hash emulation.","sources":[{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"It requires `@sap/cds` `^10.1` and `@cap-js/sqlite` `^3.1`, and is experimental and intended for local development only."}]},{"ref":"artifact:btp-ai-core","for":"The service binding the recommendations need in a production deployment; without one, local development uses a mock implementation for UI smoke tests.","requirement":"conditional","condition":"The recommendations run in a production deployment; without the binding, local development uses a mock implementation for UI smoke tests.","sources":[{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README, Recommendations","checked":"2026-09-23","quote":"A production deployment requires an [SAP AI Core](https://help.sap.com/docs/sap-ai-core) service binding. Without one, local development uses a mock implementation for UI smoke tests."}]}],"provenance":{"discovered_via":[{"source":"source:npm"},{"source":"source:capire","channel":"plugins"}],"first_seen":"2026-08-31"},"maintainers":["actor:cap-js"],"contributors":["actor:danjoa","actor:dellagustin-sap","actor:schiwekm","actor:sirsimon04","actor:sjvans","actor:sleibach","actor:stefanrudi"],"history":[{"date":"2026-09-21","field":"provides","from":"capability:llm-integration","to":"capability:llm-integration, capability:retrieval-augmented-generation","reason":"capire's CAP-native Embeddings guide names this plugin as what makes the standard sqlite database produce semantic embeddings locally, and the README lists local vector embeddings as one of its features. The declared scope travels with the edge rather than being dropped from it: the README calls the facility experimental and sends production vector workloads to SAP HANA's vector engine."},{"date":"2026-09-21","field":"description.one_line","from":"Out-of-the-box value-help recommendations powered by SAP RPT-1, with AI Core as a standard CAP service.","to":"Out-of-the-box value-help recommendations powered by SAP RPT-1, [SAP AI Core](artifact:btp-ai-core) as a standard CAP service, and an experimental local embedding model behind SQLite's vector functions.","reason":"The line named two of the README's three features. The third is why the package now appears as an option on retrieval-augmented generation, so leaving it out of the index line would have made the option look unexplained."},{"date":"2026-09-21","field":"requires","from":null,"to":"artifact:cap-js-sqlite","reason":"capire states the version range the local embeddings need, @sap/cds ^10.1 and @cap-js/sqlite ^3.1. The database plugin is the one of the two that is an edge; the runtime range belongs to the plugin's own manifest, which was not read here."},{"date":"2026-09-22","field":"requires","from":"cap-js-sqlite","to":"+sap-cds, +btp-ai-core","reason":"npm run check:usecases listed the path of answer-a-question-from-records-in-a-cap-service this entry is a part of with no edge between its parts. The README names the runtime with a version range, quoted now. The second reader also named the README's conditional requirement on SAP AI Core for the recommendations in production, which had no edge; it has one now."},{"date":"2026-09-23","field":"requires[btp-ai-core].condition","from":"production only","to":"production; the mock is for UI smoke tests","reason":"The second reader's follow-up: the condition had dropped the README's qualifier, 'for UI smoke tests', and read as never needed outside production. The README's test section names the binding for this repository's own integration tests, which is a contributor's setup and not a requirement of an application using the plugin, so it is not a condition here."},{"date":"2026-10-15","field":"provides[llm-integration].facets","from":null,"to":"model_access: SAP AI Core","reason":"capability:llm-integration declared two comparison properties on 2026-10-15. This one is answered from the README's own opening line, re-read the same day, and from the sentence that names the binding a production deployment needs. The second property, response_streaming, is left absent: the README says nothing about streaming, and absent is not no."},{"date":"2026-10-15","field":"provides[llm-integration].sources","from":"the capire plugins page quoted as 'SAP AI Core as a standard CAP service following the Calesi pattern', checked 2026-08-31","to":"the same page's whole sentence, checked 2026-10-15","reason":"Re-read for the capability's impact assessment. The page still carries the claim, now in a longer sentence that also names the automatic service-binding resolution and the tenant-aware resource groups and deployments the coverage paragraph leans on, so the quote is the full sentence and the date is today's."}],"drafted_with_ai":true},"effective_normative_relations":[{"instrument":"instrument:sap-developer-license-3-2-cap","relation":"use-constrained-by","sections":["1","2","3"],"applies_when":"A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.","note":"This is inherited applicability, not a licence verdict about the artifact itself. Review the agreement for the actual materials and use; an explicit artifact relationship to another revision takes precedence.","scope":{"kind":"artifact"},"sources":[{"url":"https://cap.cloud.sap/resources/license/developer-license-3_2_CAP.txt","title":"SAP Developer License Agreement 3.2 CAP","checked":"2026-09-16","quote":"documentation, plug-ins, templates, scripts and sample code, libraries, software development kits"}],"inherited_from":"cap-plugins-and-applications","relevant_capabilities":["agent-systems-access","async-processing","data-import-export","database-connectors","deployment","destinations","llm-integration","mcp-servers","plugin-authoring","replication","retrieval-augmented-generation","rfc-connectivity"]}],"readings":{"liveness":[{"label":"Maintenance","tier":"good","evidence":"released this month"},{"label":"Continuity","tier":"good","evidence":"14 contributors, 3 publishers, org-owned"},{"label":"Repository","tier":"good","evidence":"pushed 2026-10, not archived"}],"compatibility":[{"label":"Declared for","tier":"good","evidence":">=9 — includes cds 10 and 9"},{"label":"Survived majors","tier":"good","evidence":"released before and after @sap/cds 10"},{"label":"Maintainer's CI","tier":"good","evidence":"CI green, 2026-10-23"}],"practice":[{"label":"Tests","tier":"good","evidence":"56 test files, npm test"},{"label":"Docs","tier":"good","evidence":"README 7 KB"},{"label":"Changelog","tier":"good","evidence":"CHANGELOG in the repo"}],"reach":[{"value":32584,"unit":"installs/week"},{"value":32,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-26","latest_version":"1.2.1","majors":{"1":{"version":"1.0.0","date":"2026-04-28"},"0.0":{"version":"0.0.0","date":"2026-04-27"}},"license":"Apache-2.0","first_release":"2026-04-27","last_release":"2026-10-14","releases":6,"cadence_days":37,"maintainers":3,"repository":"git+https://github.com/cap-js/ai.git","peer_cds":">=9","test_script":true,"types":false,"downloads_weekly":32584,"stars":32,"forks":5,"open_issues":11,"archived":false,"pushed_at":"2026-10-25","license_spdx":"Apache-2.0","org_owned":true,"default_branch":"main","contributors":14,"tree_truncated":false,"test_files":56,"workflows":7,"other_ci":false,"readme_bytes":7162,"docs_files":0,"changelog":true,"license_file":true,"dts_files":0,"ci_status":"success","ci_run_at":"2026-10-23","ci_workflow":"CI","ci_event":"push","readme_path":"README.md","readme_sha":"7f1d646239e69eca0ff0d869463e7a436623fcb5","months_since_release":0,"dormant":false,"repository_directory":null,"dependencies":0,"node_engine":">=20.0.0","downloads_monthly":99075,"created_at":"2026-02-11T13:10:51Z","open_prs":7,"first_commit":"2026-02-11","last_commit":"2026-10-23","commits":42,"repo_read":"2026-10-26"},"release_notes":{"license":"Apache-2.0","quotable":true,"source":{"kind":"npm","path":"CHANGELOG.md","version":"1.2.1","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md"},"format":"keep-a-changelog","releases":[{"version":"1.2.1","date":"2026-10-14","date_source":"heading","heading":"Version 1.2.1 - 2026-10-14","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md#version-121---2026-10-14","sections":[{"kind":"fix","heading":"Fixed","items":3}],"hash":"de14997a6dd339df"},{"version":"1.2.0","date":"2026-09-07","date_source":"heading","heading":"Version 1.2.0 - 2026-09-07","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md#version-120---2026-09-07","sections":[{"kind":"feature","heading":"Added","items":2}],"hash":"ccacdfe11debd742"},{"version":"1.1.0","date":"2026-07-20","date_source":"heading","heading":"Version 1.1.0 - 2026-07-20","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md#version-110---2026-07-20","sections":[{"kind":"feature","heading":"Added","items":1},{"kind":"change","heading":"Changed","items":1},{"kind":"fix","heading":"Fixed","items":5}],"hash":"aeb63b21d40796c6"},{"version":"1.0.1","date":"2026-05-08","date_source":"heading","heading":"Version 1.0.1 - 2026-05-08","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md#version-101---2026-05-08","sections":[{"kind":"fix","heading":"Fixed","items":1}],"hash":"33a025dfc274f4a6"},{"version":"1.0.0","date":"2026-04-28","date_source":"heading","heading":"Version 1.0.0 - 2026-04-28","url":"https://github.com/cap-js/ai/blob/main/CHANGELOG.md#version-100---2026-04-28","sections":[{"kind":"feature","heading":"Added","items":4}],"hash":"d71602fbc6a1b598"}],"versions":[{"version":"1.2.1","date":"2026-10-14"},{"version":"1.2.0","date":"2026-09-07"},{"version":"1.1.0","date":"2026-07-20"},{"version":"1.0.1","date":"2026-05-08"},{"version":"1.0.0","date":"2026-04-28"},{"version":"0.0.0","date":"2026-04-27","deprecated":"This release was a dummy release and should not be used"}],"crawled_at":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:cap-js","name":"SAP Cloud Application Programming Model","json":"/actors/cap-js.json"}],"contributors":[{"ref":"actor:danjoa","name":"Daniel Hutzel","json":"/actors/danjoa.json"},{"ref":"actor:dellagustin-sap","name":"Guilherme Dellagustin","json":"/actors/dellagustin-sap.json"},{"ref":"actor:schiwekm","name":"Marten Schiwek","json":"/actors/schiwekm.json"},{"ref":"actor:sirsimon04","name":"Simon Engel","json":"/actors/sirsimon04.json"},{"ref":"actor:sjvans","name":"sjvans","json":"/actors/sjvans.json"},{"ref":"actor:sleibach","name":"Sören Leibach","json":"/actors/sleibach.json"},{"ref":"actor:stefanrudi","name":"Stefan Rudi","json":"/actors/stefanrudi.json"}],"explained_by":[{"ref":"content:cap-in-the-age-of-ai-7-vector-embeddings-wrap-up","name":"CAP in the age of AI #7 - vector embeddings wrap-up","json":"/content/cap-in-the-age-of-ai-7-vector-embeddings-wrap-up.json"},{"ref":"content:devtoberfest-2026-cap-the-road-ahead","name":"CAP: The Road Ahead - Simplicity in an AI Era","json":"/content/devtoberfest-2026-cap-the-road-ahead.json"},{"ref":"content:ai-powered-user-experience-with-sap-cap-ai","name":"Enhancing Enterprise Applications: AI-powered User Experience with SAP CAP AI Plugin","json":"/content/ai-powered-user-experience-with-sap-cap-ai.json"}],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}