Making conversational agents - one step at a time.
## Converse
Making conversational agents - one step at a time
### Overview
[ Docs are be a bit outdated ]
Created by Mary.Africa, this tool makes it possible to create conversational agents of any form.
From purely-rule based to full-fledged NLP enhanced.
### Terminologies:
It's important to understand the terminologies that are used during the **development** process. Possibly in the future, we'll be working on creating better documentation and information about the project.
Terms:
- **Agent** - The conversational tool / bot / chatbot, which is the main interface of the project.
To use an agent:
```ts
import Agent from 'converse-core'
const ddo = ...
const config = ...
const context = ...
const agent = new Agent(ddo, config, context)
```
- **Dialogue Definition Object (DDO)** - This is the object that defines how to build the *agent*. This would have information like what are the responses it should take. How should it attempt to match the user text, and so on.
Example of a simple DDO
```ts
{
fallbackText: "This is a fallback text",
dialogues: {
'bookDialogue': {
start: 'ask-room',
nodes: {
"ask-room": {
text: "Unataka kupangisha chumba aina gani?",
matcher: 'room-selector'
with: {
room_options: [ 'standard', 'king', 'family' ]
}
goTo: "done"
},
"done": {
text: "Haya, imetosha. Ungependa kurudia?",
matcher: "yes_no",
goTo: '$'
}
}
},
},
intentions: {
'greet': {
toMatch: ['salama', 'habari', 'jasiri'],
response: 'Habari zako kijani!',
},
'room-book': {
toMatch: ["nataka kupanga chumba", "nataka chumba"],
dialogueKey: 'bookDialogue'
},
},
}
```
- **Mutation** - These are the modification of input that you want your agent to perform as it's processing the input given to the created agent
Here is an example of mutation to remove whitespace around an input and lowercase any input sent to the agent:
```js
const agent = new Agent(...)
agent.setMutation('preprocess', (input) => input.trim().toLowerCase())
...
```
- **Action** - These are actions that can be set …