Skip to main content

Framework for Building Virtual Assistants with API.AI

Project description

Create Virtual Assistants with Python

image image image image

A flask extension serving as a framework to easily create virtual assistants using Dialogflow which may be integrated with platforms such as Actions on Google (Google Assistant).

Flask-Assistant allows you to focus on building the core business logic of conversational user interfaces while utilizing Dialogflow's Natural Language Processing to interact with users.

Now supports Dialogflow V2!

This project is heavily inspired and based on John Wheeler's Flask-ask for the Alexa Skills Kit.


  • Mapping of user-triggered Intents to action functions
  • Context support for crafting dialogue dependent on the user's requests
  • Define prompts for missing parameters when they are not present in the users request or past active contexts
  • A convenient syntax resembling Flask's decoratored routing
  • Rich Responses for Google Assistant

Hello World

from flask import Flask
from flask_assistant import Assistant, ask

app = Flask(__name__)
assist = Assistant(app, project_id='GOOGLE_CLOUD_PROJECT_ID')

def hello_world():
    speech = 'Microphone check 1, 2 what is this?'
    return ask(speech)

if __name__ == '__main__':


  1. Create an Assistant object with a Flask app.
  2. Use action decorators to map intents to the proper action function.
  3. Use action view functions to return ask or tell responses.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Assistant, version 0.4.1
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Assistant-0.4.1-py2.py3-none-any.whl (31.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size Flask-Assistant-0.4.1.tar.gz (24.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page