Skip to content

sustia-llc/surrealdb-live-message

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

surrealdb-live-message

  • 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.

Requirements

Test

# run the integration test
cargo test --test integration_test

Run

Terminal 1

# start the app
cargo run
# when finished with client below, hit ctrl-c to view the log outputs from the subsystem and listener shutdowns

Terminal 2

# 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

Documentation

For detailed documentation on SurrealDB, visit SurrealDB's Documentation.

Acknowledgments

About

Agent messaging based on SurrealDB live query

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages