amica
amica copied to clipboard
Design websocket protocol for 2 way interaction servers
Let's say we want to support home automation, currently it is possible to support by forking and adding some home automation specific code. However, with the wide variety of different home automation systems, it may make more sense to instead have a script which connects to amica, can say things as a user, and can read what she is saying (or other events).
The amica websocket server could use JSON RPC.
Supports receiving these:
-
register: {client_name }
(registers client) -
messages
(get message list) -
set_messages
-
message: {store(store in message list), interrupt(to interrupt amica or not)}
(send message to amica from client) -
set_animation
-
set_expression
-
set_config: {key, value}
Support broadcasting these sorts of events:
-
message_received: { from(which client or web interface or amica/assistant)}
-
interruption
(currently spoken stream interrupted by user, include data to figure out where was interrupted) -
config_change: {key, value}
This may make it possible to do really cool things like:
- add a parser for when the user sends a youtube video link, run a script that will download the youtube video and provide it to amica somehow, and allow the user to talk about it with amica
- allow user to discuss a github repo with amica
- connect amica to an irc(or similar) chatroom
- have amica be able to query the internet or perform other actions
- connect amica to minecraft to allow her to play with you