Skip to content
Back to search

juben

Production-ready multi-agent platform for short-drama planning, writing & evaluation — 40+ specialized AI agents, streaming UX, dual-layer memory, knowledge graph, and end-to-end creative workflows.|AI影视多智能体创作平台:40+ 专业 AI Agent,覆盖策划、创作、评估全流程;多智能体协作编排批量生成剧本提示词|完整影视工作流|短长剧本策划写作评估|人物小传|故事大纲|飞书集成|

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/vangong1999--juben/badge.svg)](/listings/vangong1999--juben)

HTML

<a href="/listings/vangong1999--juben"><img src="/api/listings/vangong1999--juben/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Requirements:** Python 3.10+, Node 18+ / pnpm, PostgreSQL, Redis, Docker (Neo4j / optional Milvus), a **DeepSeek** (recommended) or Zhipu LLM API key.

git clone https://github.com/GongLingRui/juben.git
cd juben

python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cd frontend && pnpm install && cd ..

cp .env.example .env
# set DEEPSEEK_API_KEY (recommended) or ZHIPU_API_KEY, plus DB secrets
# optional: WEB_SEARCH_PROVIDER=deepseek|baidu

bash scripts/start_dev.sh
# Backend http://localhost:8000  ·  Frontend http://localhost:5173

After the UI loads, switch language with **中 / EN** in the top-right corner.

