Yarn

With Lifebot, we built a social calendar bot and then added messaging to it. Yarn is an attempt to do the opposite. It’s a messaging platform that makes it easy to add social bots.

Yes, this is a lot like Slack. But Slack is designed for workplace teams, not personal messaging. Asking someone to sign up for Slack to come to a BBQ is absurd. Having a social bot involved in planning a BBQ is not. (Or maybe it is? In any event, accept that premise for now…)

Yarn is similar to many messaging platforms, but here are the key ideas that it brings to the table:

  • Threads are the primary means of conversation. Like their email counterparts, Yarn threads have a topic, participants, and are (typically) transient. You can either add or invite people to threads — by inviting them, you’re letting them know it exists and giving the opportunity to join if they’re interested. Threads are “lighter” than GroupMe groups or Slack channels. It’s natural to have many threads with mostly the same participants.
  • Bots are identified with global, unique handles. If you @mention a bot, then it’ll get that message and information about the thread it came from. If you add a bot to a thread, it can write back when it wants to and (optionally) receive events or messages.
  • It is fully accessible with SMS. While Yarn will have native and web apps because they are awesome and give a much better experience, a phone number is all that’s needed to bring friends into your threads.

These features resonate with each other:

  • Threads + Bots: Threads give context when adding bots that’s useful for both the participants and the bot. Let’s say you create a thread “anyone want to see deadpool?”. When someone adds the @movie bot, no one will be surprised when it starts giving local show times for Deadpool.
  • Threads + SMS: The idea of having a lightweight thread — maybe it’s everyone coming to brunch on Sunday — benefits from being able to add participants without worrying “is this person on Yarn or do I need to get them to download and sign up?”
  • Bots + SMS: Would-be developers of light weight social utilities are lacking a platform. You can SMS a bot directly, but that’s not social. You can build Slack bots, but that’s for work. You can move to Asia. Or hunker down and write an app. With Yarn, a developer can register a @handle, build a simple JSON+REST service, and his or her idea is live in the world.

How does Yarn work today?

A user might be invited into a thread with an SMS message from the “main” phone number like:

🤖: Alice invited you to “deadpool anyone?” reply yes to join the thread, or no to pass

If they type “yes”, they’d get a text from a different number saying something like:

🤖: this is the “deadpool anyone?” thread with Alice and Chuck. reply to chat, or type / for help

At which point they can just start talking with Alice and Chuck, or use “/” to learn more about the platform.

The yarnbot (🤖) kind of follows you around. In the main phone number, you can talk to it directly. But in the thread numbers, it’s (much) more likely that you want to talk to people, so you have to use “/” to talk to this guy 🤖.

Now, let’s say you need to figure out a day to see the movie. With 2 people it’s easy to just chat and work it out. But maybe it’s more people… things get messy quickly. So let’s say you wanted help from the @sched bot.

Alice: /add @sched

This “installs” the @sched bot in the thread. It can reach out to everyone in the thread individually:

@sched: Hi! What days work for you for “deadpool, anyone?” Reply with a list of today, tmrw, thu, fri, sat, sun, mon, or type skip or any.

Once everyone replies, or 24h has passed, it’ll respond to the thread:

@sched: Sunday (Mar 27) is best. Alice, Bob and Doug (3/4) are free.

Since the bot has done it’s job, you can dismiss it with:

Alice: /thx @sched

and then yarnbot announces:

🤖: Alice removed @sched

(Here is a sample @sched app using the initial version of the bot api. I’ll write another post soon with the technical bits about how to create a bot.)

Yarn also has some other basic features. It manages contacts based on the people you’ve been in threads with. If Alice is in a thread with Bob, and she adds Carl, then Bob gets Carl as a contact and vice-versa. While you can always refer to people by phone number, looking up numbers is a hassle, so you’d probably refer to contacts by name:

Alice: /invite bob, carl

(If there are 2 Bobs it’ll ask you to be more specific.)

You can add location to threads, which is helpful sharing where people are meeting, or giving data to bots.

