`keybase chat api --help` gives a bunch of examples. There's more possible than what that suggests, but it should be a good start. We'll expand the docs soon.
We have already written a number of internal bots at Keybase. We have one that posts all our github commits into a channel, for example.