项目 / plastic-labs/tutor-gpt

plastic-labs/tutor-gpt

行业推荐
语言 TypeScript标签 aieducationliteracymachine-learningprompt-engineeringtheory-of-mindtutoringhacktoberfesto1reasoning数据更新 2026-11-24 06:50:13 · 仓库 2026-11-23

一段话介绍

Plastic Labs 开发的 LLM 学习同伴,用来根据学习者的需要动态调整自身提示。源文写明它借助心智理论(Theory of Mind)相关实验,已不只是读写辅导,而是更开阔的学习同伴;用户表征与个性化由 [Honcho](https://honcho.dev) 提供。托管版本名为 [Bloom](https://bloombot.ai)。项目是使用 App Router 的 Next.js 应用,本地可克隆[仓库](https://github.com/plastic-labs/tutor-gpt),用 pnpm 安装依赖,配置 `.env.local` 后执行 `pnpm run dev`,再在浏览器打开本机 3000 端口。说明见[仓库 README](https://github.com/plastic-labs/tutor-gpt),背景见[相关博文](https://blog.plasticlabs.ai/blog/Theory-of-Mind-Is-All-You-Need)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
AI tutor powered by Theory-of-Mind reasoning
935累计星
99Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

大模型应用工程化与评测

适配系统:AI 应用平台、模型评测平台 · 得分 1.2

提供模型接入、编排与效果评测能力,可作为行业 AI 应用的工程底座与质量闸门。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
可运行 pnpm run dev。
特点或设计要点
项目结构包含页面与 API 路由、前端钩子、外部服务封装、组件、本地 Supabase 的 SQL 脚手架,以及生命周期脚本。认证与订阅记录使用 Supabase(源文建议本地开发用 supabase-cli 启动,并依赖 Docker);模型调用走 Openrouter;另外还接入 PostHog 与 Stripe。也可按 README 使用 Docker 运行。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-02-20 · 语言 TypeScript · 贡献者 —
llm

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 8,466 字节。

# Tutor-GPT

![Static Badge](https://img.shields.io/badge/Version-0.8.0-blue)
[![Discord](https://img.shields.io/discord/1076192451997474938?logo=discord&logoColor=%23ffffff&label=Bloom&labelColor=%235865F2)](https://discord.gg/bloombotai)
![GitHub License](https://img.shields.io/github/license/plastic-labs/tutor-gpt)
![GitHub Repo stars](https://img.shields.io/github/stars/plastic-labs/tutor-gpt)
[![X (formerly Twitter) URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Ftwitter.com%2FBloomBotAI&label=Twitter)](https://twitter.com/BloomBotAI)
[![arXiv](https://img.shields.io/badge/arXiv-2310.06983-b31b1b.svg)](https://arxiv.org/abs/2310.06983)
<br />
<br />
<a href="https://vercel.com/oss">
<img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" />
</a>

Tutor-GPT is an LLM powered learning companion developed by [Plastic
Labs](https://plasticlabs.ai). It dynamically reasons about your learning needs
and _updates its own prompts_ to best serve you.

We leaned into theory of mind experiments and it is now more than just a
literacy tutor, it’s an expansive learning companion. Read more about how it
works [here](https://blog.plasticlabs.ai/blog/Theory-of-Mind-Is-All-You-Need).

Tutor-GPT is powered by [Honcho](https://honcho.dev) to build robust user
representations and create a personalized experience for each user.

The hosted version of `tutor-gpt` is called [Bloom](https://bloombot.ai) as a
nod to Benjamin Bloom's Two Sigma Problem.

Alternatively, you can run your own instance of the bot by following the
instructions below.

## Project Structure

The tutor-gpt project is a Next.js application using the app router.

- `app/` - the pages, layouts, and API routes
- `hooks/` - Custom hooks made for the front end
- `util/` - Various utility functions and integrations with external services
- `components/` - this contains a FullStack `Next.js` version of Tutor-GPT
- `supabase/` - contains SQL scripts necessary for setting up local supabase
- `scripts/` - Lifecycle scripts that help setup and sync the project

We use [pnpm](https://pnpm.io/) for dependency management.

The project also makes use of several third party services

- [Honcho](https://honcho.dev) for identity modeling and personalization
- [Supabase](https://supabase.com) for user authentication and database
- [Openrouter](https://openrouter.ai) for LLM integration
- [PostHog](https://posthog.com) for analytics
- [Stripe](https://stripe.com) for payments

## Installation

Clone the repo and install the necessary Node.js dependencies

```bash
git clone https://github.com/plastic-labs/tutor-gpt.git && cd tutor-gpt
pnpm install
```

Set up your [environment variables](#environment-variables) in a `.env.local`
file. Then launch the development server.

```bash
pnpm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Environment Variables

This section goes over the various environment variables necessary to run the
Tutor-GPT webui. A `.env.template` file is provided to get started quickly.

**Core**

- `NEXT_PUBLIC_SITE_URL` — The URL that the Next.js application will run from. For
  local development it will be `http://localhost:3000` by default.

**LLM**

- `AI_API_KEY` — The API key for the inference provider
- `AI_PROVIDER` — The name of the LLM inference provider
- `AI_BASE_URL` — An OpenAI compatible API endpoint for LLM inference
- `MODEL` — The LLM model to use for generating responses.

**Mistral**

- `MISTRAL_API_KEY` — The API key for Mistral OCR

**Honcho**

- `HONCHO_URL` — The URL for the Honcho instance to use
- `HONCHO_APP_NAME` — The name of the app in Honcho to use

**Supabase**

- `NEXT_PUBLIC_SUPABASE_URL` — The URL for your Supabase project.
- `NEXT_PUBLIC_SUPABASE_ANON_KEY` — The public API key for your Supabase project.
- `SUPABASE_SERVICE_ROLE_KEY` — The service key for the Supabase project.
- `JWT_SECRET` — The secret key to use for signing JWT tokens

**Stripe**

- `NEXT_PUBLIC_STRIPE_ENABLED` — A feature flag to enable or disable stripe. By
  default, it is `false`
- `STRIPE_SECRET_KEY` — The stripe secret key
- `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` — The stripe public key
- `STRIPE_WEBHOOK_SECRET` — The stripe webhook secret

Below are several optional environment variables to enable error monitoring and
analytics.

**Sentry**

- `NEXT_PUBLIC_SENTRY_DSN` — The Sentry DSN
- `SENTRY_ENVIRONMENT` — The Sentry environment
- `SENTRY_RELEASE` — The Sentry release

**Posthog**

- `NEXT_PUBLIC_POSTHOG_KEY` — The Posthog project key
- `NEXT_PUBLIC_POSTHOG_HOST` — The Posthog host

## Supabase

### Setup

This project uses supabase for managing authentication and keeping track of
stripe subscriptions. We recommend for testing and local development to use a
local instance of supabase. The supabase-cli is the best way to do this.

Follow the [Supabase Documentation](https://supabase.com/docs/guides/cli/local-development) for more information. The project contains a `supabase/` folder that contains the scaffolding SQL migrations necessary for setting up the necessary tables. Once you have the supabase cli installed you can simply run the below command in the `tutor-gpt` folder and a local instance of Supabase will start up.

> NOTE: Local Supabase relies on docker so ensure docker is also running before running the below command

```bash
supabase start
```

Another, useful note about doing testing locally with supabase is that there is
no need to verify an account when it is created so you can create a new account
on the webui and then immediately sign in with it.

### Authentication

This application uses the new [Supabase SSR](https://supabase.com/docs/guides/auth/server-side) features and the PKCE authentication flow. So there are a
few setup steps required before the app works with Supabase.

The main change is that the email templates for authentication need to be
modified to perform the token exchange.

For usage with a local instance of supabase the appropriate email templates have
been setup in `./supabase/templates`

Confirm Signup

```html
<h2>Confirm your signup</h2>

<p>Follow this link to confirm your user:</p>
<p>
  <a href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email"
    >Confirm your email</a
  >
</p>
```

Invite User

```html
<h2>You have been invited</h2>

<p>
  You have been invited to create a user on {{ .SiteURL }}. Follow this link to
  accept the invite:
</p>
<p>
  <a
    href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=invite&next=/path-to-your-update-password-page"
    >Accept the invite</a
  >
</p>
```

Magic Link

```html
<h2>Magic Link</h2>

<p>Follow this link to login:</p>
<p>
  <a
    href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=magiclink"
    >Log In</a
  >
</p>
```

Change Email Address

```html
<h2>Confirm Change of Email</h2>

<p>
  Follow this link to confirm the update of your email from {{ .Email }} to {{
  .NewEmail }}:
</p>
<p>
  <a
    href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email_change"
  >
    Change Email
  </a>
</p>
```

Reset Password

```html
<h2>Reset Password</h2>

<p>Follow this link to reset the password for your user:</p>
<p>
  <a
    href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=recovery&next=/auth/reset"
    >Reset Password</a
  >
</p>
```

## Docker

A `Dockerfile` is included for convenience in self hosting an local development.
to build and run the image run the following commands

```bash
cd tutor-gpt
docker build -t tutor-gpt .
docker run --env-file .env.local -p 3000:3000 tutor-gpt
```

## Contributing

This project is completely open source and welcomes any and all open source contributions. The workflow for contributing is to make a fork of the repository. You can claim an issue in the issues tab or start a new thread to indicate a feature or bug fix you are working on.

Once you have finished your contribution make a PR pointed at the `staging` branch and it will be reviewed by a project manager. Feel free to join us in our [discord](http://discord.gg/bloombotai) to discuss your changes or get help.

Once your changes are accepted and merged into staging they will under go a period of live testing before entering the upstream into `main`

## License

Tutor-GPT is licensed under the GPL-3.0 License. Learn more at the [License file](./LICENSE)
↑