#agent #multi-agent #distributed-systems

rusty_agent

multi-agent systems framework

2 releases

0.1.1 Sep 11, 2022
0.1.0 Sep 11, 2022

#630 in Science

Download history 13/week @ 2024-02-22 18/week @ 2024-02-29 90/week @ 2024-03-07 4/week @ 2024-03-14 4/week @ 2024-03-28

98 downloads per month
Used in rusty_planner

Custom license

21KB
436 lines

Multi-agent framework in Rust

This is a simple framework enabling multi-agent systems. Originally developed to test distributed planning & decision-making for this crate, it can be used for various other use cases.

It uses ZeroMQ for messaging between the agents. Each agent internally works with two threads. One which listen to message from other agents, another which continuously "pings" it's neighbours. This pinging allows agents to join and leave a system-of-systems on the fly. Once an agent is pinged it will include information about the neighbours it knows about to the other agents.

Example

An example is provided - first start the first agent, it will broadcast a hello world to its neighbours. It will wait till other agents have joined the system-of-systems:

$ cargo run --example sample_agent 0

The program parameter "0" indicates the id of the agent, as well as the port it will use.

Now another agent can be started - which will connect to the previous one, wait for the "hello world" and stop:

$ cargo run --example sample_agent 1

Dependencies

~0.9–1.2MB
~23K SLoC