Smarter Chat

Smarter Chat is a chat app that remembers context over time and can pull in real-world data (weather, places, events). It also lets you attach knowledge to a message by importing a URL, uploading a file, or pulling from your saved memory.

Inspiration

Most chatbots are great in the moment, but they forget what matters five messages later (or the next day). We wanted an assistant that behaves more like a helpful teammate: it keeps track of what you care about, lets you bring in context from the web or files when needed, and can still answer questions that depend on “right now” information.

What it does

  • Chat with streaming responses and per-user chat history (create, rename, search, delete).
  • Persistent “memory” so the assistant can recall important context across conversations.
  • Attach context to a message:
    • Import a URL (scraped to markdown) and save it as memory.
    • Upload a file and store it as memory.
    • Insert an existing saved memory into the current prompt.
  • Tool calling for structured, up-to-date answers:
    • Weather for a city (OpenWeatherMap).
    • Curated places and events for a city (Browser Use skills).

How we built it

  • Frontend: Next.js 15 + React 19 with Tailwind CSS, Radix UI primitives, and Framer Motion for polish.
  • Auth + persistence: NextAuth with a Drizzle ORM + Postgres backing store for chats and user data.
  • AI: Vercel AI SDK (ai, @ai-sdk/react) with Gemini (@ai-sdk/google) for streaming chat.
  • Memory: Supermemory for storing/searching user memories and automatically adding memories from chats.
  • Knowledge ingestion: Firecrawl to turn URLs into clean markdown before saving to memory.
  • Tools: typed tool schemas with Zod; UI renders tool outputs as rich cards (weather/places/events).

Challenges we ran into

  • Designing a chat UI that can render streamed messages and structured tool results without feeling “jumpy”.
  • Keeping prompts clean while still attaching lots of context (URL content, files, memories) when needed.
  • Normalizing third-party tool outputs into predictable, typed shapes and handling partial/failed responses gracefully.
  • Ensuring memory and chat history are scoped correctly to each authenticated user.

Accomplishments that we're proud of

  • A clean “add context” workflow (URL, file, memory) that stays out of the way until you need it.
  • Rich tool cards that make answers actionable (not just text).
  • End-to-end typed tool interfaces (Zod schemas → execution → UI rendering).
  • A practical memory loop: conversations can create memories, and memories can be re-used in future chats.

What we learned

  • How to build reliable streaming chat UX on top of model tool-calling and multi-part messages.
  • The importance of strong schemas + normalization when integrating multiple APIs/tools.
  • Memory is a product feature, not just infrastructure: users need visibility and control over what gets saved and reused.

What's next for Smarter Chat

  • Better memory controls (pin, edit, forget, and “why was this remembered?” explanations).
  • Source citations and previews for imported URLs/files.
  • Smarter retrieval (summaries, topic clustering, and tighter relevance filters per message).
  • More tools/connectors (calendar, email, docs) and team/shared memories.

Built With

  • ai-sdk
  • browser-use
  • nextjs
  • react
  • shadcnui
  • supermemory
Share this project:

Updates