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.
Memory model
Section titled “Memory model”Every memory is scoped by the runtime boundary used by the API:
ownerIdis the Clerk user or organization boundary.agentIdidentifies which agent owns or uses the memory stream.pidseparates long-running processes, projects, or workspaces.tidnarrows scope to a thread or conversation.subjectIdidentifies 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.
Base routes
Section titled “Base routes”GET /healthGET /v1/memoriesPOST /v1/memoriesGET /v1/memories/:idPOST /v1/memories/searchFirst memory
Section titled “First memory”{ "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.