June 10, 2021

Introducing the Mem API

Introducing the Mem API

Since our beginnings in 2019, we've visualized the long-term model of Mem as a bowtie.

The Mem Bowtie model

On the left side of the bowtie, you have a variety of inputs of information. They could be text messages, sound clips, videos, emails, documents, calendar events—you name it. We call these inflows.

Next, they all funnel into the center of the bowtie: the place where your information is connected, contextualized, and automatically structured to become your very own intelligent, assistive database. This is your Mem knowledge graph.

Finally, out the right side of the the bowtie comes structured knowledge that can be used to power other products and experiences you use. For example, the tasks in your knowledge graph will be syncable to your favorite task manager, the companies and clients you've met with will appear in your CRM, the movies recommended to you by your friend will power your streaming service. These are the outflows.

We knew; however, that critical to this picture was ensuring there was a default way for people to quickly capture new inputs of unstructured information into their Mem or effortlessly search across their own knowledge.

How our first-party apps fit into the Mem Bowtie

So, we started by building what is today the Mem beta app: lightning-fast capture, instant search, and suggestions of relevant knowledge everywhere. In a sense, quick capture and search, both available through Mem Spotlight or the core Mem app, became the first inflows and outflows to the Mem bowtie.

Soon after, we introduced a few other inflows: Texts—which let you use text SMS, WhatsApp, or Telegram to add text snippets into your Mem—and Calendar—which syncs a Google Calendar into your Mem, powering automatic organization of content and workflows around individual and recurring meetings.

Today, we're opening the doors to the Mem bowtie: starting with an API that enables anyone to build new inflows.

Zooming into the knowledge graph

When we think about the Mem knowledge graph—the center of the bowtie described above—it's useful to consider what types of information might be stored inside.

Inside the Mem Knowledge Graph

Let's say each node in the Mem knowledge graph is an "entity". An entity could be a mem (the flexible text-based containers for information that we have in the Mem app today). But an entity could also be a more specific, tangible concept. An entity could represent a specific calendar event, a person you know, a task you need to complete, a restaurant you want to try, an address of a friend you plan to visit—the list goes on.

Over time, Mem knowledge graph will automatically extract entities out of other entities to generate new knowledge. Imagine you write down a quick mem mentioning that a friend recommended a restaurant to you. Both the friend and the restaurant will then be automatically understood and represented as unique entities, and a relationship between them will be automatically formed. Their existence can power any outflow that depends on the set of restaurants you care about or your contacts list.

Automatic knowledge extraction with the Mem Knowledge Graph

Today, the Mem API will only support the creation of the "mem" entity type—a flexible text-based container of information. But what this implies for the Mem API is that—over time—we will open the door for developers to build inflows that push any entity type into your Mem. This will enable developers to automatically sync a person's contacts into their Mem, all of the structured tasks from other productivity tools that already exists, individual calendar events, and ultimately, custom entity types so that developers can model any type of record that would be useful to power an individual's or organization's assistive, intelligent knowledge graph.

Crafting the developer experience

We're on a mission to deliver a best-in-class developer experience.

We drew inspiration for best practices across some of the most beloved APIs and integration platforms such as Stripe, Slack, and Github. The surface area of the initial API is intentionally slim and approachable, yet powerful with the flexibility to grow. We went through multiple iterations before landing on an elegant solution that lets you create a mem with a single line of JavaScript code:

For authorization, we're starting with the simplest setup possible: API keys. You'll be able to generate a new API key for each new Mem inflow you want to build or use, and simply plug and play to get started.

The other side of the developer experience is distribution. We're committed to helping developers who build on top of Mem reach their intended audience —through the Mem Flow Store. We've been carefully working through the developer and end-user experience of what will ultimately become a marketplace of applications built on top of the Mem knowledge graph. In the near future, developers will be able to integrate with the Mem API through OAuth instead of API keys and publish the inflows and outflows they develop directly to the Flow Store — available for other users of Mem to install.

What you can build starting today

We're excited to see what inflows begin to get built on the Mem API. To get the ideas flowing, we've compiled some concepts we know the Mem community would be eager to try.

They fall roughly into three categories:

  • One-time import flows — e.g. From Evernote, From Markdown files, From Google Docs, From Notion, From Confluence
  • Continuous, passive sync flows — e.g. Your bike rides from Strava, Your favorited recipes from AllRecipes
  • Active inflows — e.g. Email into Mem, Readwise into Mem, Slack into Mem

Moving forward

This is just the beginning for the Mem API. Over time, three main areas will continue to mature:

  • Inflow APIs — We will launch API endpoints that allow creation of new entity types that go far beyond the markdown-based mem format. We envision enabling the flow of structured knowledge, such as a contacts list, companies, tasks, and even custom records, directly into a Mem knowledge graph.
  • Outflow APIs — We will launch API endpoints that integrations that read from a Mem knowledge graph and use that to power other products. We envision enabling use cases like syncing your tasks outbound to a product like Todoist; syncing contacts, companies, and mems to your system of record such as Salesforce or Airtable; or something as out there as building an entirely new UX atop your Mem.
  • Distribution of integrations — We will launch the Mem Flow Store, enabling developers to distribute what they build directly to people using Mem so they can effortlessly connect new inflows and outflows to their own accounts.

Get started right now

So much of the information we end up searching for is information that we've come across before, but at that time didn't realize we may need to reference again. That's why it’s so important to not only be able to capture thing you explicitly want to remember, but also passively accumulate information and knowledge in the background that can be automatically used to power your needs down the road.

We can't wait to see what you build atop the Mem API.

Get started with the API by heading to https://docs.mem.ai, and tweet us at @memdotai to share your ideas, progress toward building your first inflow, or feedback on the future of the API.

More from the Memo

See all →