For more info, see: JSON Interface Reference for Custom Skills

Handling Requests



Set to your skill’s application ID, found in the Alexa dev portal.

echokit.verify_application_id = True

If True, will verify the application ID in each request against echokit.application_id, logging an error and raising a ValueError exception upon mismatch. If False, will ignore the ID and continue as normal.

echokit.handler(event, context)

Handles incoming Lambda requests and routes them to the appropriate function based on the @echokit.on_session_launch, @echokit.on_session_ended, @echokit.on_intent() and @echokit.fallback decorators.

Assign handler == echokit.handler in your main module and set [your_module].handler as the handler in your Lambda function’s configuration.


echokit.ask(speech, reprompt=None, ssml=False, session_attributes=None)

Ask the user a question. By default, shouldEndSession is False

  • speech (str) – OutputSpeech text for response
  • reprompt (str) – OutputSpeech text to reprompt the user
  • ssml (bool) – True if speech text is in SSML format (default: False)
  • session_attributes (dict) – Session attributes to set
echokit.tell(speech, ssml=False)

Tell the user something. By default, shouldEndSession is True. Additions can be made via the ASKResponse methods, such as adding a card like echokit.tell('Hi').simple_card('Hello!', 'How are you?')

  • speech (str) – OutputSpeech text for response
  • ssml (bool) – True if speech text is in SSML format (default: False)
class echokit.ASKResponse

Base class for responses. echokit.ask() and echokit.tell() are convenience methods which generate this class.

Parameters:end_session (bool) – True or False to end the session
simple_card(title=None, content=None)

Attaches a Simple type card to your response

standard_card(title=None, text=None, small_image_url=None, large_image_url=None)

Attaches a Standard type card to your response

  • title (str) –
  • text (str) –
  • small_image_url (str) –
  • large_image_url (str) –

Attaches a LinkAccount type card to your response

Parameters:session_attributes (dict) – Session attributes to set in your response
reprompt(speech, ssml=False)

Attaches a reprompt to your response

  • speech (str) – Speech text
  • ssml (bool) – Set to True if using SSML
speech(text, ssml=False)

Attaches OutputSpeech to your response

  • text (str) – Speech text
  • ssml (bool) – True if speech text is in SSML format


import echokit

handler = echokit.handler
echokit.application_id = "my_app_id"



Designates handler function for LaunchRequest


Designates handler function for a SessionEndedRequest


Designates handler function for an IntentRequest matching intent_name

Parameters:intent_name (str) – Name of the intent to handle (
@echokit.slot(name, dest=None)

Causes the value of the slot to be passed to your function as keyword param name, or one set in dest (ex: if an IntentRequest sends you a slot named ‘manufacturer‘ in your interaction model, set @slot(name='manufacturer') and its value will be passed).

  • name (str) – Name of the slot received in the request (by default, will be passed to your function as a keyword argument)
  • dest (str) – (Default: None) Set to change the keyword argument passed to your function

Designates the handler function for any IntentRequest whose name doesn’t have an associated handler via @echokit.on_intent(). If not used, will default to:

echokit.fallback_default(request, session)

The default handler for incoming intent requests where the intent name doesn’t match anything handled via @echokit.on_intent() and no handler has been specified via @echokit.fallback.

Returns:PlainText speech: “Sorry, I didn’t understand your request
Return type:Response


Handler functions should accept a single argument, which will be a wrapper for the request/session/context/version received. If you use the @slot decorator, it should accept the slot’s name or the value set for dest:

def session_started(request_wrapper):
    return echokit.ask('You just started a new session!')

@echokit.slot('MenuItem', dest='menu_item')
def order_intent(request_wrapper, menu_item):
    request = request_wrapper.request
    return echokit.tell(f"You just ordered {menu_item}")\
        .simple_card(title="Previous order", content=menu_item)

Indices and tables