NaifJs is a simple state-machine based (task-oriented) dialog manager micro-framework for nodejs developers.
The project consists in:
- A run-time dialog manager, as a module to be embedded as part of a container dialog system
- A micro-framework development environment
(
naif
command line program) to create and quickly test dialogues.
Naifjs is based on a specific conceptual model and a domain specific language (DSL) I conceived, implementing multi-turn contextual dialogues as "state machines", graphs of internal states.
Following paragraph introduces main concepts and naming conventions. I define what is a dialog system, a dialog manager, a single dialog unit, the end multi-dialog application:
-
Dialog system
-
State-machine based dialog manager
-
What is a dialog unit
-
Application
The full documentation is available here.
The package contains command line interface program naif
, so you must install the npm package as global:
-
use npm package manager repo
$ npm install -g naifjs
-
or download this github repo:
$ git clone https://github.com/solyarisoftware/naifjs $ cd naifjs && npm link
NaifJs act as an API library of functions to be called by a main nodejs program. See:
- API cheat sheet: list of available functions
- Application examples some application examples
- Documentation content index some application examples
- Workflow design/development phases
The NaifJs API are foundation for a micro-framework development environment
(the naif
command line program) to create the end application, generate dialog units skeleton code and quickly test dialogues:
naif
is the main command line programnaif init
initializes project directorynaif generate
generate the code skeleton of a dialog unitnaif show
for a given project, lists all dialog units and relative statesnaif shell
test a dialog unit using the command line interfacenaif telegram
test a dialog unit, setting up on the fly a telegram bot for the purpose
Currently the project is just a proof of concept, not ready for production. The software made is just a prototype, in alpha stage.
MIT (c) Giorgio Robino