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

Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells.

Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells. The project retrains itself after every prediction, mak

Arun Singh Babal 2 Jul 01, 2022
Script Repository for the ICGM-CNRS FRANCE

Here you will find my Python Work repesitory for the ICGM institute - Montpellier - France.

CABOS Matthieu 1 Apr 13, 2022
A telegram bot which programed to countdown.

countdown-vi this is a telegram bot which programed to countdown. usage well, first you should specify a exact interval. there is 5 column, very first

Arya Shabane 3 Feb 15, 2022
Think DSP: Digital Signal Processing in Python, by Allen B. Downey.

ThinkDSP LaTeX source and Python code for Think DSP: Digital Signal Processing in Python, by Allen B. Downey. The premise of this book (and the other

Allen Downey 3.2k Jan 08, 2023
Annotates sequences with Eggnog-mapper and hhblits against PDB70

Annotating "hypothetical" proteins with the PDB See config/ for configuration information. This workflow takes as input a set of protein sequences. It

1 Apr 05, 2022
An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Austin Henley 19 Dec 27, 2022
KUIZ is a web application quiz where you can create/take a quiz for learning and sharing knowledge from various subjects, questions and answers.

KUIZ KUIZ is a web application quiz where you can create/take a quiz for learning and sharing knowledge from various subjects, questions and answers.

Thanatibordee Sihaboonthong 3 Sep 12, 2022
Easy, clean, reliable Python 2/3 compatibility

Overview: Easy, clean, reliable Python 2/3 compatibility python-future is the missing compatibility layer between Python 2 and Python 3. It allows you

Python Charmers 1.2k Jan 08, 2023
A tool for generating skill map/tree like diagram

skillmap A tool for generating skill map/tree like diagram. What is a skill map/tree? Skill tree is a term used in video games, and it can be used for

Yue 98 Jan 07, 2023
PDX Code Guild Full Stack Python Bootcamp starting 2022/02/28

Class Liger Rough Timeline Weeks 1, 2, 3, 4: Python Weeks 5, 6, 7, 8: HTML/CSS/Flask Weeks 9, 10, 11: Javascript Weeks 12, 13, 14, 15: Django Weeks 16

PDX Code Guild 5 Jul 05, 2022
A simple spyware in python.

Spyware-Python- Dependencies: Python 3.x OpenCV PyAutoGUI PyMongo (for mongodb connection) Flask (Web Server) Ngrok (helps us push our fla

Abubakar 3 Sep 07, 2022
Repository for my Monika Assistant project

Monika_Assistant Repository for my Monika Assistant project Major changes: Added face tracker Added manual daily log to see how long it takes me to fi

3 Jan 10, 2022
My solutions for Advent of Code 2021 🌟🎄

🌟 Advent of Code 2021 🎄 My solutions for Advent of Code 2021. About · What is Advent of Code? · Contents · Usage · Table of puzzles (TODO: add final

Amanda P. Pinha 2 Dec 05, 2022
Iss-tracker - ISS tracking script in python using NASA's API

ISS Tracker Tracking International Space Station using NASA's API and plotting i

Partho 9 Nov 29, 2022
Cool little Python scripts & projects I've made.

Little Python Projects A repository for neat little Python scripts I've made! How to run a script: *NOTE: You'll need to install Python v3 or higher.

dood 1 Jan 19, 2022
From "fixed RAnDom CRashes" to "[FIX] Fixed random crashes."

Clean Commit From fixed RAnDom CRashes to [FIX] Fixed random crashes. Clean commit helps you by auto-formating your commits to make your repos better

Mathias 3 Dec 26, 2021
Processamento da Informação - Disciplina UFABC

Processamento da Informacao Disciplina UFABC, Linguagem de Programação Python - 2021.2 Objetivos Apresentar os fundamentos sobre manipulação e tratame

Melissa Junqueira de Barros Lins 1 Jun 12, 2022
Small tool to use hero .json files created with Optolith for The Dark Eye/ Das Schwarze Auge 5 to perform talent probes.

DSA5-ProbeMaker A little tool for The Dark Eye 5th Edition (Das Schwarze Auge 5) to load .json from Optolith character generation and easily perform t

2 Jan 06, 2022
Projects and assets from Wireframe #56

Wireframe56 Projects and assets from Wireframe #56 Make a Boulder Dash level editor in Python, pages 50-57, by Mark Vanstone. Code an homage to Bubble

Wireframe magazine 10 Sep 07, 2022
Pre-crisis Risk Management for Personal Finance

Антикризисный риск-менеджмент личных финансов Риск-менеджмент личных финансов условиях санкций и/или финансового кризиса: делаем сегодня все, чтобы за

Dmitry Petukhov 593 Jan 09, 2023