Skip to content

Hexabot Project Starter Template, fork this project to create you own template then create project with `hexabot create --template=username/my-template-repo`

Notifications You must be signed in to change notification settings

Hexastack/hexabot-template-starter

Repository files navigation

Hexabot Template Starter

Welcome to the Hexabot Template Starter repository! This template provides everything you need to get started with building a custom Hexabot project. It includes essential folders and files to help you extend Hexabot, define your own modules, and quickly run your project in Docker. Below you'll find details on the structure and how to use this template.

Not familiar with Hexabot ? It's an open-source chatbot / agent solution that allows users to create and manage AI-powered, multi-channel, and multilingual chatbots with ease. If you would like to learn more, please visit the official github repo.

Project Structure

  • extensions/: This folder is where you can develop your own extensions for Hexabot. Inside, you'll find subfolders for:

    • channels/: Add new messaging channels.
    • helpers/: Add helper functions or utilities.
    • plugins/: Create plugins to create custom blocks in the visual editor. Plugins is where you can perform text-to-action and integrate with 3rd party APIs. To get started, there is a hello plugin provided as an example.
  • modules/: Since Hexabot API is built on top of NestJS, this folder allows you to extend the Hexabot API by adding your own modules (controllers, services, etc.).

  • Dockerfile: Use this file to build a Docker image on top of Hexabot. It's pre-configured to get your project up and running in a containerized environment.

  • docker/docker-compose.yml: This file defines the services needed to run your Hexabot project using Docker Compose. It simplifies the setup of multiple services such as databases or other dependencies.

Getting Started

  1. Install Hexabot CLI: To create a new Hexabot project, first install the Hexabot CLI globally:

    npm install -g hexabot-cli
  2. Create Your Project: Use the Hexabot CLI to create a new chatbot project:

    hexabot create my-chatbot
  3. Configure Your Environment:

    • Copy the .env.example file to .env and customize it according to your environment and configuration needs.
    cp .env.example .env
  4. Run the Project: Navigate into the newly created folder and run the following command to start the project in development mode:

    hexabot dev

    For production mode, you can use:

    hexabot start

    Note: The first run may take some time as it needs to download all required Docker images.

Built-in Features

  • Generative AI Support: This template includes both the ollama helper and plugin by default to help you get started with generative AI features.
  • NLU API: A built-in Natural Language Understanding (NLU) API is provided for intent recognition and language detection.

Extending Hexabot

You can easily extend Hexabot's functionality by installing additional extensions (channels, helpers, plugins) via npm. Below are some examples:

  • Install a new channel (e.g., Messenger):

    npm install hexabot-channel-messenger
  • Install a new plugin (e.g., ChatGPT integration):

    npm install hexabot-plugin-chatgpt

Docker Setup

This template comes with a pre-configured Dockerfile and docker-compose.yml to help you containerize your project quickly.

  • Dockerfile: Builds your Hexabot-based project.
  • docker-compose.yml: Defines the necessary services for your project, allowing you to start everything with a single command.

Documentation

For detailed information on how to get started, as well as in-depth user and developer guides, please refer to our full documentation available in the docs folder or visit the Documentation.

Contributing

We welcome contributions from the community! Whether you want to report a bug, suggest new features, or submit a pull request, your input is valuable to us.

Please refer to our contribution policy first : How to contribute to Hexabot

Contributor Covenant

Feel free to join us on Discord

License

This software is licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:

  1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
  2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).

Happy building with Hexabot! 🎉