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

Cloud Native sample microservices showcasing Full Stack Observability using AppDynamics and ThousandEyes

Cloud Native Sample Bookinfo App Observability Bookinfo is a sample application composed of four Microservices written in different languages.

Cisco DevNet 13 Jul 21, 2022
Pequenos programas variados que estou praticando e implementando, leia o Read.me!

my-small-programs Pequenos programas variados que estou praticando e implementando! Arquivo: automacao Automacao de processos de rotina com código Pyt

Léia Rafaela 43 Nov 22, 2022
Automation of VASP DFT workflows with ASE - application scripts

This repo contains a library that aims at automatizing some Density Functional Theory (DFT) workflows in VASP by using the ASE toolkit.

Frank Niessen 5 Sep 06, 2022
Analyzes crypto candles over a set time period and then trades based on winning patterns found

patternstrade Analyzes crypto candles over a set time period and then trades based on winning patterns found. Heavily customizable. Warning: This was

ConnorCreate 14 May 29, 2022
Simulation-Based Inference Benchmark

This repository contains a simulation-based inference benchmark framework, sbibm, which we describe in the associated manuscript "Benchmarking Simulation-based Inference".

SBI Benchmark 58 Oct 13, 2022
Ningyu Jia(nj2459)/Mengyin Ma(mm5937) Call Analysis group project(Group 36)

Group and Section Group 36 Section 001 name and UNI Name UNI Ningyu Jia nj2459 Mengyin Ma mm5937 code explanation Parking.py (1) Calculate the rate of

1 Dec 04, 2021
Scripts used in the RayStation medical radiation dosimetry treatment planning system

Med Phys Scripts These are scripts that I, the medical physics assistant at Cookeville Regional Medical Center, wrote for use in our radiation therapy

Kaley White 2 Oct 19, 2022
Types for the Rasterio package

types-rasterio Types for the rasterio package A work in progress Install Not yet published to PyPI pip install types-rasterio These type definitions

Kyle Barron 7 Sep 10, 2021
The worst and slowest programming language you have ever seen

VenumLang this is a complete joke EXAMPLE: fizzbuzz in venumlang x = 0

Venum 7 Mar 12, 2022
Consulta cpf fds

Consulta-cpf Consulta cpf fds Instalação: apt-get update -y

Moleey 1 Nov 24, 2021
Multi-Process / Censorship Detection

Multi-Process / Censorship Detection

Baris Dincer 2 Dec 22, 2021
Identify unused production dependencies and avoid a bloated virtual environment.

creosote Identify unused production dependencies and avoid a bloated virtual environment. Quickstart # Install creosote in separate virtual environmen

Fredrik Averpil 7 Dec 29, 2022
Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Clifford Onyonka 2 Feb 23, 2022
Write Streamlit apps using Notion! (Prototype)

Streamlit + Notion test app Write Streamlit apps using Notion! ☠️ IMPORTANT: This is just a little prototype I made to play with some ideas. Not meant

Thiago Teixeira 22 Sep 08, 2022
Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

JareBear 34 Dec 14, 2022
8 Nov 04, 2022
solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems—DeFi protocols, DAO governance, cryptocurrencies, and more—built on the Solana blockchain

solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems—DeFi protocols, DAO governance, cryptocurrencies, and more—built on the Solana blockchain

William Wolf 12 Jul 13, 2022
A service to display a quick summary of a project on GitHub.

A service to display a quick summary of a project on GitHub. Usage 📖 Paste the code below with details filled in as specified below into your Readme.

Rohit V 8 Dec 06, 2022
Repo contains Python Code Reference to learn Python in a week, It also contains Machine Learning Algorithms and some examples for Practice, Also contains MySql, Tableau etc

DataScience_ML_and_Python Repo contains Python Code Reference to learn Python in a week, It also contains Machine Learning Algorithms and some example

Meerabo D Shah 1 Jan 17, 2022
Notifies server owners of mod updates, also notifies of player deaths and player joins through Discord.

ProjectZomboid-ServerAssistant Notifies server owners of mod updates, also notifies of player deaths and player joins through Discord. A Python based

3 Sep 30, 2022