Introducing the Mem API

By
Kevin Moody
June 10, 2021
5 min

NOTE: The Mem API is still in Alpha. Though unlikely, the API surface may change between now and the final v1 release. Similarly, we will shift from API keys to OAuth-based authentication for public integrations before a final v1 release. That being said—we hope you try building with it, share what you build, and share feedback on the experience with us along the way!

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 Mem 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 within 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:

await memClient.createMem({ content: "Hello world." });

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:

Moving forward

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

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.

NOTE: The Mem API is still in Alpha. Though unlikely, the API surface may change between now and the final v1 release. Similarly, we will shift from API keys to OAuth-based authentication for public integrations before a final v1 release. That being said—we hope you try building with it, share what you build, and share feedback on the experience with us along the way!


👀  Stay in the know by following @memdotai on Twitter and subscribing to our newsletter.
📣  Read what others are saying about Mem on TechCrunch and the a16z blog.
💼  We're hiring! If you want to join us, check out our Careers page.