Overview
Architecture
The Chatbot is powered by several open source libraries to support the different functionalities of the chatbot application like authentication, persistence, text generation, etc. The following is a brief overview of the architecture.
Content and agent signals
For agents (AI-generated): AI SDK documentation: open-source TypeScript toolkit for connecting to AI model providers, with guides on text and structured generation, tool use, RAG, reasoni
ai sdkmodel providerstext generationtool callingretrieval augmented generation
Files
Publisher files and the directory’s indexed copy.
Read the cached llms.txt preview
Their llms.txt
The beginning of the file, from our validated copy saved 2026-11-01T05:26:41.345Z. Cached copy · Source on ai-sdk.dev
---
title: Architecture
description: A quick overview of the different parts of the Chatbot.
product: Chatbot
type: conceptual
summary: Chatbot uses Next.js, AI SDK, Auth.js, Drizzle ORM, and Vercel Blob to power authentication, persistence, text generation, and file storage.
prerequisites:
- /docs/setup
related:
- /docs/deploying
---
# Architecture
The Chatbot is powered by several open source libraries to support the different functionalities of the chatbot application like authentication, persistence, text generation, etc. The following is a brief overview of the architecture.
<img alt="Simplified Architecture" src={__img0} placeholder="blur" />
## Application Framework
The Chatbot is built to run fast on the web, so it is powered by [Next.js](http://next.org). It uses the [App Router](https://nextjs.org/docs/app) with two main route segments – `(chat)/` and `(auth)/`. The api endpoints are located in the `api/` folder of each route segment as [route handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) which gets converted into serverless functions upon deployment.
## Model Providers
The primary user experience of the chatbot application is to simulate a conversation with a model that exhibits near [general intelligence](https://en.wikipedia.org/wiki/Artificial_general_intelligence) and can respond to user queries to help accomplish a task. The Chatbot uses the [AI SDK](https://ai-sdk.dev) to connect to these models deployed by [various providers](https://ai-sdk.dev/providers/ai-sdk-providers).
Language Models are the most primitive types of models used in the application. It is used for generating [text](https://ai-sdk.dev/docs/ai-sdk-core/generating-text) and [structured data](https://ai-sdk.dev/docs/ai-sdk-core/generating-structured-data). The AI SDK ships with many features that you can use to amplify your usage of these models like [Tool Use](https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-tool-usage), [Retrieval Augmented Generation](https://ai-sdk.dev/cookbook/node/retrieval-augmented-generation), [Reasoning](https://ai-sdk.dev/docs/ai-sdk-ui/chatbot#reasoning), etc. Image Models and Embedding Models are the other types of models that can be used in the application, like for image generation and document retrieval, respectively.
One of the main advantages of using the AI SDK is that it allows you to be specific with the kind of model and provider you'd like to use in a specific part of the application. You can learn more about it in the [Models and Providers](/docs/concepts/models-and-providers) section.
## Authentication
The Chatbot uses [Auth.js](https://authjs.dev) for authentication. The Chatbot requires authentication by default to start new chats and also save them in history.
## Persistence
Persistence is the ability to save and restore data from a database. The Chatbot uses PostgreSQL as its database to store things like chat history, user accounts, application-wide administrat
…
Published headings
51 indexed headings in this publisher record.
Show all 51 indexed headings
Headings describe indexed content. They do not establish a working integration or endorsement.
Agent access
Review the publisher’s own access terms before automated use.
Machine-readable: GET /v1/resolve?q=ai-sdk.dev · GET /v1/domain/ai-sdk.dev · this page as Accept: application/json or text/markdown · MCP lookup_domain
Automatically discovered from public files. Inclusion does not imply endorsement or publisher participation.
Indexing evidence
Authority, classification and country evidence
Own or manage this website?
If you own or manage ai-sdk.dev, you can update its listing and review file health, discovery activity and score history.
Manage this listing — optional
What verification unlocks
See how your site is discovered—and control what agents see.
- See your website in the map
Review your indexed topics, nearby publishers sharing headings, measured listing exposure and map snapshots in a private report for your website.
- Control what agents see
Edit your listing description, tags, public contact details and additional llms.txt paths. Publish your terms for automated access, attribution and pricing.
- Make your profile eligible for search
A valid, listed, unblocked, verified profile can appear in our publisher sitemap and become eligible for search-engine visibility. Search engines decide what to index and rank.
- Appear in our llms-full.txt
Eligible verified publishers are listed by name, with their file links and summaries, in the service overview agents can read.
Free account required for verification and live checks. No backlink or payment required. Public discovery remains available without verification.
Let your coding agent verify it
If your coding agent is authorized to manage this website, paste these instructions into it.
Claim my listing on Agent Web Map for ai-sdk.dev:
1. POST https://agentwebmap.com/v1/sites/ai-sdk.dev/claims and keep claim_id and claim_secret private.
2. Publish the verification line "AgentWebMap verification: <token>" (token from step 1) in https://ai-sdk.dev/llms.txt, or use the DNS, meta-tag or well-known method the response describes. This only verifies the listing; your website and domain remain yours.
3. POST https://agentwebmap.com/v1/sites/ai-sdk.dev/verify with {"claim_id": "...", "claim_secret": "..."}.
4. Save the api_key from the answer; it manages the listing (PATCH https://agentwebmap.com/v1/sites/ai-sdk.dev).
MCP equivalent: tools begin_ownership_claim, then verify_domain, at https://agentwebmap.com/mcp. Docs: https://agentwebmap.com/docs#verifyCorrections or removal requests: contact the directory.