
Bottery – A conversational agent prototyping platform - manojlds
https://github.com/google/bottery
======
jeswin
Last year, we had built almost the same thing. It's Open Source but
unfortunately, haven't added any documentation (will do when I get time) -
[https://github.com/yak-ai/wild-yak](https://github.com/yak-ai/wild-yak)

Lessons learnt:

\- Works much better than AI driven bots at the moment

\- Don't pretend to do intelligent things. Be just a dumb textbot.

\- Force people into selecting options as much as you can

\- When accepting data as text, give an example of what they should type

\- Fancy Cards and Carousels are crappy UX. Stick to text.

\- Super powerful when exposed to semi-technical users. Basically CLI for non-
computer folks.

\- An effective UI pattern for desktop usecases is to have a messenger pane on
the left (or right), and a larger details window next to it. eg: You could
say- tickets to Tokyo, and the right pane would display a bunch of options.

~~~
LiweiZ
The first link is showing 404.

~~~
emilfihlman
Remove the (oddly added) trailing _

~~~
dopamean
Is it just me or did whatever text you added at the end of this cause the
"reply" link to become italicized?

~~~
detaro
Not just you. in the right edge case, open italicization at the end of a
comment can cause that in at least some browsers. (I found this a few months
back and told the mods, and if I remember right it didn't happen in their
browser so there was some confusion at first)

------
jaymzcampbell
Creating the rules for it reminds me a little bit of writing a text adventure
game from days gone by:

    
    
        ...
        name: {
          onEnter: "'What do you want to name your kitten?'",
          exits: "'*' ->respond_to_name name=INPUT",
        },
        respond_to_name: {
          onEnterSay: "The kitten purrs happily, I guess it likes the name #/name#!",
        },
        ...
    

The readme for it is nice and detailed which I always appreciate and it's
turned me onto [http://tracery.io/](http://tracery.io/), which I'd not heard
of but looks like a lot of fun ( _" A super-simple tool and language to
generate text"_).

~~~
Rabidgremlin
I have been building/running a pretty successful chatbot for a large corporate
for over a year now. We use Inkles Ink to script the conversation flows and
maintain state. Works very very well.
[https://github.com/inkle/ink](https://github.com/inkle/ink)

~~~
joethephish
Hey - @joethephish here from inkle! Really cool to to hear that you're using
ink for that :) Would love to know more detail about where this is being used
if you're able to share!

~~~
Rabidgremlin
Hiya. So the Chatbot is Oscar, Air New Zealand's chat bot. Here is a recent
press release about him: [https://www.airnewzealand.co.nz/press-
release-2017-air-nz-ch...](https://www.airnewzealand.co.nz/press-
release-2017-air-nz-chatbot-oscar-gday-australia)

------
_Marak_
It would have been nice to see an update to Tracery. It's been over two years
since Tracery was updated and it's still not available as a CommonJS module:
[https://github.com/galaxykate/tracery](https://github.com/galaxykate/tracery)

It looks like Bottery is using a custom Tracery build which has no
documentation: [https://github.com/galaxykate/tracery-
sugar](https://github.com/galaxykate/tracery-sugar)

The reason I bring this up is because we've had multiple developers ask us to
integrate Tracery into another popular open-source project and we couldn't
really do it without making a new heavy fork of the project.

~~~
lazerwalker
FWIW, I've used [https://www.npmjs.com/package/tracery-
grammar](https://www.npmjs.com/package/tracery-grammar) before. It's
maintained by the creator of Cheap Bots Done Quick, which the creator of
Tracery pretty explicitly endorses (she calls CBDQ out as an inspiration for
Bottery)

~~~
_Marak_
Thanks. We tested with that fork as well. It's based off the old version of
Tracery and also has no unit tests.

If use-case was for building an application or bot, I'd probably not worry as
much. We were considering vendoring tracery into open-source project for
improving a core API method for composing data.

If anyone is interested in helping here is the issue:
[https://github.com/Marak/faker.js/issues/495](https://github.com/Marak/faker.js/issues/495)

------
yebyen
For a hackathon a couple of years back, we wrote a module for Hubot for Slack
integration that was conversational. It was absolutely incredible how
difficult it was to get Hubot to have a simple scripted conversation and
remember any context about how much of the conversation had already taken
place (I think because it's supposed to be context-free?)

We wound up using Hubot-Brain (Redis brain) as a place to build and store the
context of the conversations that were taking place. Each time you entered a
statement that triggered a new conversational context, Hubot would record the
context that you triggered with a tag for your name.

The goal was actually to have a robot that you could use to help people form
teams at Hackathons. The event I was at was at an unfamiliar college, where I
worked with some people I hadn't met before, who didn't share any languages
experience in common with each other or myself.

The organizers created a Slack for the event organizing but nobody really used
it, and we thought, wouldn't it be cool if everyone who was in the same
position as we were could have somehow formed teams in an organized way,
without having to go through the awkward experience of having to walk up to
people, find out what you have in common, ... and then saying goodbye and
walking away if it turns out that you don't have enough in common to
reasonably be able to start working together?

We did wind up making Hubot conversational[1], but I wish we had known before
we started that there were absolutely zero extant "conversation-style" plugins
for Hubot and we were going to have to build that completely from scratch.
Would have been great if we had something like this to start with (we might
have been able to finish in 24 hours!)

[1]: [https://github.com/kingdonb/hubot-
malta/](https://github.com/kingdonb/hubot-malta/)

------
andrewingram
I've been looking at building on top of Ink (by my friends at Inkle) for this
kind of thing, but it's good to see other solutions to this problem.

[https://github.com/inkle/ink](https://github.com/inkle/ink)

~~~
Rabidgremlin
I have been doing this with a large chatbot (350+ conversation topics,40k
words of regionalized content) and it works fantastically well. Core of bot
brain is open source
[https://github.com/rabidgremlin/Mutters](https://github.com/rabidgremlin/Mutters)

------
azinman2
This is a clear example of why “AI” is so overhyped at the moment. Watson,
api.ai, etc all use such super basic state machines and transitions that are
as far away from “AI” as possible. There’s nothing natural about this
conversation, and there’s certainly no understanding or learning happening. It
makes me mad that bots are a hot topic given there’s nothing new or
revolutionary happening to enable them.

~~~
opportune
Well, I think this is simply a matter of how you see AI. The colloquial
understanding of AI is something that is able to generally "think" like a
human. To them, and perhaps to you too, the goal of AI is to emulate a human.

I think to most AI researchers, AI is seen more as a way to "emulate"
intelligence to solve problems - usually problems formulated as "generally" as
possible. To the AI researcher, if an incredibly complex modeling approach to
a problem performs just as well as a very general one, one model is not
strictly better than the other (actually, the more general one is almost
always is considered to be), even if one may "theoretically" model how the
human mind processes the problem more accurately. Likewise, a bot capable of
answering general "getter" questions such as "What is the weather?" may not
have a sexy or complicated implementation, and yet could be considered good AI
for its problem domain, and may in fact be much more useful than a more
sohpisticated bot.

There's actually a lot of work being done on chat bots, and I think perhaps
you are limiting your understanding of what is being done to tutorials or toy-
projects.

------
ericmarcos
This is extremely similar to BotSON
([https://hubtype.github.io/botSON](https://hubtype.github.io/botSON)), but it
looks a bit more complex (disclaimer: I'm one of the authors of BotSON). I
encourage you to try it and reach me out with comments at eric at hubtype dot
com. I'd love to hear some feedback from the HN community =)

------
rougeth
They got the name of a framework I'm building :/
[https://github.com/rougeth/bottery](https://github.com/rougeth/bottery)

~~~
jicks
Except it's the other way around. Their repo is 6 months older than yours.

~~~
rougeth
But it was published after mine.

~~~
_Marak_
Try not to be discouraged. I wouldn't worry too much about it.

You should be okay keeping the Bottery name. I don't see this project as
something Google will be supporting in the long or mid-term.

~~~
rougeth
Thanks for your comment :)

------
staticautomatic
Has anyone built a bot for forums? I would LOVE to see a forum where all the
threads were started by bots and contained bot conversations on whatever
topics.

~~~
drusepth
You might be interested in /r/SubredditSimulator [1], where only bots are
allowed to post and each bot there has been trained off a single (other)
subreddit.

[1]
[https://www.reddit.com/r/SubredditSimulator/](https://www.reddit.com/r/SubredditSimulator/)

------
dpweb
It's fun using state machines, perfect for bot-making. In learning how to make
a Messenger bot, state machine appeared very quickly as the thing to do.

Thinking in those terms I would think would be a great way to teach
programming.

~~~
Eridrus
State machines are a great place to start, but are pretty confining for users.
If you've asked a user for some info, they may reasonably want to ask you a
question rather than provide that info.

You can often get away with a state machine, but it is definitely not the path
to natural conversations.

~~~
atrilumen
I'm pretty excited about Rasa Core: [https://medium.com/rasa-blog/a-new-
approach-to-conversationa...](https://medium.com/rasa-blog/a-new-approach-to-
conversational-software-2e64a5d05f2a)

------
vog
This reminds of an old project of myself and a friend around 2001-2003 (yes,
it is still hosted on SourceForge):

DAVIS - Dj's and Volker's IRC-Script

[http://davis.sourceforge.net](http://davis.sourceforge.net)

Of course, our language was specific to IRC bots and very ad-hoc. But it had a
very fast interpreter written in ANSI C that had beaten all EggDrop IRC bots
in terms of speed any day. (Back then, EggDrop was the common choice for
creating IRC bots.)

------
netinstructions
Is this what they use when customers interact with Google's product support?

(Not joking) - [https://productforums.google.com/d/msg/phone-by-
google/yk2qU...](https://productforums.google.com/d/msg/phone-by-
google/yk2qUu6cbaU/-coXPeMcAgAJ)

------
mbrookes
Anyone figured out how to get this working? I was able to open the index.html
in Chrome to see the various panels, but not to load a bot.

I tried pasting the relevant parts from the a raw bot file, but it wouldn't
run.

Also, having developed and simulated, how would one use the resulting bot in
production?

~~~
yothisisalex
ya there are CORS issues if you just open the html file, you have to have a
server to serve them instead. Try something like `python -m SimpleHTTPServer
8000` and then visit `[http://localhost:8000/`](http://localhost:8000/`) and
you'll be able to see content in the panels and interact w/ the bots.

~~~
mbrookes
That did the trick, thanks.

------
pantulis
It is my understanding that this is like Invision but for chatbots. The cool
thing would be integrating this with something like Dialogflow (previously
known as API.ai)

------
corpMaverick
The project looks cool. Does it have any applications beyond being able to
talk about kittens ? I love kittens, nothing wrong with that.

------
wiradikusuma
Can I safely say that it's like Chatfuel ("a bot platform", instead of Api.ai
which is more NLU) but text-only?

------
obaid
We have been working on building a conversation prototyping tool for non-
developers at Botmock ([https://botmock.com](https://botmock.com))

Our approach has been to give a tool that enables people to create a true
prototype and quickly test it before spending time developing it.

Thanks for sharing this (and other solutions like Wild Yak etc).

~~~
rboyd
this looks great. is the graph editor implementation that you used in botmock
custom homegrown stuff, or is that an opensource component? something like
this would be useful for a workflow modeling tool I've been thinking about for
one of my clients.

------
k_vi
So this is a more developer friendly version of AIML?

------
lambda
> (This is not an official Google product)

It appears that Google's policy is that all open source personal projects be
hosted under its GitHub account. Thus, I think "Google open sources" is a bit
misleading; that implies that it's an official project being used by Google,
whereas this just looks like a personal project being hosted by Google due to
their requirements.

~~~
callmekatootie
I am also confused with that statement because the files appear to have Google
Copyright in them. Example
[https://github.com/google/bottery/blob/master/js/bots.js](https://github.com/google/bottery/blob/master/js/bots.js)

So its not official Google Product yet has Google Copyright. Not sure how that
works.

~~~
breakingcups
A Googler once told me that any code he writes during his employment with
Google belongs to Google copyright-wise.

If they want to open source anything they have to ask Google for permission.
It doesn't _have_ to be hosted under the Google GitHub organization though
(take Camlistore[1] as an example, although their primary repository is still
hosted at googlesource.com).

This also means that if you want to contribute code to an open source project
started by a Googler you will have to sign the Google CLA.

1: [https://camlistore.org/](https://camlistore.org/)

~~~
maxton
I don't think that's true for every project, as I have contributed to an open-
source project[1] started by a Googler, and never had to sign a CLA, nor is
the project hosted under the Google Github org.

1: [https://github.com/benvanik/xenia](https://github.com/benvanik/xenia)

