'Beyond Bitshares' - An open source Google Assistant bot! (WIP)

in bitshares •  2 years ago  (edited)

'Beyond Bitshares' - An open source Google Assistant bot!

In my last couple Steemit posts, I wrote about developing a HUG REST API for the read-only python-bitshares functions in order to expose said functionality for public Bitshares service utilization.

Given the open source nature of the HUG REST API & the in depth installation documentation, anyone can utilize the tech for whatever Bitshares project they're interested in implementing.

My next Bitshares project is a Google Assistant, this will potentially expose millions of new users to Bitshares through their mobile phones, their watches (in the future) and their dedicated google home devices. It will be first launched in English, and translated into multiple languages once in a production state.


Bitshares HUG REST API

The Bitshares HUG REST API repo provides the Bitshares network an open-source high performance interface to the Bitshares network through simple GET requests.

We will be interacting with the HUG REST API server directly using NodeJS hosted on Firebase Cloud Functions (see below).


For each 1 CPU, we can get between 2-4 workers to interact with NodeJS function calls, so each CPU should serve approx 10-15 Google Assistant users. I currently use Vultr which has reasonable pricing for VPS, I'm currently paying $10/month for a single core VPS to host the HUG server.

Oxarbitrage's "BPAB - Bitshares Python Api Backend"

My Bitshares HUG REST API does not provide some of the more advanced functionality than that which Oxarbitrage's "BPAB - Bitshares Python Api Backend" provides.

In the future, I'll investigate original (non copy/pasted) HUG implementation, however for the short term I will likely utilize this API for the following functions:


I'll be utilizing Dialogflow (formerly API.AI, bought by Google in 2017) to handle the interpretation of user input, producing rich entities (for the fees & about section for now, perhaps assets later) and to build the intent functionality/logic which is effectively the skeleton of the Google Assistant.

With Dialogflow, you create an intent and provide it 'User says' information such as "Show me the current USD:BTS orderbooks" and Dialogflow will detect which intent to trigger (the orderbook intent), as well as extract the trading pair (USD:BTS in this case) for providing as input to NodeJS (and subsequently the HUG REST API).

What I find most difficult about using DialogFlow currently is that users don't have to follow set out paths through the bot, they can trigger any area of the bot (unless certain steps are mandatory) so you need to account for the user being in one area of the bot's functionality then jumping to another area without bringing along historical data from the previous intent/function which could glitch the operation of the bot unexpectedly. You have to program defensively against this issue whenever expecting input from the user.

