MCPcopy Index your code
hub / github.com/alexa/alexa-skills-kit-sdk-for-java

github.com/alexa/alexa-skills-kit-sdk-for-java @2.43.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.43.7 ↗ · + Follow
1,625 symbols 7,985 edges 271 files 932 documented · 57%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Alexa Skills Kit SDK for Java

The ASK SDK for Java makes it easier for you to build highly engaging skills, by allowing you to spend more time on implementing features and less on writing boiler-plate code.

Package Versions

Module Maven
ask-sdk Maven Central
ask-sdk-core Maven Central
ask-sdk-lambda-support Maven Central
ask-sdk-servlet-support Maven Central
ask-sdk-dynamodb-persistence-adapter Maven Central
ask-sdk-apache-client Maven Central
ask-sdk-freemarker Maven Central
ask-sdk-runtime Maven Central

Alexa Features Supported by SDK

Preview Features

The following features are released as public preview. The interfaces might change in future releases.

Technical Documentation

Models

The SDK works on model classes rather than native Alexa JSON requests and responses. These model classes are generated using the Request, Response JSON schemas from the developer docs. The source code for the model classes can be found here.

SDK Setup

The SDK uses slf4j-api. You need to provide your own logging binding. See: http://www.slf4j.org/manual.html#swapping

Samples

Hello World

This code sample will allow you to hear a response from Alexa when you trigger it. It is a minimal sample to get you familiarized with the Alexa Skills Kit and AWS Lambda.

Color Picker

This is a step-up in functionality from Hello World. It allows you to capture input from your user and demonstrates the use of Slots.

How To

This sample will walk first-time Alexa skill developers through all the required steps involved in creating a parameter-based skill using a template called ‘Minecraft Helper’. Ask how to craft an item in the game Minecraft, and this skill will give you instructions. The skill showcases:

  • Custom slot type: demonstrates using custom slot types to handle a finite set of known values
  • Dialog and Session state: Handles two models, both a one-shot ask and tell model, and a multi-turn dialog model.
  • Usage of ResourceBundle to handle internalization

City Guide

Template for a local recommendations skill. Alexa uses the data that you provide to offer recommendations according to the user stated preferences. This Skill showcases:

  • Custom slot type: demonstrates using custom slot types to handle a finite set of known values
  • Dialog and Session state: Handles two models, both a one-shot ask and tell model, and a multi-turn dialog model.
  • Usage of ResourceBundle to handle internalization
  • Calling external APIs from the skill.

Movie Quotes

This Alexa sample skill is a basic Movie Quotes Quiz skill that makes use of Template Resolver feature of the Java SDK. A user can open up the skill, select a movie from a list, and then hear partial quotes from the selected movie. Then, they have to complete the quote.

Pet Match

Pet Match matches the user with a pet. When launched, this Alexa Skill will prompt the user for the information it needs to determine a match. Once all of the required information is collected, it will send the data to an external web service which processes the data and returns the match. Through this workshop, you will learn how to use advanced Alexa Skills Kit features to create and configure an Alexa Skill and AWS Lambda. The skill showcases the usage of Request and Response interceptors.

Tutorials

States Quiz

This tutorial will guide you in building a fully-featured skill. The skill features Built-In and Custom slots, as well as state management. The skill you build with this tutorial can be customized to build your own game.

Airplane Facts

This tutorial will demonstrate how to write skills for Echo Show and Echo Spot in Java using the Alexa Skills Kit (ASK) SDK v2.

Pager Karaoke

This tutorial demonstrates 3 features of APL: the Pager Component, SpeakItem Command, and accessing device characteristics in the skill code.

Other Language Alexa Skills Kit SDKs

Alexa Skills Kit SDK for NodeJS

Alexa Skills Kit SDK for Python

Got Feedback?

Request and vote for Alexa features here!

Extension points exported contracts — how you extend this code

