> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sap integrations

> Integrate with Sap using LangChain Python.

> [SAP SE(Wikipedia)](https://www.sap.com/about/company.html) is a German multinational
> software company. It develops enterprise software to manage business operation and
> customer relations. The company is the world's leading
> `enterprise resource planning (ERP)` software vendor.

## Installation and setup

We need to install the `@sap/hana-langchain` package along with its peer dependencies.

<CodeGroup>
  ```bash npm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  npm install @sap/hana-langchain @langchain/core@latest @langchain/classic@latest langchain@latest
  ```

  ```bash yarn theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  yarn add @sap/hana-langchain @langchain/core@latest @langchain/classic@latest langchain@latest
  ```

  ```bash pnpm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  pnpm add @sap/hana-langchain @langchain/core@latest @langchain/classic@latest langchain@latest
  ```
</CodeGroup>

## Vectorstore

> [SAP HANA Cloud Vector Engine](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-vector-engine-guide/sap-hana-cloud-sap-hana-database-vector-engine-guide) is
> a vector store fully integrated into the `SAP HANA Cloud` database.

See a [usage example](/oss/javascript/integrations/vectorstores/sap_hanavector).

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { HanaDB } from "@sap/hana-langchain";
```

## Self Query Retriever

> [SAP HANA Cloud Vector Engine](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-vector-engine-guide/sap-hana-cloud-sap-hana-database-vector-engine-guide)
> also provides a Self Query Retriever implementation using the `HanaTranslator` Class.

See a [usage example](https://pypi.org/project/langchain-hana/).

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { HanaTranslator } from "@sap/hana-langchain";
```

## Graph

> [SAP HANA Cloud Knowledge Graph Engine](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-knowledge-graph-guide/sap-hana-cloud-sap-hana-database-knowledge-graph-engine-guide)
> provides support to utilise knowledge graphs through the `HanaRdfGraph` Class.

See a [usage example](/oss/javascript/integrations/graphs/sap_hana_rdf_graph).

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { HanaRdfGraph } from "@sap/hana-langchain";
```

## Chains

A `SparqlQAChain` is also provided which can be used with `HanaRdfGraph` for SPARQL-QA tasks.

See a [usage example](/oss/javascript/integrations/chains/sap_hana_sparql_qa_chain).

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { HanaSparqlQAChain } from "@sap/hana-langchain";
```

## Agents

A `HanaSparqlQAAgent` can generate and execute SPARQL queries iteratively over `HanaRdfGraph`, including ontology retrieval and self-correction.

See a [usage example](/oss/javascript/integrations/agents/sap_hana_sparql_qa_agent).

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { HanaSparqlQAAgent } from "@sap/hana-langchain";
```

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/providers/sap.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
