Bots and continuously-running scripts are not allowed. Chats that are client-pull (that is, the browser sends and requests updates via HTTP and, likely, Ajax/JSON; the server doesn't push anything to the browser, it just answers requests for updates) are allowed, but if you have anything like heavy use (or too-frequent updates) you will soon find yourself running into resource limits and temporary suspensions. Last time I checked, you were allowed 300 CPU·seconds per hour (one core, no more than 5 minutes in any span of an hour), which would include the page requests, servicing the chat requests, writing to and reading from the database or files, etc. That's enough for things like near-real-time customer service and so on; it's not really enough for user-to-user chat in a moderately-sized social network. (And forget about anything other than text.)