Skip to main content

Hello World: A Guide to the MemMachine RESTful API v2

This guide provides a quick and simple way to get started with the MemMachine RESTful API v2 using curl commands.

Prerequisites

Ensure your MemMachine server is running.
1

List Projects

Check for existing projects. This POST request returns a list of all projects available in your organization.Command:
2

Create a Project

Before adding memories, you must ensure a project exists.Command:
3

Add a New Memory

The POST /api/v2/memories endpoint allows you to add one or more messages to the system.Command:
Expected Output:You will receive a JSON response containing the results of the operation.
4

Search for the Memory

Now let’s find the memory we just added. The POST /api/v2/memories/search endpoint searches both episodic and semantic memory. Set agent_mode to true to use retrieval-agent search behavior.Command:
Expected Output:You should see a JSON response containing episodic_memory and semantic_memory results that match your query.
5

Delete Memories

To clean up, you can use the POST /api/v2/memories/episodic/delete endpoint to remove specific chronological events or message logs.Command:
You will also want to use the POST /api/v2/memories/semantic/delete endpoint to remove distilled facts, traits, or knowledge entries: