Skip to content

API

The memo.st API stores durable facts that agents can retrieve across sessions. The API worker lives in apps/api, runs on Cloudflare Workers, and exposes JSON endpoints under /v1/memories.

Every memory is scoped by the runtime boundary used by the API:

  • ownerId is the Clerk user or organization boundary.
  • agentId identifies which agent owns or uses the memory stream.
  • pid separates long-running processes, projects, or workspaces.
  • tid narrows scope to a thread or conversation.
  • subjectId identifies the person, account, project, or entity the fact is about.

The API also keeps namespace as a derived compatibility field, but pid and tid are the primary retrieval scope.

GET /health
GET /v1/memories
POST /v1/memories
GET /v1/memories/:id
POST /v1/memories/search
{
"agentId": "support-agent",
"subjectId": "customer_acme",
"pid": "support",
"content": "Acme prefers Slack escalation for P0 incidents."
}

The API generates embeddings automatically and can extract KG triples from the same text when enabled.