Manual alternative: start Postgres/Redis/Neo4j/Milvus yourself, then `python main.py` and `pnpm dev` in `frontend/`.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 841 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # 剧本创作 Agent 平台 · Script Creation Agent Platform
  2. > 💡 **语言切换**
  3. > - **产品界面**:打开应用后,点击右上角 **中 / EN** 即可切换中英文界面。
  4. > - **本 README**:点击下方 [中文](#-中文文档) / [English](#-english-documentation) 跳转对应文档;两套文档使用不同截图。
  5. <p align="center">
  6. <strong>生产级 · 多智能体 · 短剧全流程创作系统</strong><br/>
  7. <em>Plan → Write → Evaluate → Ship — powered by 40+ specialized AI Agents</em>
  8. </p>
  9. <p align="center">
  10. <a href="#-中文文档">中文</a> ·
  11. <a href="#-english-documentation">English</a> ·
  12. <a href="https://github.com/GongLingRui/juben/issues">Issues</a> ·
  13. <a href="#-联系与支持--contact--support">联系 / Contact</a>
  14. </p>
  15. <p align="center">
  16. <img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg" />
  17. <img alt="Python" src="https://img.shields.io/badge/python-3.10%2B-brightgreen.svg" />
  18. <img alt="React" src="https://img.shields.io/badge/react-18-61DAFB.svg" />
  19. <img alt="TypeScript" src="https://img.shields.io/badge/typescript-5-3178C6.svg" />
  20. <img alt="FastAPI" src="https://img.shields.io/badge/FastAPI-0.104-009688.svg" />
  21. <img alt="Agents" src="https://img.shields.io/badge/AI%20Agents-40%2B-orange.svg" />
  22. <img alt="DeepSeek" src="https://img.shields.io/badge/LLM-DeepSeek%20%2B%20Zhipu-informational.svg" />
  23. </p>
  24. **相关仓库**
  25. - 剧本知识库:[VanGong1999/skills](https://github.com/VanGong1999/skills)
  26. - 影视创作 Skills:[VanGong1999/screen-creative-skills](https://github.com/VanGong1999/screen-creative-skills)
  27. ---
  28. # 🇨🇳 中文文档
  29. ## 目录
  30. - [为什么是这个项目](#为什么是这个项目)
  31. - [项目截图](#项目截图)
  32. - [功能全景](#功能全景)
  33. - [40+ Agents 一览](#40-agents-一览)
  34. - [模型与搜索](#模型与搜索)
  35. - [系统能力详解](#系统能力详解)
  36. - [技术架构](#技术架构)
  37. - [技术栈](#技术栈)
  38. - [项目结构](#项目结构)
  39. - [快速开始](#快速开始)
  40. - [环境变量](#环境变量)
  41. - [常用 API](#常用-api)
  42. - [开发指南](#开发指南)
  43. - [路线图](#路线图)
  44. - [贡献指南](#贡献指南)
  45. - [联系与支持](#-联系与支持--contact--support)
  46. - [许可证](#许可证)
  47. ---
  48. ## 为什么是这个项目
  49. 短剧行业正在爆发,但创作链路仍然碎片化:有人用大模型写大纲,有人用表格管人设,有人靠经验「估」商业价值——**工具散、上下文断、质量不可复现**。
  50. **剧本创作 Agent 平台**把「策划 → 创作 → 评估 → 交付」做成一条可编排、可记忆、可审计的多智能体流水线:
  51. | 痛点 | 本项目怎么解 |
  52. |------|-------------|
  53. | 提示词临时拼凑 | 40+ 专职 Agent + 领域提示词 / 技能包 |
  54. | 多轮对话丢设定 | 双层记忆 + 剧集上下文 + 检查点恢复 |
  55. | 质量全凭感觉 | 多维评估 Agent + 评分体系 + 一致性检查 |
  56. | 知识无法沉淀 | LLM 知识页 + 向量检索(Milvus)+ 图数据库(Neo4j) |
  57. | 前后端玩具级演示 | 生产级 FastAPI + React/TS + SSE 流式 + 鉴权权限控制 |
  58. 如果你是:
  59. - **编剧 / 短剧团队** —— 想要可落地的创作辅助工作台
  60. - **内容公司 / 工作室** —— 想把 IP 筛选、评估、批量分集做成流水线
  61. 欢迎 **⭐ Star** 与 **Fork**,一起把影视创作的 Agent 基建做厚。
  62. ---
  63. ## 项目截图
  64. 界面右上角可随时切换中 / EN。以下为**中文界面**截图(英文界面见 [English Screenshots](#screenshots))。
  65. | 创作工作台 | 剧集工作区 |
  66. |:---:|:---:|
  67. | ![创作工作台](./pictures/01-studio.png) | ![剧集工作区](./pictures/02-drama-workspace.png) |
  68. | Agents 中心 | 知识图谱 |
  69. |:---:|:---:|
  70. | ![Agents 中心](./pictures/03-agents-hub.png) | ![知识图谱](./pictures/04-knowledge-graph.png) |
  71. | 记忆中心 | 工作流 |
  72. |:---:|:---:|
  73. | ![记忆中心](./pictures/07-memory-center.png) | ![工作流](./pictures/工作流.png) |
  74. | 工具箱 | 工具调用 |
  75. |:---:|:---:|
  76. | ![工具箱](./pictures/工具箱.png) | ![工具调用](./pictures/工具调用.png) |
  77. | 上下文压缩 | 故事大纲 |
  78. |:---:|:---:|
  79. | ![上下文压缩](./pictures/上下文压缩.png) | ![故事大纲](./pictures/故事大纲.png) |
  80. | 创作图 | 知识图谱记忆抽取 |
  81. |:---:|:---:|
  82. | ![创作图](./pictures/创作图.png) | ![知识图谱记忆抽取](./pictures/知识图谱记忆抽取.png) |
  83. | 创作产物 | AI对话 |
  84. |:---:|:---:|
  85. | ![创作产物](./pictures/创作产物.png) | ![AI对话](./pictures/AI对话.png) |
  86. | 创作台界面 | AI对话 |
  87. |:---:|:---:|
  88. | ![创作台界面](./pictures/创作台界面.png) | ![AI对话](./pictures/AI对话.png) |
  89. | 分集写作 | 知识图谱抽取 |
  90. |:---:|:---:|
  91. | ![分集写作](./pictures/分集写作.png) | ![知识图谱抽取](./pictures/知识图谱抽取.png) |
  92. ---
  93. ## 功能全景
  94. ```
  95. ┌─────────────────────────────────────────────────────────────────┐
  96. │ 剧本创作 Agent 平台 │
  97. ├───────────────┬───────────────┬───────────────┬─────────────────┤
  98. │ 📋 策划 │ ✍️ 创作 │ ⭐ 评估 │ 🔍 分析 │
  99. │ 情绪价值 │ 分集写作 │ 多维打分 │ 五元素/情节点 │
  100. │ 黄金三秒钩子 │ 批量分集 │ IP 价值 │ 已播剧拆解 │
  101. │ 三幕式结构 │ 视频提示词 │ 小说筛选 │ 逻辑一致性 │
  102. ├───────────────┼───────────────┼───────────────┼─────────────────┤
  103. │ 👤 人物 │ 📖 故事 │ 🔄 工作流 │ 🛠️ 工具 │
  104. │ 小传生成 │ 大纲/导图 │ 8 阶段流水线 │ 搜索/OCR/ASR │
  105. │ 关系网络 │ 情节点展开 │ 编排/门房 │ 知识库/文件引用 │
  106. ├───────────────┴───────────────┴───────────────┴─────────────────┤
  107. │ 💾 记忆 · 📁 项目 · 🗒️ 笔记 · 🕸️ 图谱 · 📚 知识页 · 📊 统计 │
  108. └─────────────────────────────────────────────────────────────────┘
  109. ```
  110. ### 核心亮点
  111. 1. **40+ 专业 Agents** — 策划、创作、评估、分析、人物、故事、工作流、工具全覆盖
  112. 2. **SSE 流式交互** — 打字机输出、思考链、工具调用、进度事件实时可见
  113. 3. **双层记忆系统** — 短期对话记忆 + 中期任务总结,跨会话可复用
  114. 4. **剧集工场** — 项目化管理大纲、分集、人设、评估产物
  115. 5. **知识体系** — 技能包 / 知识页 / 向量库 / Neo4j 知识图谱
  116. 6. **批量生产能力** — 分集批量创作、视频提示词批量生成
  117. 7. **多模型与联网搜索** — DeepSeek(默认)+ 智谱备用,支持 DeepSeek / 百度搜索
  118. 8. **生产级基础设施** — 鉴权、限流、幂等、检查点、分布式可靠性加固
  119. 9. **一键本地启动** — `scripts/start_dev.sh` 拉起依赖 + 前后端
  120. ---
  121. ## 40+ Agents 一览
  122. ### 📋 策划类
  123. | 名称 | 能力 |
  124. |------|------|
  125. | 短剧策划助手 | 情绪价值、黄金三秒钩子、期待-压抑-爆发结构、商业卡点 |
  126. | 自动编排 / 自动编排助手 / 门房接待 | 任务编排、多 Agent 调度、接待引导 |
  127. ### ✍️ 创作类
  128. | 名称 | 能力 |
  129. |------|------|
  130. | 短剧创作助手 | 完整短剧剧本、场景与对白、设定约束与语气一致性 |
  131. | 单集编剧 / 分集连载编排 | 单集写作 / 多集批量创作 |
  132. | 单集视频提示词 / 视频提示词批量编排 | 视频提示词单集 / 批量生成 |
  133. | 文档生成器 | TXT / Markdown / JSON 等文档导出 |
  134. ### ⭐ 评估类
  135. | 名称 | 能力 |
  136. |------|------|
  137. | 短剧评估助手 | 爽点、人设、桥段、市场竞争力、开发价值打分 |
  138. | 剧本评估专家 | 结构问题定位与优化方案 |
  139. | IP价值评估 | IP 商业价值与竞品对比 |
  140. | 故事质量评估 / 大纲评估 | 故事与大纲质量评估 |
  141. | 小说筛选评估 | 小说改编短剧可行性 |
  142. | 评分分析器 / 结果分析评估 | 评分统计与多结果洞察 |
  143. | 文本处理评估 | 文本处理质量评估 |
  144. ### 🔍 分析类
  145. | 名称 | 能力 |
  146. |------|------|
  147. | 故事五元素分析 | 冲突、人物、结构、主题、情感基调 |
  148. | 剧本深度分析 / 已播剧集分析 | 剧本深度分析 / 已播剧拆解 |
  149. | 情节点分析 / 大情节点分析 / 详细情节点 | 情节点识别、展开与节奏评估 |
  150. | 故事类型分析 | 类型识别与创作规范 |
  151. | 逻辑一致性校验 | 设定与剧情逻辑一致性校验 |
  152. ### 👤 人物类
  153. | 名称 | 能力 |
  154. |------|------|
  155. | 人物小传生成 | 300–500 字人物小传与背景 |
  156. | 人物关系分析 | 9 种关系类型网络分析 |
  157. ### 📖 故事与工作流
  158. | 名称 | 能力 |
  159. |------|------|
  160. | 故事大纲生成 / 思维导图 | 大纲精炼 / 思维导图 |
  161. | 情节点工作流 | 8 阶段流水线(验证→预处理→大纲→小传→大情节→细情节→导图→格式化) |
  162. | 剧本创作工作流 | 创意→大纲→剧本→质检 |
  163. | 结果集成器 / 输出格式化 | 多结果聚合与格式规范化 |
  164. | 元优化器 / 记忆策展人 | 元优化与记忆策展 |
  165. ### 🛠️ 工具类
  166. | 名称 | 能力 |
  167. |------|------|
  168. | 联网搜索 / 知识库 / 图谱检索 | 联网搜索、知识库、图谱 RAG |
  169. | 文件引用 / OCR | `@文件` 引用、OCR |
  170. | 剧集信息 / 剧名抽取 | 剧集信息与剧名抽取 |
  171. | 文本切分 / 文本截断 | 智能切分与截断 |
  172. ---
  173. ## 模型与搜索
  174. 本项目**默认使用 DeepSeek**,同时支持智谱等备用提供商,并内置联网搜索能力。
  175. ### 大模型
  176. | 提供商 | 说明 | 常用模型 |
  177. |--------|------|----------|
  178. | **DeepSeek(默认)** | 主力文本与推理 | `deepseek-flash`、`deepseek-v4-pro`、`deepseek-chat` |
  179. | **智谱 AI(备用)** | 免费 / 低成本备选 | `glm-4.7-flash` 等 Flash 系列 |
  180. | OpenAI / OpenRouter(可选) | 兼容 OpenAI 协议的第三方 | 按需配置 |
  181. 在设置页或 `.env` 中配置 `DEEPSEEK_API_KEY`(推荐)或 `ZHIPU_API_KEY` 即可;默认提供商由 `DEFAULT_MODEL_PROVIDER=deepseek` 控制。
  182. ### 联网搜索
  183. | 搜索提供商 | 说明 |
  184. |------------|------|
  185. | **DeepSeek 搜索(默认)** | `WEB_SEARCH_PROVIDER=deepseek`,与 DeepSeek 账号体系打通 |
  186. | **百度搜索** | 可切换为百度网页 / 百科等综合检索 |
  187. Agents(如联网搜索)可按意图自动触发搜索,结果带来源标注,便于策划调研与竞品分析。
  188. ---
  189. ## 系统能力详解
  190. ### 1. 创作与剧集工场
  191. - **创作工作台 / 剧集工作区**:围绕一部戏组织大纲、分集、人设、评估与导出
  192. - **分集编辑器**:单集精写、批量分集、卡点与节奏控制
  193. - **视频提示词链路**:从剧本到可投喂视频模型的分镜 / 提示词
  194. - **产物面板**:Agent 产物集中浏览、对比、归档
  195. ### 2. 记忆与上下文
  196. - **短期记忆**:最近对话消息(Redis),保证会话连贯
  197. - **中期记忆**:任务级总结,跨会话复用
  198. - **对话上下文**:用户消息、编排调用、笔记、共享内存
  199. - **检查点**:长任务可恢复,降低中断成本
  200. ### 3. 笔记与项目
  201. - Agent 输出自动落为笔记(标题、类型、评论、选择态)
  202. - 支持 TXT / Markdown / JSON 导出
  203. - 项目增删改查、标签、模板、复制、软删除
  204. - 按类型归档:策划、人设、剧本、情节点、评估、参考资料
  205. ### 4. 知识与图谱
  206. - **知识页**:可演进的创作知识(钩子、节奏、人设声线、反派阶梯等)
  207. - **Milvus**:向量检索专业知识与优秀片段
  208. - **Neo4j**:人物 / 事件 / 设定关系图谱可视化与审核中心
  209. - **技能包**:可同步的影视创作技能
  210. ### 5. 质量与一致性
  211. - 多维打分标准(优秀 / 有潜力 / 一般 / 较差)
  212. - 逻辑一致性 Agent
  213. - 内容质量评估工具链
  214. - A/B 与评测脚手架(`evals/`、`scripts/run_agent_evals.py`)
  215. ### 6. 前端体验
  216. - 高对比简洁界面;右上角一键切换中英文
  217. - SSE 流式:消息 / 内容片段 / 思考 / 工具调用 / 进度 / 完成…
  218. - Markdown、代码高亮、思维导图、流程图、力导向图谱
  219. - 虚拟滚动、分屏、工作流监控、Token 用量、统计看板
  220. ### 7. 平台与运维能力
  221. - JWT 鉴权、角色权限、限流
  222. - 幂等键、缓存(内存 → Redis → PostgreSQL 多层)
  223. - 飞书集成、DeepSeek / 百度搜索、反馈闭环、发布管理
  224. - Docker Compose:Neo4j;可选 Milvus
  225. ---
  226. ## 技术架构
  227. ```
  228. 浏览器(React + TypeScript + Vite)
  229. │ HTTPS / SSE
  230. ▼
  231. FastAPI 网关(apis/* · 中间件 · 鉴权)
  232. │
  233. ├─► 编排器 / 指挥 / 门房
  234. │ │
  235. │ ▼
  236. │ 专业 Agents(agents/*)
  237. │ │
  238. │ ▼
  239. │ 工具 · 技能包 · 提示词层
  240. │
  241. ├─► PostgreSQL (业务 / 持久化)
  242. ├─► Redis (会话 / 缓存 / 记忆)
  243. ├─► Milvus (向量知识)
  244. └─► Neo4j (知识图谱)
  245. ```
  246. ---
  247. ## 技术栈
  248. | 层级 | 技术 |
  249. |------|------|
  250. | 后端 | Python 3.10–3.12、FastAPI、Uvicorn、Pydantic v2 |
  251. | 前端 | React 18、TypeScript、Vite、Zustand、xyflow、markmap、Mermaid |
  252. | LLM | DeepSeek(默认)、智谱 AI、OpenAI / OpenRouter(可选) |
  253. | 搜索 | DeepSeek 搜索(默认)、百度搜索(可选) |
  254. | 数据 | PostgreSQL、Redis、Milvus、Neo4j |
  255. | 观测 | structlog、Prometheus、LangSmith(可选) |
  256. | 集成 | 飞书 lark-oapi、OCR / ASR(可选) |
  257. ---
  258. ## 项目结构
  259. ```
  260. juben/
  261. ├── main.py # FastAPI 入口
  262. ├── agents/ # 40+ Agents
  263. ├── apis/ # 按域拆分的路由(对话 / 剧集 / 图谱 / 记忆 …)
  264. ├── prompts/ # Agent 系统提示词
  265. ├── utils/ # 流式、记忆、知识页、缓存、质量等基础设施
  266. ├── middleware/ # 鉴权、限流、缓存控制
  267. ├── config/ # 配置与 pytest
  268. ├── frontend/ # React 前端
  269. ├── skills/ # 本地技能包
  270. ├── data/knowledge/ # 知识页 / 图谱种子知识(可提交)
  271. ├── scripts/start_dev.sh # 一键本地启动
  272. ├── docker-compose.yml # Neo4j
  273. ├── docker-compose.milvus.yml
  274. ├── pictures/ # README 截图与联系方式二维码
  275. │ ├── 01-studio.png … # 中文界面截图
  276. │ ├── en-*.png # 英文界面截图
  277. │ ├── 微信好友.JPG
  278. │ ├── 公众号.jpg
  279. │ ├── 微信收款.jpg
  280. │ └── 支付宝收款.jpg
  281. ├── tests/ # 单元 / 集成测试
  282. └── requirements.txt
  283. ```
  284. > 运行时目录(`projects/`、`logs/`、`juben_outputs/`、`volumes/` 等)已在 `.gitignore` 中忽略,勿提交。
  285. ---
  286. ## 快速开始
  287. ### 环境要求
  288. - Python **3.10+**(推荐 3.12)
  289. - Node.js **18+** + **pnpm**
  290. - PostgreSQL、Redis(可用 Homebrew)
  291. - Docker(用于 Neo4j / 可选 Milvus)
  292. - **DeepSeek** 或智谱等 LLM API Key(推荐 DeepSeek)
  293. ### 1. 克隆与依赖
  294. ```bash
  295. git clone https://github.com/GongLingRui/juben.git
  296. cd juben
  297. python3 -m venv venv
  298. source venv/bin/activate # Windows: venv\Scripts\activate
  299. pip install -r requirements.txt
  300. cd frontend && pnpm install && cd ..
  301. ```
  302. ### 2. 配置环境变量
  303. ```bash
  304. cp .env.example .env
  305. # 编辑 .env:至少配置 DEEPSEEK_API_KEY(推荐)或 ZHIPU_API_KEY,以及数据库密码
  306. # 可选:WEB_SEARCH_PROVIDER=deepseek 或 baidu
  307. ```
  308. ### 3. 一键启动(推荐)
  309. ```bash
  310. bash scripts/start_dev.sh
  311. ```
  312. 脚本会尝试:
  313. 1. 启动 PostgreSQL / Redis(Homebrew)
  314. 2. `docker compose` 启动 Neo4j,并拉起 Milvus
  315. 3. 后端 → [http://localhost:8000](http://localhost:8000)
  316. 4. 前端 → [http://localhost:5173](http://localhost:5173)
  317. 日志:`/tmp/juben-backend.log`、`/tmp/juben-frontend.log`
  318. 打开前端后,可在**右上角**切换中英文界面。
  319. ### 4. 手动启动(可选)
  320. ```bash
  321. # 依赖
  322. brew services start postgresql@16
  323. brew services start redis
  324. docker compose up -d neo4j
  325. docker compose -f docker-compose.milvus.yml up -d
  326. # 后端
  327. source venv/bin/activate
  328. python main.py
  329. # 前端(另开终端)
  330. cd frontend && pnpm dev
  331. ```
  332. ---
  333. ## 环境变量
  334. 详见 [`.env.example`](./.env.example)。关键项:
  335. | 变量 | 说明 |
  336. |------|------|
  337. | `DEEPSEEK_API_KEY` | DeepSeek API Key(**推荐,默认提供商**) |
  338. | `DEEPSEEK_MODEL` | 默认模型,如 `deepseek-flash` |
  339. | `DEFAULT_MODEL_PROVIDER` | 默认提供商,通常为 `deepseek` |
  340. | `WEB_SEARCH_PROVIDER` | 搜索提供商:`deepseek`(默认)或 `baidu` |
  341. | `ZHIPU_API_KEY` | 智谱备用 Key |
  342. | `POSTGRES_*` | PostgreSQL 连接 |
  343. | `REDIS_*` / 缓存相关 | 会话与多层缓存 |
  344. | `JWT_SECRET_KEY` | 鉴权密钥(生产必须更换) |
  345. | `AUTH_ENABLED` | 是否开启鉴权 |
  346. | `NEO4J_*` / `MILVUS_*` | 图谱与向量库 |
  347. ⚠️ **切勿将 `.env` 提交到 Git。**
  348. ---
  349. ## 常用 API
  350. 前缀以实际路由注册为准(多为 `/juben/...`)。
  351. | 方法 | 路径 | 说明 |
  352. |------|------|------|
  353. | POST | `/juben/chat` | 核心对话(可 SSE) |
  354. | GET | `/juben/models` | 可用模型 |
  355. | GET | `/juben/health` | 健康检查 |
  356. | GET | `/juben/agents` | Agent 列表 |
  357. | GET | `/juben/agents/categories` | Agent 分类 |
  358. | CRUD | `/juben/notes` | 笔记 |
  359. | CRUD | `/juben/projects` | 项目管理 |
  360. | — | 剧集 / 图谱 / 记忆 / 知识库 / 流水线 … | 见 `apis/` |
  361. **SSE 事件类型:** 消息 · 内容片段 · 思考 · 工具调用 · 工具返回 · 进度 · 错误 · 完成 · 系统
  362. ---
  363. ## 开发指南
  364. ```bash
  365. # 后端测试
  366. pytest
  367. pytest --cov=apis --cov=agents --cov-report=html
  368. # 前端
  369. cd frontend
  370. pnpm lint
  371. pnpm type-check
  372. pnpm build
  373. ```
  374. 新增 Agent 建议:
  375. 1. 在 `agents/` 继承 `BaseJubenAgent`
  376. 2. 在 `prompts/` 增加系统提示
  377. 3. 在路由 / 编排器中注册
  378. 4. 补充单元测试
  379. 更多细节见 [`DEVELOPMENT_SETUP.md`](./DEVELOPMENT_SETUP.md)。
  380. ---
  381. ## 路线图
  382. - [ ] 更丰富的分集协作与版本对比界面
  383. - [ ] 更多视频模型提示词模板与导出格式
  384. - [ ] 评测集与回归看板产品化
  385. - [ ] 多租户与企业部署文档
  386. - [ ] 插件化技能包市场
  387. 欢迎在 Issues 投票你最想要的能力。
  388. ---
  389. ## 贡献指南
  390. 1. Fork 本仓库并创建特性分支
  391. 2. 保持改动聚焦,附带必要测试
  392. 3. 不要提交 `.env`、日志、`projects/`、评测结果等运行产物
  393. 4. 提交清晰的 PR 说明
  394. Star 🌟 是对我们最大的鼓励;Issue / PR 同样欢迎。
  395. ---
  396. # 🇬🇧 English Documentation
  397. > 💡 **Language switch**
  398. > - **In the app:** use the **中 / EN** control in the **top-right** corner.
  399. > - **In this README:** jump via [中文](#-中文文档) / [English](#-english-documentation). Screenshots below are from the **English UI**.
  400. ## Table of Contents
  401. - [Why this project](#why-this-project)
  402. - [Screenshots](#screenshots)
  403. - [Feature overview](#feature-overview)
  404. - [40+ Agents at a glance](#40-agents-at-a-glance-1)
  405. - [Models & search](#models--search)
  406. - [Capabilities in depth](#capabilities-in-depth)
  407. - [Architecture](#architecture)
  408. - [Tech stack](#tech-stack-1)
  409. - [Repository layout](#repository-layout)
  410. - [Quick start](#quick-start-1)
  411. - [Environment variables](#environment-variables)
  412. - [Key APIs](#key-apis)
  413. - [Development](#development)
  414. - [Roadmap](#roadmap-1)
  415. - [Contributing](#contributing)
  416. - [Contact & Support](#-联系与支持--contact--support)
  417. - [License](#license)
  418. ---
  419. ## Why this project
  420. Short-drama production is booming, yet the creative stack is still fragmented: LLMs for outlines, spreadsheets for characters, gut feeling for “market value.” **Context breaks. Quality doesn’t reproduce.**
  421. **Script Creation Agent Platform** turns **Plan → Write → Evaluate → Deliver** into an orchestrated, memory-aware, auditable multi-agent pipeline:
  422. | Pain | How we address it |
  423. |------|-------------------|
  424. | Ad-hoc prompting | 40+ specialist agents + domain prompts / Skills |
  425. | Lost story bible across turns | Dual-layer memory + drama context + checkpoints |
  426. | Subjective quality | Multi-dimensional evaluation + scoring + consistency checks |
  427. | Knowledge that never compounds | LLM Wiki + Milvus vectors + Neo4j graph |
  428. | Toy demos | Production FastAPI + React/TS + SSE + auth/RBAC |
  429. Built for **writers & studios**, **AI engineers**, and **content companies** who want real agent infrastructure for screen creativity.
  430. If this helps you — please **⭐ Star** and **Fork**.
  431. ---
  432. ## Screenshots
  433. English UI screenshots (`pictures/en-*.png`). For Chinese UI shots, see [项目截图](#项目截图).
  434. | Studio | Agents conversation |
  435. |:---:|:---:|
  436. | ![Studio](./pictures/en-studio.png) | ![Agents talk](./pictures/en-agents-talk.png) |
  437. | Memory center | Settings |
  438. |:---:|:---:|
  439. | ![Memory](./pictures/en-memory.png) | ![Settings](./pictures/en-setting.png) |
  440. ---
  441. ## Feature overview
  442. - **40+ agents** across planning, writing, evaluation, analysis, characters, story, workflows, and tools
  443. - **Streaming UX** via SSE (tokens, thoughts, tool calls, progress)
  444. - **Dual-layer memory** (short-term chat + mid-term task summaries)
  445. - **Drama workspace** for outlines, episodes, profiles, and artifacts
  446. - **Knowledge stack**: Skills, LLM Wiki, Milvus, Neo4j graph
  447. - **Batch production**: multi-episode writing & video-prompt batches
  448. - **Models & search**: DeepSeek (default) + Zhipu fallback; DeepSeek / Baidu web search
  449. - **Production substrate**: auth, rate limits, idempotency, checkpoints
  450. - **One-command local boot**: `scripts/start_dev.sh`
  451. ---
  452. ## 40+ Agents at a glance
  453. **Planning** — Short Drama Planner; Auto Orchestration / Conductor / Concierge
  454. **Writing** — Short Drama Creator; Episode Writer; Episode Batch Creator; Video Prompt (single / batch); Document Generator
  455. **Evaluation** — Short-drama / Script / IP / Story / Outline / Novel-screening scorers + analyzers
  456. **Analysis** — Story Five Elements; Drama / Series analysis; Plot-point suite; Genre typing; Logic consistency
  457. **Characters** — Character Profile Generator; 9-type Relationship Analyzer
  458. **Story & workflows** — Story Outline; Mind Map; 8-stage Plot Workflow; Drama Workflow; Result Integrator; Meta Optimizer; Memory Curator
  459. **Tools** — Web Search; Knowledge; Graph RAG; File references; OCR; Series extractors; Text split / truncate
  460. ---
  461. ## Models & search
  462. DeepSeek is the **default** provider. Zhipu and OpenAI-compatible endpoints are optional. Web search is built in.
  463. ### LLMs
  464. | Provider | Role | Common models |
  465. |----------|------|----------------|
  466. | **DeepSeek (default)** | Primary text & reasoning | `deepseek-flash`, `deepseek-v4-pro`, `deepseek-chat` |
  467. | **Zhipu AI (fallback)** | Low-cost / free options | `glm-4.7-flash` and other Flash models |
  468. | OpenAI / OpenRouter (optional) | OpenAI-compatible APIs | Configure as needed |
  469. Set `DEEPSEEK_API_KEY` (recommended) or `ZHIPU_API_KEY` in `.env`. Default provider: `DEFAULT_MODEL_PROVIDER=deepseek`.
  470. ### Web search
  471. | Provider | Notes |
  472. |----------|--------|
  473. | **DeepSeek search (default)** | `WEB_SEARCH_PROVIDER=deepseek` |
  474. | **Baidu search** | Switch for Baidu web / Baike-style retrieval |
  475. Search-capable agents can trigger lookups automatically and cite sources for research and competitive analysis.
  476. ---
  477. ## Capabilities in depth
  478. 1. **Creative studio** — project-centric drama workspace, episode editor, video-prompt pipeline, artifacts panel
  479. 2. **Memory & context** — Redis-backed short/mid-term memory, conversation context, recoverable checkpoints
  480. 3. **Notes & projects** — auto-saved agent notes, export, templates, tagging, soft delete
  481. 4. **Knowledge & graph** — evolvable wiki, vector retrieval, Neo4j visualization & review center, syncable Skills
  482. 5. **Quality** — multi-axis scoring, consistency agent, eval scaffolding
  483. 6. **Frontend** — high-contrast UI, top-right **中 / EN** switch, markdown/code highlight, markmap, xyflow, force-graph, virtual scroll, stats & token usage
  484. 7. **Platform** — JWT/RBAC, multi-level cache, Feishu integration, DeepSeek / Baidu search, Dockerized Neo4j (+ optional Milvus)
  485. ---
  486. ## Architecture
  487. ```
  488. Browser (React + TS + Vite)
  489. │ HTTPS / SSE
  490. ▼
  491. FastAPI Gateway
  492. │
  493. ├─► Orchestrator / Conductor / Concierge → Agents → Tools/Skills
  494. ├─► PostgreSQL
  495. ├─► Redis
  496. ├─► Milvus
  497. └─► Neo4j
  498. ```
  499. ---
  500. ## Tech stack
  501. | Layer | Stack |
  502. |-------|--------|
  503. | Backend | Python 3.10–3.12, FastAPI, Uvicorn, Pydantic v2 |
  504. | Frontend | React 18, TypeScript, Vite, Zustand, xyflow, markmap, Mermaid |
  505. | LLM | DeepSeek (default), Zhipu AI, OpenAI / OpenRouter (optional) |
  506. | Search | DeepSeek search (default), Baidu (optional) |
  507. | Data | PostgreSQL, Redis, Milvus, Neo4j |
  508. | Observability | structlog, Prometheus, LangSmith (optional) |
  509. | Integrations | Feishu lark-oapi, OCR / ASR (optional) |
  510. ---
  511. ## Repository layout
  512. See the Chinese [项目结构](#项目结构) section — same tree. Runtime folders (`projects/`, `logs/`, `juben_outputs/`, `volumes/`, …) are gitignored.
  513. Screenshots & contact QR codes live under [`pictures/`](./pictures/): Chinese UI images use numeric / Chinese filenames; English UI images use the `en-` prefix.
  514. ---
  515. ## Quick start
  516. **Requirements:** Python 3.10+, Node 18+ / pnpm, PostgreSQL, Redis, Docker (Neo4j / optional Milvus), a **DeepSeek** (recommended) or Zhipu LLM API key.
  517. ```bash
  518. git clone https://github.com/GongLingRui/juben.git
  519. cd juben
  520. python3 -m venv venv && source venv/bin/activate
  521. pip install -r requirements.txt
  522. cd frontend && pnpm install && cd ..
  523. cp .env.example .env
  524. # set DEEPSEEK_API_KEY (recommended) or ZHIPU_API_KEY, plus DB secrets
  525. # optional: WEB_SEARCH_PROVIDER=deepseek|baidu
  526. bash scripts/start_dev.sh
  527. # Backend http://localhost:8000 · Frontend http://localhost:5173
  528. ```
  529. After the UI loads, switch language with **中 / EN** in the top-right corner.
  530. Manual alternative: start Postgres/Redis/Neo4j/Milvus yourself, then `python main.py` and `pnpm dev` in `frontend/`.
  531. ---
  532. ## Environment variables
  533. See [`.env.example`](./.env.example). Never commit `.env`.
  534. | Variable | Purpose |
  535. |----------|---------|
  536. | `DEEPSEEK_API_KEY` | DeepSeek API key (**recommended default**) |
  537. | `DEEPSEEK_MODEL` | e.g. `deepseek-flash` |
  538. | `DEFAULT_MODEL_PROVIDER` | Usually `deepseek` |
  539. | `WEB_SEARCH_PROVIDER` | `deepseek` (default) or `baidu` |
  540. | `ZHIPU_API_KEY` | Zhipu fallback |
  541. | `POSTGRES_*` | PostgreSQL |
  542. | `REDIS_*` / cache | Session & multi-layer cache |
  543. | `JWT_SECRET_KEY` | Auth secret (change in production) |
  544. | `AUTH_ENABLED` | Toggle auth |
  545. | `NEO4J_*` / `MILVUS_*` | Graph & vector stores |
  546. ---
  547. ## Key APIs
  548. | Method | Path | Purpose |
  549. |--------|------|---------|
  550. | POST | `/juben/chat` | Chat (SSE capable) |
  551. | GET | `/juben/models` | Models |
  552. | GET | `/juben/health` | Health |
  553. | GET | `/juben/agents` | Agent catalog |
  554. | CRUD | `/juben/notes` · `/juben/projects` | Notes & projects |
  555. SSE events: `MESSAGE`, `LLM_CHUNK`, `THOUGHT`, `TOOL_CALL`, `TOOL_RETURN`, `PROGRESS`, `ERROR`, `DONE`, `SYSTEM`.
  556. ---
  557. ## Development
  558. ```bash
  559. pytest
  560. cd frontend && pnpm lint && pnpm type-check && pnpm build
  561. ```
  562. New agents: subclass `BaseJubenAgent`, add prompts, register with routes/orchestrator, add tests. See [`DEVELOPMENT_SETUP.md`](./DEVELOPMENT_SETUP.md).
  563. ---
  564. ## Roadmap
  565. - Richer episode collaboration & version diff UI
  566. - More video-prompt templates / export formats
  567. - Productized eval dashboards
  568. - Multi-tenant / enterprise deploy guides
  569. - Plugin Skills marketplace
  570. ---
  571. ## Contributing
  572. 1. Fork & branch
  573. 2. Keep PRs focused; add tests when useful
  574. 3. Do **not** commit secrets, logs, `projects/`, or eval result dumps
  575. 4. Open a clear PR
  576. Stars 🌟 and PRs are deeply appreciated.
  577. ---
  578. # 联系与支持 · Contact & Support
  579. **作者 / Author:** 宫灵瑞(Gong Lingrui)
  580. | 渠道 / Channel | 链接 / Link |
  581. |------|-------------|
  582. | GitHub | [github.com/GongLingRui/juben](https://github.com/GongLingRui/juben) |
  583. | Issues | [提交问题 / Bug reports](https://github.com/GongLingRui/juben/issues) |
  584. | 剧本知识库 | [GongLingRui/skills](https://github.com/GongLingRui/skills) |
  585. | 影视创作 Skills | [GongLingRui/screen-creative-skills](https://github.com/GongLingRui/screen-creative-skills) |
  586. ### 微信好友 · Add me on WeChat
  587. 扫码添加微信(昵称:暖暖)
  588. Scan to add WeChat (nickname: 暖暖)
  589. <p align="center">
  590. <img src="./pictures/微信好友.JPG" alt="WeChat QR" width="280" />
  591. </p>
  592. ### 公众号 · WeChat Official Account
  593. <p align="center">
  594. <img src="./pictures/公众号.jpg" alt="WeChat Official Account" width="220" />
  595. </p>
  596. ### 支持项目 · Sponsor
  597. 如果本项目对你有帮助,欢迎打赏支持持续开发 ☕
  598. If this project helps you, sponsorship keeps the work going.
  599. | 微信收款 WeChat Pay | 支付宝 Alipay |
  600. |:---:|:---:|
  601. | <img src="./pictures/微信收款.jpg" alt="WeChat Pay" width="220" /> | <img src="./pictures/支付宝收款.jpg" alt="Alipay" width="220" /> |
  602. ---
  603. ## 许可证 · License
  604. 本项目基于 [MIT License](./LICENSE.txt) 开源。
  605. Released under the [MIT License](./LICENSE.txt).
  606. ---
  607. <p align="center">
  608. <strong>如果觉得有用,请给一个 ⭐ Star —— 你的支持是最大的动力。</strong><br/>
  609. <em>If you find this useful, please leave a ⭐ — it means a lot.</em>
  610. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.