For the first version of the bot, once the user is provided information they will be force-quit out of the bot (using app.tell()) rather than asking them what they want to do next. The reason for this is that when you ask (app.ask()) what they want to do next, you need to provide a fallback intent (if they provide invalid user input, re-prompting as error handling) for each intent (at the moment there's approx 28 such intent functions) so their coding right now would be throwing thousands of lines of template code in without real functionality - so it's on the back burner for now!

Pricing: FREE!

Repo link: BeyondBitshares-Dialogflow


I'll be utilizing Firebase's cloud function hosting to provide Dialogflow the webhook fullfilment required to communicate with once the user has triggered intents through the Google Assistant application/device.

Code hosted on the Firebase cloud function platform is programmed in NodeJS, it's not too difficult to be honest, difficulties arise in the lack of complete documentation (likely to be fixed by Google & its community) and the fact that we'll we working with a single huge NodeJS script (instead of many files).

With the current template code in place (only about 10% complete the current functionality), the line count is already over 2000 lines so it'll probably end up 4000 lines before we start throwing in additional language support.


Since we're going to be interacting with the Bitshares HUG REST API (an external networked service), we cannot use Firebase's free tier (only allows external networking to Google services). The cheaper option for now is to pick the 'Blaze Plan'.

Repo link: BeyondBitshares-Firebase


I've open sourced this entire project using the MIT license (both the Dialogflow and the NodeJS web fulfillment code components). The HUG REST API code is already MIT licensed on GitHub.

With this project anyone will be able to fork and run their own clone of the Beyond Bitshares bot. Hopefully rather than immediately forking and competing though we'll work on the one bot together :)


  • Potentially update HUG REST API to include 'success' fields when everything went well, we're already checking for this in the Firebase code.
  • Work on each of the intent's functions, interacting with the data retrieved from HUG. This is probably the largest area of work right now.
  • Work on each intent's "User says" sections, including the handling of parameters (Account, Asset, Worker, Committee member, etc..).
  • Move from App.Tell() (force quitting after fulfilling user request) to App.Ask() to continue the user's interaction with the bot.
    • This will require providing each intent with a fallback intent, probably a thousand lines of near duplicate code unless I can squish it down somehow..
  • Investigate Asset entity generation, so that USD can be called by 'USD, bitUSD, united states dollar market pegged asset, USD smartcoin, etc...).


I'd love to hear your thoughts about this project, anyone interested in using or helping develop this bot? Do you think this will be beneficial for the Bitshares network?

What are your initial impressions of the Google Assistant compared to other bots?

Do you have your own ideas for a Google Assistant bot?

Best regards,

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

God bless you.

Holy crap this is incredible. I have thought Bitshares had a lot of potential for a while now, but nothing close to this.

Hi @slapbox, I own tons of BTS since 5 cents.
If you want to invest and learn Crypto's?
@haejin and/ or https://www.cryptosclass.com/

Could quite easily create a similar HUG REST API for Gridcoin & provide a similar Google Assistant. The difficulty would be establishing and maintaining accurate BOINC statistics & how to serve this data up efficiently.

it's very very very very very very good.....I don't understand anything but the pictures seem cool...but I believe you should add naked girls

with big boobs like Pamela Anderson

Wow. This is just so far beyond my abilities, I can hardly begin to understand how this works, but it's definitely incredible stuff.

It's pretty complex when you first get started, it took me well over a week to get my bearings straight, but once you've figured things out it's pretty much just javascript and messing around with dialogflow.

I love the way machine learning is going, so you don't need any NLP toolkit?

Dialogflow makes the NLP extremely easy, you just provide 10+ examples of what they use might say in order to trigger a certain function, including the handling of variables mid sentence & it handles the rest. Pretty smart stuff!

No one knows what potential of Bitshares.

  ·  2 years ago Reveal Comment

very nice post!!

it would be nicer if it would have boobs


BTS is future!

nah...the future is Pamela Anderson

It was just yesterday when i came to know about the bitshares. Specially its link with the Steem. Surely i would love to see something similar to google assistant on my smartphone. This post of yours contained a lot of technical information, most of which went over my head. After Reading through this post almost twice all i managed to understand was that you are trying to make this technology mainstream by bringing it to peoples smartphones and smart watches.

As far as google assistant is concerned i believe that this platform still needs some development. Google assistant comes kind of handy for elderly people. This is just my personal opinion.

Surely i would love to see something similar to google assistant on my smartphone.

What smartphone device do you have? It's also available for iOS devices.

As far as google assistant is concerned i believe that this platform still needs some development.

I fully agree, It's still in its infancy - Alexa has several years head start, but Google's putting serious effort into competing with them.

Google assistant comes kind of handy for elderly people. This is just my personal opinion.

Certainly, it makes it easier for the elderly to Google things, and I've even read ideas regarding checking up on elderly relatives or calling for help if they've fallen, or even helping to reassure those with degenerative diseases (answering repetitive questions, potentially learning how to properly interact with and calm down upset individuals, etc).

There are endless possibilities for Google Assistant applications/use-cases.

I personally use an android device. I rarely use google assistant but i have taught my mother to use it. She was having difficulty navigating through contacts and making calls. Most of the time she was putting extra pressure on the screen because of which she would end up calling anyone on the list. In order to ease this process out i saved a custom contact list on her phone and taught her how to use google assistant .

  ·  2 years ago Reveal Comment

Very nice post

  ·  2 years ago Reveal Comment

Google has everything don't they?🌎

yeah they are way ahead.

They'll soon have a Bitshares block explorer bot, so yeah almost everything ;D


This sounds like a terrific idea! However, if your bot becomes very successful, your cost in Firebase will likely skyrocket, because every single query will go through your cloud server.

Meh, Google offers $200 free credits/month for new 3rd party Google Assistant bots, plus in the event that I've got thousands of concurrent users that'll be worth the billing & I can switch from pay-as-you-go to the 'flame plan' firebase payment option.

salam kenal master, posting a very extraordinary, very interesting deserve extraordinary appreciation, best regards friendship from me user aceh steem Indonesia, please give directions for us in order to manage steemit well and true

please give directions for us in order to manage steemit well and true

Post about things you enjoy doing? Start projects, and show Steemit users them. Meaningful content is better than copy/paste spam.

I think it is a very interesting initiative, the future is now and with the new technologies of today such as computers, android phones and watches too, in them there is a lot of intelligence and creating these new software would be very good. thanks for sharing this information

  ·  2 years ago Reveal Comment

Okay well now I have two new things to go learn about, bitshares and gridcoin from a comment here. I have to say, I love the community on Steemit now, I'm exposed to so many new technologies, more so than Reddit. I hope that in the future Steemit can maintain the tech. aspect.

This is awesome and will propel BTS up!

Yeah, hopefully so eh? That'll give me all the more incentive to continue working on this in my spare time :D

If we can get multiple translations established then Google is able to provide auto-translations, which could further increase coverage across the world. With Google Assistant being introduced to Android 5.0 we'll see even more potential users possibly using the bot :)

Perhaps though if there are thousands of concurrent users the scalability/pricing of the software stack will need reevaluated.. that's a good future problem to have though.

With time, I definitely believe so. The auto translations sounds like a great step forward to achieve more end users from all over the world. Keep positive thoughts and don’t give up on the project! Persistence pays off.

  ·  2 years ago Reveal Comment

that's a great job and due to this Bitshares blast i think "Google Assistant bot, i already fan of Bitshares.

Google Assistant needs to see some additional adoption for advanced users before I see this "taking off". Are there any plans to add something like this to Alexa or Cortana? Shoot, get it on Bixby for Samsung...they really need something cool to happen with that dang hardware button. I'm sure that spreading to each of these would increase the possible gains as each platform, lets be honest here, has relatively low adoption for non-trivial tasks. I think, as it comes to bots, we are just breaking into the mind-share of consumers and haven't even scratched the user base possible, yet.

Are there any plans to add something like this to Alexa or Cortana? Shoot, get it on Bixby for Samsung..

Nope, no plans to program a bot for these old failing platforms.

lets be honest here, has relatively low adoption for non-trivial tasks.

Do you have a source for the lack of 3rd party bot use? It'd likely be because the Google Assistant is still in its infancy & the competition has several years on them. Give Google a year or two and a few hundred million more users will be using the Google assistant.

I think, as it comes to bots, we are just breaking into the mind-share of consumers and haven't even scratched the user base possible, yet.

Yeah, most people either don't have access to a bot or they're unaware that they have the functionality available to them, but that's changing every day.

Excellent work. All of your work -- especially the photos it nice idea. Really enjoyed reading your post, this made me pleased, I will never forget :D

god damn, buddy! you've been busy! take my upvote. :D

Haha, yeah man - a continuation of university research except for a more interesting topic :)

