This is a simple example of a memory-first personal assistant using Exabase, Next.js, tRPC, AI SDK, shadcn/ui, and Tailwind CSS.
You create an isolated Exabase Base for the demo (your baseId is in the URL). The app lists memories for that workspace, and the chat can search and add memories so answers stay grounded in what you have stored. You can seed a small set of sample “personal” memories to try the flow quickly.
- Create a dedicated Base per demo session so everything is scoped under
/b/[baseId]. - Search and retrieve memories when the model needs context.
- Store new details with explicit memory creation when it makes sense to remember them.
- Surface the same data in the UI: browse memories, remove one-off entries, and optionally repopulate sample data for demos.
demo-x2.mp4
- Exabase: Bases for scoped isolation, memory search, and durable memory writes for the assistant
- Next.js: Front-end and back-end
- tRPC: Type-safe APIs for the memory list, sample memory seed, and new-base creation
- AI SDK: Streaming chat with tool calling (search and add memory)
- shadcn/ui: Accessible UI components
- Tailwind CSS: Styling
- Biome: Lint and format
bun install
bun run devCreate a .env.local file with EXABASE_API_KEY and OPENAI_API_KEY. Optional variables (including the OpenAI model name) are described in .env.example.
Open http://localhost:3000 and click New base to create an Exabase Base; you are redirected to /b/<baseId> where the app runs.