Async skill api 1.0.0

Overview

The Skills Async API provides a way for developers to create more advanced conversation interactions with your Digital People, by allowing you to send and receive messages asynchronously. This provides more flexibility than the REST-based skill API when you want to go beyond simple request-response interactions.

Example applications can be streaming multiple messages in the same turn, or allowing the skill to send messages to the user proactively.

Messages consist of a name and a payload, as per AsyncAPI standards. Messages are sent over a websocket connection that persists through the session.

You can still implement the skill REST API Init and Delete project operations as part of your async skill if you need to do any project related processing.

Servers

  • ws://localhost:5000/wslocal

    Local WebSocket server for development and testing

Operations

  • RECEIVE /

    Operation IDreceiveMessage

    Available only on servers:

    Accepts one of the following messages:

    • #0conversation
      Message IDconversation
      object

      Payload schema for conversation messages. Conversation message from the user sent to the skill.

      Examples

    • #1sessionStart
      Message IDsessionStart
      object

      Payload schema for sessionStart messages. Message sent to the skill at the start of the session, can be useful to do processing or caching on a per-session basis.

      Examples

    • #2sessionEnd
      Message IDsessionEnd
      object

      Payload schema for sessionEnd messages. Message sent to the skill at the end of the session, can be useful to clean up session resources or do end-of-session processing

      Examples

  • SEND /

    Operation IDsendMessage

    Available only on servers:

    Accepts the following message:

    skillConversation
    Message IDskillConversation
    object

    Payload schema for skillConversation messages. Conversation message emitted by the skill to be sent to the user.

    Examples

Messages

  • #1SessionStart
    Message IDSessionStart
    object

    Payload schema for sessionStart messages. Message sent to the skill at the start of the session, can be useful to do processing or caching on a per-session basis.

  • #2SessionEnd
    Message IDSessionEnd
    object

    Payload schema for sessionEnd messages. Message sent to the skill at the end of the session, can be useful to clean up session resources or do end-of-session processing

  • #3UserConversation
    Message IDUserConversation
    object

    Payload schema for conversation messages. Conversation message from the user sent to the skill.

  • #4SkillConversation
    Message IDSkillConversation
    object

    Payload schema for skillConversation messages. Conversation message emitted by the skill to be sent to the user.