GenericExceptionHandler (Interface)
A handler for handling one or more types of exceptions thrown during the request processing lifecycle. @param h [19 implementers]
ask-sdk-runtime/src/com/amazon/ask/request/exception/handler/GenericExceptionHandler.java
RequestHandler (Interface)
Request handlers are responsible for handling one or more types of incoming requests. [19 implementers]
ask-sdk-core/src/com/amazon/ask/dispatcher/request/handler/RequestHandler.java
SkillServletVerifier (Interface)
Verifiers are run against incoming requests to verify authenticity and integrity of the request before processing it. [4 …
ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillServletVerifier.java
LocalDebugger (Interface)
Local debugger interface. [2 implementers]
ask-sdk-local-debug/src/com/amazon/ask/localdebug/LocalDebugger.java
GenericRequestHandler (Interface)
Request handlers are responsible for handling one or more types of incoming requests. @param input type. @param [19 implementers]
ask-sdk-runtime/src/com/amazon/ask/request/handler/GenericRequestHandler.java
EventsReceivedRequestHandler (Interface)
Request handler for EventsReceivedRequest requests. [19 implementers]
ask-sdk-core/src/com/amazon/ask/dispatcher/request/handler/impl/EventsReceivedRequestHandler.java
AlexaHttpRequest (Interface)
Provides container for server request that should be validated. [2 implementers]
ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/AlexaHttpRequest.java
WebSocketClient (Interface)
Represents a basic contract for websocket request execution. [2 implementers]
ask-sdk-local-debug/src/com/amazon/ask/localdebug/client/WebSocketClient.java

Core symbols most depended-on inside this repo

build
called by 480
ask-sdk-core/src/com/amazon/ask/builder/SkillBuilder.java
builder
called by 365
ask-sdk-core/src/com/amazon/ask/builder/SkillConfiguration.java
verify
called by 183
ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillServletVerifier.java
get
called by 154
ask-sdk-runtime/src/com/amazon/ask/response/template/loader/TemplateCache.java
builder
called by 72
ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/DynamoDbPersistenceAdapter.java
build
called by 72
ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/DynamoDbPersistenceAdapter.java
processRequest
called by 61
ask-sdk-runtime/src/com/amazon/ask/request/interceptor/GenericRequestInterceptor.java
execute
called by 51
ask-sdk-runtime/src/com/amazon/ask/AlexaSkill.java

Shape

Method 1,318
Class 212
Interface 88
Enum 7

Languages

Java100%

Modules by API surface

ask-sdk-core/tst/com/amazon/ask/request/PredicatesTest.java39 symbols
ask-sdk-core/tst/com/amazon/ask/response/ResponseBuilderTest.java32 symbols
ask-sdk-core/tst/com/amazon/ask/request/RequestHelperTest.java27 symbols
ask-sdk-core/src/com/amazon/ask/response/ResponseBuilder.java27 symbols
ask-sdk-runtime/tst/com/amazon/ask/request/dispatcher/BaseRequestDispatcherTest.java23 symbols
ask-sdk-runtime/src/com/amazon/ask/builder/impl/AbstractSkillConfiguration.java23 symbols
ask-sdk-core/tst/com/amazon/ask/attributes/AttributesManagerTest.java23 symbols
ask-sdk-core/src/com/amazon/ask/builder/SkillConfiguration.java22 symbols
ask-sdk-servlet-support/tst/com/amazon/ask/servlet/verifiers/SkillRequestTimestampVerifierTest.java21 symbols
ask-sdk-dynamodb-persistence-adapter/tst/com/amazon/ask/attributes/persistence/impl/PartitionKeyGeneratorsTest.java21 symbols
ask-sdk-core/tst/com/amazon/ask/dispatcher/DefaultRequestDispatcherTest.java21 symbols
ask-sdk-dynamodb-persistence-adapter/tst/com/amazon/ask/attributes/persistence/impl/DynamoDbPersistenceAdapterTest.java19 symbols

For agents

$ claude mcp add alexa-skills-kit-sdk-for-java \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page