Home › Documentation

Documentation

Everything you need to build your first voice conversation with Violet.

Installation

Violet is distributed on npm. Add it to a Node.js project with:

$ npm install violet-conversations --save

Your first script

A Violet app is a script that describes a conversation. You register goals, describe what the user might say, and resolve each turn with a response:

var violet = require('violet').script();

violet.respondTo({
  expecting: ['Hello', 'Hi Violet'],
  resolve: (response) => {
    response.say('Hello! How can I help you today?');
  }
});

module.exports = violet;

Core concepts

Next steps

Browse the full API reference for every module and class, read the release notes to see how the engine has evolved, or grab the source on GitHub.