Have an upvote back ;D

I think it is a very interesting topic and personally I would take it into account for the implementation and use of it because it would give a high comfort and if the research advances more as you say you would be taking a high range of needs at the technological level

I just love bitshares and this is "icing on the cake!" Thanks for sharing.

  ·  2 years ago Reveal Comment

Such a nice read. Thanks for sharing and let's hope the future of Bitshare will be brighter this year :)

I have a little sum of bitshares but I have no idea what your trying to say or do with them lol, excuse me for my dumb, it sounds important though!

This Google Assistant won't actually do anything with anybodies BTS, since it'll function solely as a read-only block explorer in audio/visual bot format.

If this was a wallet, then there would be massive risk of theft of funds through audio, plus it would probably upset Google enough to reject the bot.. perhaps an area of research in the future for another dev? ;D

So its gonna be a blockchain assistance?

Yeah, a Bitshares network/blockchain Google Assistant - you'll be able to query asset/account/witness/committee/worker-proposal info, etc.

Good stuff and keep up the great work as always!

Thanks :)

GREAT WORK @cm-steem ! That sounds awesome man !!!

Great article. I just started paying attention to Bitshares recently and am just now beginning to see the potential. This project sounds exciting.

Wish i can create some in the future

Just takes time to learn how to do it & the time required to do the coding.

