appifyhub / the-agent

The Agent's source code
https://the-agent.appifyhub.com
MIT License
1 stars 0 forks source link

License Date Release
Code Image
Build Issues PRs

The Agent · Our Intelligent Virtual Assistant

About the project

This repository contains the complete codebase of The Agent's backend service.

The service covers for the majority of daily user-facing features, such as asking for advice, checking news, analyzing photos, generating new content, etc. Although the final product looks like a simple wrapper around the Large Language Model (LLM) technology, it's more than that – The Agent is a complex system or interconnected modules that integrate many services and APIs, and enables multiple access channels to provide a true virtual assistant experience.

See the rest of this document for a developer's overview and information on how to use it yourself.

Access

This service currently powers several Telegram bots. For privacy reasons, we're not listing each bot here individually – but you can run the service locally on your machine and connect it to your own bot.

⚠️ Before you continue…

If you plan on contributing to this project in any way, please read and acknowledge the Contributing guide first.

Please also take note of the License.

Developer's Overview

Because the complete codebase is open-source, you can inspect and run the service yourself.

Tech Stack

The project currently uses the following tech stack:

How to build and run?

Dependencies

This project uses pipenv to manage dependencies and take care of the environment.

Using pipenv, you can run pipenv install in the root directory to set up your dependencies correctly.

To prepare the production server (less logging, more parallelism):

$ pipenv install

To prepare a development system, e.g. for testing and improvement purposes:

$ pipenv install --dev

After the dependencies have been installed, you can run pipenv shell to get a new shell forked, in which the environment will be set up to easily run everything. Your Python version will be correct in there, and the dependencies will be available.

To exit the shell, simply run deactivate, followed by exit if the shell hasn't closed automatically.

Exiting the shell will remove the environment, so you will need to run pipenv shell again to get back to the correct environment.

Once the environment has been configured, you can run the main code.

Scripts

You can use the pre-built scripts located in the tools directory. Those are easy-to-use, single-shot Shell executables that require no developer setup.

To run the production mode:

$ ./tools/run_prod.sh

To run the development mode:

$ ./tools/run_dev.sh

And most importantly, to run all tests:

$ ./tools/run_tests.sh

Follow the command line instructions for more information during the execution of the scripts.

There are more tools in the same directory (especially useful around database migrations); feel free to explore those at your own pace when needed.

To emulate this behavior on Windows, you would need to inspect the scripts individually and mimic their behavior in the DOS environment... or open a Pull Request with a Windows-compatible version of the scripts!

Docker support

This final product is also available as a Docker image.
For more information on how to run it using Docker, see the Dockerfile and the Packages section in the GitHub repository. There's also more information in the Docker directory.

License

Check out the license here.