Guide › Setting up › Install in your app
Where conversations are kept
Conversations stay in your app’s own database: two tables, made by a command your developer runs once.
- What it’s for
- Makes room in your app’s own database to keep the assistant’s conversations, so people can come back to them. They never leave your app; Cognolo keeps none.
- Who does it
- Your developer, with one command. It changes your app’s database, so it isn’t one to try yourself.
- You’ll know it worked when
- The assistant remembers a conversation after you reload the page.
Asking someone else to do it
Copy this and send it to your developer, or paste it into an AI coding assistant working in your app:
Cognolo needs two tables in our database for its conversations. The install wrote their definitions; please run the database command it listed (under “Then run” or “After merging, run”). Details are in Cognolo’s guide, “Where conversations are kept”.
For your developer
Cognolo keeps no conversations. They stay in your app’s own database, in two tables: the conversations, and a log of every tool the assistant ran or proposed, on whose behalf, and what came of it. The install adds the tables for the database tool your app already uses. Cognolo never runs the migration itself.
By database tool
- Prisma
- Two models are added to
prisma/schema.prisma. Then runnpx prisma migrate dev --name cognolo. If your schema isn’t in that file, copy the two models in yourself. - Drizzle
- The tables are in
lib/cognolo/schema.ts, written for Postgres. Add that file to theschemasetting indrizzle.config, then runnpx drizzle-kit generateandnpx drizzle-kit migrate. - Plain SQL
- The tables are in
migrations/cognolo.sql, written for Postgres. Runpsql "$DATABASE_URL" -f migrations/cognolo.sql. The assistant reads and writes through apoolfrom thepgpackage.
Things to watch for
- MySQL with Prisma: add
@db.Texttostate,transcript,inputandsummary. Prisma’s plain text type is too short there for a conversation. - Drizzle on MySQL or SQLite: use that database’s table builders instead of the Postgres ones.
- A database driver without transactions (Neon over HTTP, Cloudflare D1): set
transactions: falseondrizzleStoreinassistant.ts. - An older database that isn’t set to UTF-8: text such as emoji is still saved safely.
Who sees which conversation
Each person sees only their own. The storage helpers reach a conversation only through the scope open() returns (see Who the person is), and refuse a scope with a missing value.