---
schema_version: "1"
id: 1dac9927cad657971208897ee5862098987c7db410ea80785d91fd2b84f7a1ea
title: Einstein Bots SDK
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/bot-api/einstein-bot/guides/sdk/sdk-overview.md
canonical_url: https://developer.salesforce.com/docs/service/einstein-bot-api/guide/sdk-overview.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 644055612ab4a50dbe2b73a0b8e5cc0942dd06e8a7e67f2b782cd05211b64597
products:
  - Einstein Bots API and SDK
  - Enstein Bot API and SDK
---
# Einstein Bots SDK

Use [Einstein Bots API](https://developer.salesforce.com/docs/service/einstein-bot-api/api/api-overview.md) (Beta) to link your external messaging channels with your Einstein Bots. Use the Einstein Bots Java SDK to integrate your channel with the Einstein Bots API. This SDK guide is for API version 5.

If you use [Spring Boot](https://spring.io/projects/spring-boot), you can connect your app to the SDK through the [Channel Connector Framework](https://developer.salesforce.com/docs/service/einstein-bot-api/channel-connector/connector-overview.md). If not, use the SDK directly.

**note:** For SDK and channel connector framework updates, see the [API Release Notes](/docs/service/einstein-bot-api/references/about/api-release-notes.html).

The Java SDK simplifies integrating your service client with the bot’s REST API. Here are the features that the SDK provides.

- Authentication mechanism

  - : Einstein Bots API requires the client to authenticate requests using OAuth. The SDK uses the [JWT Bearer OAuth Flow](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_jwt_flow.htm&type=5) as a default, but any OAuth flow can be used to get the access token. See [AuthMechanism interface](https://github.com/forcedotcom/einstein-bot-sdk-java/blob/master/src/main/java/com/salesforce/einsteinbot/sdk/auth/AuthMechanism.java).

- Session management

  - : You only need the external session ID, such as a Twitter thread ID, to track the bot session. The client maps the external session ID to the internal session ID in the cache. The Einstein Bots API has separate calls to start a session and send subsequent messages. The session-managed client simplifies the calls by having one method to start and continue a session.

- Caching mechanism

  - : The SDK uses a cache to store the mapping between the `ExternalSessionId` and internal `RuntimeSessionId`. We support the Redis cache manager by default. You can implement additional caching methods with the [Cache interface](https://github.com/forcedotcom/einstein-bot-sdk-java/blob/master/src/main/java/com/salesforce/einsteinbot/sdk/cache/Cache.java).

- DTO classes

  - : The SDK provides DTO classes with strict type checking to serialize and deserialize JSON request and response bodies.

- DSL-style methods

  - : The SDK provides DSL-style methods so that you can write more readable code.
