Files

18 lines
419 B
Python

from pathlib import Path
from agentmsgs.core.app import App
from agentmsgs.stores.sqlite import SQLiteStore
def main():
app = App(store=SQLiteStore(Path.home() / ".agentmsgs.db"))
alice = app.get_or_create_agent("Alice")
bob = app.get_or_create_agent("Bob")
t = app.create_thread(alice, bob)
app.append(t.id, alice, "Hello")
print(app.poll(t.id, bob))
if __name__ == "__main__":
main()