Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Getting started

This guide takes you from zero to storing and recalling a memory with the .NET SDK.

Cortadel ships as a single container that serves the REST API, the MCP endpoint, and the dashboard on port 3001. The quickest way to try it (bring a graph DB) is Docker Compose; see Self-hosting for the full compose file.

Terminal window
docker run -p 3001:3001 ghcr.io/cortadel/cortadel:latest

Open the dashboard at http://localhost:3001 and check health:

Terminal window
curl http://localhost:3001/api/health
Terminal window
dotnet add package Cortadel.Sdk
using Cortadel.Sdk;
using var cortadel = new CortadelClient("http://localhost:3001", userId: "alice");
// Store a memory. Entities and categories are extracted in the background.
var created = await cortadel.AddAsync("Alice prefers dark mode and ships on Fridays.");
Console.WriteLine($"stored {created.Id} ({created.Event})");
// Recall with hybrid search.
var hits = await cortadel.SearchAsync("what are alice's working preferences?", new() { TopK = 5 });
foreach (var h in hits.Results)
Console.WriteLine($"{h.RrfScore:F2} {h.Content}");

Let the server distill atomic facts from a transcript instead of writing them yourself:

await cortadel.AddConversationAsync(new[]
{
new ChatMessage("user", "I just moved to Berlin and I'm vegetarian."),
new ChatMessage("assistant", "Got it — Berlin, vegetarian. I'll keep that in mind."),
});
var page = await cortadel.ListAsync(new() { Page = 1, Size = 20 });
Console.WriteLine($"{page.Total} memories across {page.Pages} pages");
var detail = await cortadel.GetAsync(page.Items[0].Id); // null if not found
await cortadel.DeleteAsync(new[] { page.Items[0].Id });