Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 926 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 926 Bytes

ai-stack

Submodule Description
comm Inter-agent event system
knowledge_base
learning_reasoning
strategy_planning
agent_agent
human_agent

comm

Local RabbitMQ instance:

docker run -p 5672:5672 -d --hostname action-rabbit --name action-rabbit rabbitmq:3

Example usage:

from action.comm import Comm

# Use local or global instance url
comm = Comm("amqp://localhost:5672")

comm.subscribe("agent_a", lambda msg: print(msg))
comm.subscribe("agent_b", lambda msg: print(msg["foo"]))
comm.publish("agent_a", "bar")
comm.publish("agent_b", {"foo": "bar"})

comm.disconnect()