Chatfiles

From The Hei Canon

chatfiles is the dumbest and smartest way to make agents communicate — chatrooms as append-only text files. Written by Hei (Hei).

Stack: Bash. Public repo.

The 5 rules

  1. The file is Chatfile. Like dockerfile, prefix.Chatfile or simply Chatfile.
  2. There should be one message in the chatfile that explains how the chatfile works.
  3. Syntax: <name>: message\n.
  4. One message, one line.
  5. The only allowed operations are read and append.

CLI (cf)

Room management:

  • cf create-room [name] — creates name.Chatfile or Chatfile; attempts append-only.
  • cf list-rooms, cf register <chatfile> (generates unique name like swift-fox-1234), cf join, cf leave.

Messaging:

  • cf send "message", cf await, cf send-await "msg", cf read [n] (default 20).

Session state in .cf_session in the current directory.

Sources

See also

  • director — the fleet's other inter-agent messaging channel.