# Repository Briefing: THU-MAIC/OpenMAIC
> Source: https://repoforai.com/repo/THU-MAIC/OpenMAIC (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/THU-MAIC/OpenMAIC
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (100/100 · Maintenance 35/35 · Adoption 25/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.6.1 (2026-12-04) — https://github.com/THU-MAIC/OpenMAIC/releases
- **Review Snapshot**: 2026-12-03 (Note: v1.6.1 on 2026-12-04 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Docker, Self-Hosted
- **Momentum**: 45,686 ★ total (+81 24h / +785 7d) · 7,026 forks
- **When to Use**: Best for: Educators and courseware teams that want to turn source material into guided, interactive lessons and can operate a Node.js/PostgreSQL service and review generated content before delivery. Skip if: You only need slide decks, have a serverless-only hosting policy, or require turnkey institutional identity and grading workflows.

## Overview
```text
### Architecture & Core Mechanics
OpenMAIC is a TypeScript and Next.js application that turns a topic or document into a course and orchestrates AI teachers and classmates during playback. Course generation runs in a long-lived Node.js process and continues after the browser leaves the page. PostgreSQL backs course documents, folders, chat history, and learner sessions through `/api/persistence`; generated media can use S3. The browser retains device-local settings, playback position, and caches rather than the authoritative course library.

`openmaic.yml` separates provider accounts from capability slots, so the outline, default chat, speech, and agent can use different models. The manifest includes AI SDK adapters for OpenAI, Anthropic, Google, Azure, and Bedrock. Slots can be locked and user-supplied keys can be disabled. The optional workbench shares PostgreSQL with the application and routes tool calls through its `agent` slot.

### Key Capabilities & Differentiators
A generated course can combine slides, quizzes, interactive HTML simulations, and project-based learning (PBL). AI teachers and classmates lead discussions, speak through TTS, and use a whiteboard for diagrams and formulas. The v1.6.0 PBL tutor guides learners through milestones and adds project explanation boards. Speech recognition also supports workbench dictation in that release.

The export formats serve different purposes: `.pptx` retains every scene, a standalone `.html` plays the lesson offline, and a classroom ZIP transfers it to another deployment. Offline playback does not imply offline course generation. The OpenMAIC Skill exposes course creation through agent environments such as OpenClaw and Codex, while local-provider options include Lemonade for language models, images, TTS, and ASR.

### Trade-offs & Limitations
Compared with a slide generator, OpenMAIC delivers a playable lesson in which discussion, quizzes, simulations, and project work are part of the course itself. That breadth adds provider configuration and more generated material to review. Use a dedicated slide tool if the deck is the only deliverable; if rosters, grading, or institutional reporting are decisive, evaluate an LMS separately rather than assuming the classroom runtime replaces it.

Hosted model APIs keep inference hardware off the application host, but add provider latency, usage charges, and data-handling constraints. Local models shift capacity planning and maintenance to the operator. The site-wide access code gates access but does not create individual identities: the default Compose installation has one library shared by everyone who can enter. Choose an identity mode before importing older courses, because it determines which owner receives them.

### Hardware & Deployment Guide
Use Docker Compose for a personal installation or run the app with Node.js 22.19+, pnpm 10+, and PostgreSQL 16. For development, `pnpm db:up` starts PostgreSQL and `pnpm dev` starts the app once `DATABASE_URL` is set. Compose supplies the database connection, binds to `127.0.0.1:3000`, and preserves state in named volumes. Before publishing it, configure a strong `ACCESS_CODE` and set a non-default database password before the first start. For separate signed-in libraries, integrate owner authentication through `instrumentation.ts`.

OpenMAIC has required a long-running process since v1.2.0; current releases are not compatible with the old Vercel serverless deployment path. The v1.5 workbench is off by default and needs both a build-time UI flag and a server runtime flag. For v1.6.0 upgrades, migrate legacy provider configuration before rollout. That release moves slide rendering into the package and makes PostgreSQL-backed video export queuing opt-in through `RENDER_DURABLE_QUEUE`.
```

## Key Capabilities
```text
- Runtime: Long-running Node.js generation continues after the learner leaves the page; `/api/persistence` serves PostgreSQL-backed course state.
- Model routing: `openmaic.yml` maps outline, agent, and speech capabilities to providers and models, with controls over user overrides.
- Classroom scenes: Slides, quizzes, interactive HTML simulations, and PBL share a classroom with AI teachers and classmates.
- Portability: `.pptx` retains every scene, standalone `.html` plays offline, and classroom ZIPs move courses between deployments.
- Identity: Compose defaults to one shared owner on loopback; separate signed-in libraries require owner-auth integration.
- v1.6.0: Guided PBL explanation boards, package-only slide rendering, and opt-in PostgreSQL video export queuing via `RENDER_DURABLE_QUEUE`.
```

## Quick Start / Clone
```bash
git clone https://github.com/THU-MAIC/OpenMAIC.git
cd OpenMAIC
pnpm install
```