Alice: /add @weather
@weather: Hi! I’ll let you know of any weather changes if say where you are. Type /location <zipcode>
Alice: /location 94107
@weather: Got it. It’s current 72º and sunny in San Francisco. I’ll let you know if that changes.

Similarly, you can change the topic, see who’s present, or get help with other /commands.


What could Yarn look like in the future?

Yarn needs a native app. Perhaps I’ll make another post soon with some design sketches, but for now, here are the basic elements:

  • A representation of threads, and they probably should be the primary view. Threads are a little bit like posts in a social network. They should be swipeable and natural to dismiss when you’re not interested. Think more like Google Inbox, less like GroupMe and Slack.
  • The chat widget itself would borrow heavily from Slack, probably literally, with /commands, @mentions, etc.
  • Contacts integration that’s as seamless as WhatsApp. App users should feel like all of their contacts are instantly Yarn users. Also, authentication will be with an SMS pin — no social logins ever.
  • A catalog for browsing for bots — maybe even a Bot Store (more below).
  • A way to display forms. When a bot needs more structured information, like choosing days when you’re available, it sends a form. The example above showed how a form could be read by the yarnbot, but with a native app, you’d want to show forms visually.
  • Animated image sharing that supported gifv, webm, etc?
  • Location sharing (that actually works)?
  • A mechanism for paying bots?

Open question: Is there a permanent channel for talking to 🤖, or is does the app GUI subsume all of its functionality?

A web app wouldn’t hurt either…

Adding a bot to your thread requires trust. The system is designed to minimize the information shared with bots (you can @mention bots before /adding them; bots developers need to specify the capabilities they need, like the access to thread events and content; phone numbers are never shared; etc)… but still, the Yarn platform needs to act as an intermediary to help users know which bots they can trust, and to offer some accountability in cases of abuse.

A Bot Store probably makes sense. Even more useful might be a bot recommendation engine that personalizes for the users in the thread, location, etc. For example, if you’re at a Giants game and want to order beer, you should be able to say “any recommendations?” to the yarnbot and it’ll say: “you can order beer from @sfgiantsbeerbot, or …”

One of the key sources of data for a bot store or recommendation engine is the experiences of other users. When you /add or @mention a bot, these stats would be tallied and displayed with the bot. When you /thx a bot, you’re dismissing it and recommending it to others. Perhaps if you /kick the bot out of your thread, its developers should be notified, its rating lowered, etc.

Challenges

Besides the raw insanity of dabbling in a market that’s saturated by the biggest companies in the world, there are some particular issues I want to acknowledge:

  • Privacy. I feel pretty strongly about end-to-end encryption with messaging. Your chats should be as private as your thoughts. Currently Yarn can only be as secure as SMS, which is not encrypted and depends on the good will of the carriers and government. While phone numbers as a means of adding people to threads will probably always be useful, a native Yarn app could also use public key cryptography to reliably identify users and and share encryption keys. It should be possible for users with upgraded credentials to communicate with, say, SMS users, but only if this limitation is made clear.
  • End-to-end encryption is trickier with groups. The easiest thing to do is to encrypt messages for all current group members. This is probably where Yarn would start. This works reasonably well as long as you don’t want to support history in threads. Yarn doesn’t have history anyway, since it’s not obvious how to add history to SMS users (I guess send them a link?) However, it’s possible that such a user experience is unacceptable and so another approach might be needed.
  • SMS is expensive. The long term strategy would probably look like GroupMe’s: try to get as many users on the native app as possible. However, I don’t want to go as far as GroupMe does in making SMS users second-class citizens.
  • SMS is a poor substitute for a command line. For example, it has no auto-complete functionality. If you are trying to type @google and accidentally type @gooogle you could end up with a malicious bot in your thread. Presumably the bot store could weed out obvious cases of abuse, and perhaps if a new bot is mentioned or added to a thread, we could add a confirmation step… but it’s not a great experience. Also, responses can be slow, or appear out-of-order, which is confusing.