- demonstrates a light message layer for multi-agent interaction, based on surrealdb live query. Message records are sent by establishing a graph relation from sending agent to receiving agent.
# run the integration test
cargo test --test integration_test
# start the app
cargo run
# when finished with client below, hit ctrl-c to view the log outputs from the subsystem and listener shutdowns
# start surrealdb client
surreal sql --user root --pass root --namespace test --database test
# message from bob to alice
RELATE agent:bob->message->agent:alice
CONTENT {
created: time::now(),
payload: { Text: { content: 'Hello, Alice!' } },
};
# message from alice to bob
RELATE agent:alice->message->agent:bob
CONTENT {
created: time::now(),
payload: { Text: { content: 'Hello, Bob!' } },
};
# check messages
select * from message
For detailed documentation on SurrealDB, visit SurrealDB's Documentation.