← all repositories
langgptai/LangGPT

A programming language for talking to LLMs

LangGPT treats prompts like code: structured, versioned, and reusable instead of copy-pasted trial and error.

12.2k stars Jupyter Notebook LLMOps · EvalOther AI
LangGPT
Velocity · 7d
+11
★ / day
Trend
steady
star history

What it does LangGPT is a markdown-based framework for writing prompts as structured documents. You define a Role, Profile, Skills, Rules, Workflow, and Initialization — essentially turning a chatbot instruction into a readable spec sheet. It supports variables (<Role>), slash commands, and even conditional logic. The project also ships GPTs, a Claude Code skill, and a Feishu knowledge base to auto-generate or manage these templates.

The interesting bit The authors published an arXiv paper (Feb 2024) arguing that prompts should be engineered like software — with semantic versioning, modularity, and reusability. The framework explicitly borrows from programming paradigms: hierarchical organization, variable substitution, and “reminders” to combat context loss in long conversations. There’s even a spin-off called PromptVer for Git-style prompt versioning.

Key highlights

  • 12,153 GitHub stars; community-driven with 100+ example prompts (FitnessGPT, Xiaohongshu Writer, etc.)
  • Multi-platform tooling: custom GPT-4 generator, Kimi+ integration, and a Claude Code marketplace skill
  • Academic backing: peer-reviewed-ish via arXiv:2402.16929
  • Supports advanced constructs: conditional logic, JSON/YAML alternative formats, and self-referential variables
  • Ecosystem includes PromptShow (pretty prompt images) and Minstrel (multi-agent prompt generation)

Caveats

  • Most advanced features (variables, commands, conditional logic) appear to require GPT-4 or Claude; GPT-3.5 gets a “lite” version
  • The “theoretical foundations” are a collection of Chinese-language essays in the repo; their depth and rigor are unclear without reading them
  • Heavy reliance on Feishu (Chinese collaboration platform) for examples and community; accessibility varies by region

Verdict Worth bookmarking if you write production prompts and are tired of debugging why your carefully crafted instruction drifted three messages ago. Skip it if you just need occasional one-off prompts — the overhead only pays off at scale.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.