Bento · beginner · 15 min · Ends in a deploy
Build a Bento memory store in 15 minutes
Stand up Postgres + pgvector, seed three documents, and ask /v1/ask its first question.
Matt Yonkovit
Spin up Postgres
docker run -d --name bento-pg -e POSTGRES_PASSWORD=postgres -p 5432:5432 pgvector/pgvector:pg17
Create the schema
create extension if not exists vector;
create table memories (
id bigserial primary key,
body text not null,
embedding vector(1536) not null,
inserted_at timestamptz not null default now()
);
create index memories_emb_idx on memories using hnsw (embedding vector_cosine_ops);
Seed three memories
Embed three short documents with the model of your choice and insert them.
Ask the first question
Point Bento’s /v1/ask at the database and ask it something only those three documents would know. The point isn’t the answer — it’s that the memory survived a restart, joins to the rest of your data, and respects whatever row-level security you put in front of it.
End the tutorial with pnpm bento:deploy to push your store to Northflank.