This project is a large undertaking, but a smaller simpler bot or even the tutorials are best to get started with :)

This is genius stuff, absolutely amazing post! I really love it when I see people like you around, keep on delivering!

The only problem is google assistant is spying on it's users.

To be honest, what/who isn't spying on you anymore?

great post and very interesting your project with the bot, and then I see it very well with respect to its functions since then if you personalize more you can even tratra a personal assistant in function to the daily use of each person could be implemented the function of automate the bot and that could fulfill these tasks and give you current information and automatically without nesecidad of your operation or even with voice commands I have a project in mind but related to the traiding of cryptocurrencies that I am doing with my colleagues from Ing. electronic mechatronics, this is my profile if you are interested in following me publish post like these but referring to cryptocurrencies :D

Thats an incredible idea, you should post it on utopian.io also!

posting extraordinary. in the next year we will be more intelligent with various kinds of tools like this. this is a new breakthrough, not to be outdone by our computer humans also have to increasingly innovate so as not to lose competitiveness with the machine, is not that a friend ???

Is a project amazing steemian, but consider ever Android and IOS

I personally used. Surely i would love to see something similar to google assistant on my smartphone. This post of yours contained a lot of technical information, most of which went over my head. After Reading through this post almost twice all i managed to understand was that you are trying to make this technology mainstream by bringing it to peoples smartphones and smart watches @cm-steem

WoooW this is an incredible work, congratulation to the team!!

Thanks, it's just myself for now though ;D

Wow, simply brilliant; You go Google! Now only if they can back us up with net neutrality... lol

interesting post.i think google is the best,in my opinion.

A great open source for all.

Wow google is in everything in the world and beyond👏👍

yeah its true!!

Yeah man, it's Android coverage is huge around the world & they're rolling out the Google Assistant to lower Android firmware versions each year (first 6.0+, now 5.0+) with each lower version they support they introduce millions of older devices to our potential userbase!

wow this is great im still learning about the whole cryptocurrency , great stuff i have resteemed .... thanks

I think it will be very beneficial to congratulate you on this project

Thanks for sharing

i dont know about bitshare can anybody guide me what is this?

Way to go, I should work on my coding skills, those are beyond rusty...

It's never too late to start on a side project, especially something that is interesting to you :)

What does he mean? I did not understand !!!

İt's good 👍 thanks 👍👍👍

I just joined Bitshares few weeks ago and I believe It is better than the most of exchanges I used before.
I missed the opportunity in ICO but now I am stuck at it.

There wasn't an ICO for Bitshares, but there's still certainly many opportunities within the Bitshares network to take advantage of, whether that's establishing a business where there currently is not one (remittance, payment providers, bridges, gateways, etc) or if it's simply holding BTS/Assets on the BTS DEX.

I do agree though, it's far superior to the majority of centralized exchanges!

  ·  2 years ago Reveal Comment
  ·  2 years ago Reveal Comment

Are you crazy? You answered to anti-spam message with a spam comment????

Wowww.. perfect . I like it😙

