A modern message based async agent framework

Overview

Munggoggo

A modern message based async agent framework

An asyncio based agent platform written in Python and based on RabbitMQ. Agents are isolated processes which can host multiple parallel running behaviours as business logic and can be deployed as dedicated pods in a kubernetes cluster. WEB communication access to the agent network via REST/HTTP, websocket and jsonrpc.

Documentation: https://munggoggo.readthedocs.io/en/latest/

None: """ Register behaviour and subscribe to 'ping' topic """ await self.add_runtime_dependency(self.PingBehav(self, binding_keys=['ping'])) if __name__ == '__main__': Worker(Agent(identity='Agent'), loglevel="info").execute_from_commandline()">
from mode import Worker
from behaviour import Behaviour
from core import Core


class Agent(Core):
    class PingBehav(Behaviour):
        async def setup(self):
            self.counter = 0

        async def run(self):
            self.counter += 1
            msg = await self.receive()
            if msg:
                print(f"{self.name}: Message received: {msg.body.decode()}")
            await self.publish(str(self.counter), 'ping')
            await asyncio.sleep(0.9)

    async def setup(self) -> None:
        """ Register behaviour and subscribe to 'ping' topic """
        await self.add_runtime_dependency(self.PingBehav(self, binding_keys=['ping']))


if __name__ == '__main__':
    Worker(Agent(identity='Agent'), loglevel="info").execute_from_commandline()

This gets you an agent which publishes and reads messages from the message bus on topic: ping.

Features

  • asyncio based agent framework.
  • RabbitMQ messaging backend.
  • Basic agents provided as building blocks.
  • agents can have (multiple) behaviours!
  • agents and their behaviours form a graph and can be visualized.
  • communication model: broadcast, point-to-point, topics pub-sub, RPC
  • WEB RPC
  • React based frontend using WebSockets
  • Python >= 3.7
  • ASGI framework, the future of Python web services!
  • A built in testing agent for the web ....
  • Capability of running within uvicorn.
  • OpenAPI schema generation, with interactive documentation!
  • Single-page webapp support.

Web features powered by Starlette.

Installing Munggoggo

Install docker and docker-compose.

$ git clone https://github.com/sysid/munggoggo.git
$ cd munggoggo; pipenv install
✨🍰✨

Only Python 3.7+ is supported.

Start RabbitMQ as communication backend.

# prerequisite: docker, docker-compose installed
cd rmq
docker-compose up

Start demo agents and WEB user interface in separate terminals:

# terminal1
python agent1.py

# terminal2
python agent2.py

# terminal3
python asgi.py

To see the frontend go to http://localhost:8000/static/frontend/index.html.

The Basic Idea

The basic idea is a combination of several best practices I came across during my work on agent based systems and consolidate them into a single framework, along with some new ideas I have. Not everything is 100% full quality (yet), so see it as proof of concept rather than production ready software!

User Guides

A modern message based async agent framework: version (0.4.9)

.. toctree::
   :maxdepth: 2

   tour
   agents
   core
   behaviour
   asgi
   messages


Ideas

Indices and tables

Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies

pyshader Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies Fully programmable shader model (even

Alastair Cota 1 Jan 11, 2022
Python 100daysofcode

#python #100daysofcode Python is a simple, general purpose ,high level & object-oriented programming language even it's is interpreted scripting langu

Tara 1 Feb 10, 2022
A continuation Of Project Glow By @glowstik-yt

Project Glow Greetings, I see you have stumbled upon project glow. Project glow is an open source bot worked on by many people to create a good and sa

1 Nov 17, 2021
World's best free and open source ERP.

World's best free and open source ERP.

Frappe 12.5k Jan 07, 2023
This repository contains all the data analytics projects that I've worked on in python.

93_Python_Data_Analytics_Projects This repository contains all the data analytics projects that I've worked on in python. No. Name 01 001_Cervical_Can

Milaan Parmar / Милан пармар / _米兰 帕尔马 267 Jan 06, 2023
Geodesic Dome Math

dome Geodesic Dome Math Python dome tool dome.py calculates an icosahedron or 2v geodesic dome and creates 3d printable hubs as OpenSCAD sources. usag

Brian Olson 2 Feb 09, 2022
Fix Eitaa Messenger's Font Problem on Linux

Fix Eitaa Messenger's Font Problem on Linux

6 Oct 15, 2022
京东自动入会获取京豆

京东入会领京豆 要求 有一定的电脑知识 or 有耐心爱折腾 需要Chrome(推荐)、Edge(Chromium)、Firefox 操作系统需是Mac(本人没在m1上测试)、Linux(在deepin上测试过)、Windows 安装方法 脚本采用Selenium遍历京东入会有礼界面,由于遍历了200

Vanke Anton 500 Dec 22, 2022
万能通用对象池,可以池化任意自定义类型的对象。

pip install universal_object_pool 此包能够将一切任意类型的python对象池化,是万能池,适用范围远大于单一用途的mysql连接池 http连接池等。 框架使用对象池包,自带实现了4个对象池。可以直接开箱用这四个对象池,也可以作为例子学习对象池用法。

12 Dec 15, 2022
Python samples for Google Cloud Platform products.

Google Cloud Platform Python Samples Python samples for Google Cloud Platform products. Setup Install pip and virtualenv if you do not already have th

Google Cloud Platform 6k Jan 03, 2023
Manually Install Python 2.7 pip without any problem !

Python2.7_install_pip Manually Install Python 2.7 pip without any problem ! Download installPip.py to your system and Run the code using this Command

Ali Jafari 1 Dec 09, 2021
Awesome Cheatsheet

Awesome Cheatsheet List of useful cheatsheets Inspired by @sindresorhus awesome and improved by these amazing contributors. If you see a link here is

detailyang 6.5k Jan 07, 2023
データサイエンスチャレンジ2021 サンプル

データサイエンスチャレンジ2021 サンプル 概要 線形補間と Catmull–Rom Spline 補間のサンプル Python スクリプトです。 データサイエンスチャレンジ2021の出題意図としましては、訓練用データ(train.csv)から機械学習モデルを作成して、そのモデルに推論させてモーシ

Bandai Namco Research Inc. 5 Oct 17, 2022
This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time

This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time. It uses SQLAlchemy for ORM and Alembic for database migrations.

Majid Iranpour 5 Apr 16, 2022
Inverted-pendulum-with-fuzzy-control - Inverted pendulum with fuzzy control

Fuzzy Inverted Pendulum Basically, this project consists of an inverted pendulum

Mahan Ahmadvand 1 Aug 25, 2022
Final project in KAIST AI class

mmodal_mixer MLP-Mixer based Multi-modal image-text retrieval Image: Original image is cropped with 16 x 16 patch size without overlap. Then, it is re

SuperSuperMoon 5 May 30, 2022
An easy way to access the Scratch API!

The majority of people are likely here because they want to easily access the Scratch API!

rgantzos 0 May 04, 2022
Gaia: a chrome extension that curates environmental news of a company

Gaia - Gaia: Your Environment News Curator Call for Code 2021 Gaia: a chrome extension that curates environmental news of a company Explore the docs »

4 Mar 19, 2022
Repositório para estudo do airflow

airflow-101 Repositório para estudo do airflow Docker criado baseado no tutorial Exemplo de API da pokeapi Para executar clone o repo execute as confi

Gabriel (Gabu) Bellon 1 Nov 23, 2021
Convert a .vcf file to 'aa_table.tsv', including depth & alt frequency info

Produce an 'amino acid table' file from a vcf, including depth and alt frequency info.

Dan Fornika 1 Oct 16, 2021