Idk if it's perfect, there's still a lot of development to go! :P

Please Upvote my post 😂

wow it's incredible and great idea thanks for your valuable input.

Thank you for sharing

  ·  2 years ago Reveal Comment

very good post and very useful.
but what do you think about the price of sbd and steem at the beginning of this month,
What is your opinion?

Somewhat off topic, but I think it's pretty damn awesome - posting on steemit is incredibly worthwhile right now.

Bitshares is the next in thing I guess. Nice one

Good evening my friend
Your publication is really beautiful I wish you success
I hope to interact together

Screen Shot 2017-12-29 at 10.46.07 PM.png

Wow that would help a lot of people
Thanks lol

Yeah, here's hoping! :)

The future is now, apps for everything. Life made easy. I didn't realize Bitshares would have some much potential for success till recently.

Bot everywhere. The future will sure look awesome haha :)

Yeah, just wait until "Hey Google" prompts multiple devices within a few metres, it gets a bit crazy haha!

Great Post!!! thanks for the information

Hey good news. I like bitshares but it sometimes looks complicated

It can come across as complex when you first use it, but what doesn't? There's several guides on youtube on how to use it if you're interested.

Congratulations, your post received one of the top 10 most powerful upvotes in the last 12 hours. You received an upvote from @glitterfart valued at 236.33 SBD, based on the pending payout at the time the data was extracted.

If you do not wish to receive these messages in future, reply with the word "stop".

What's Bitshares? Am interested in learning more about it, Please can u explain to me in granular format? Thanks

  ·  2 years ago (edited)

OK.. Thanks

It's amazing that Cryptocurrency market share when up over Google. I'm highly delighted about blockchain technology. The earlier Google work on bitshare bot the better for them. Kudos man

If you look at some of the Google Assistant bot examples Google has been creating, they reference cryptocurrency heavily - don't think they (or at least their sister company 'Alphabet' aren't heavily researching crypto).

Sir. Amazing post I've ever seen. I just shared my first post! come visit my blog if you are free

I think this is a unique way that people do in this era of 2018 but if you can know the beginning of the emergence of ideas or ideas you make this program what about or otherwise, the science of technologi in this year's era is very fast but for me is not a reliable program butbut the programming that has a brilliant idea to modify the program or design it, I agree with your opinion because my knowledge is not commensurate with your knowledge in other words may I learn with you in terms of programing in one of these esteemit applications, perhapswith the application of this esteem the relationship of brotherhood more closely again, let us share knowledge so that we can be more successful in the future because it is true as you say technologi programming in the future require more change changes that must be perfected .

Interesting read, thanks

for beginners like me this might be very useful.

Certainly, additional info about Bitshares in many new locations :)

thanks for very useful information :D

give more clarification about it

What specifically?

This is interesting !...........nice

Congratulations @cm-steem! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Thank you for contributing to this community, this is great!

I'm more curious when the hertz asset go live. As I plan to abuse it if it's any good.

Yeah, I've got to sort out some inconsistencies between price feed scripts (different % rates) and it should be good to go. How do you plan to 'abuse' it?

That's anyone's guess, isn't it? 😂

Sort it and leave the abuse to me. I'll let you know what I think.

Now I can finally see the link between bitshares and STEEM. Nice!

Congratulations @cm-steem!
Your post was mentioned in the hit parade in the following categories:

  • Upvotes - Ranked 9 with 652 upvotes
  • Comments - Ranked 9 with 154 comments
  • Pending payout - Ranked 5 with $ 899,38

I'm confused, this is my first time learning about Bitshares, so it's an exchange? What does that have to do with a Google Assistant?


It has an inbuilt decentralized exchange.

The google assistant is a proposed method of accessing Bitshares network information in a unique manner.

nice one there, more strength.

good article, best wishes sir

thank you you are good plzz follow me

Verry good👍👌

Amazing post great job

that's very complicated...I am very stupid and I didn't take the meds