โš ๏ธ Heads up: this tool's official website appears to be unreachable right now. It may be offline, rebranded, or temporarily down.
Langfun

Langfun

โ˜… 3.6 ๐Ÿ”– 600 saves ๐Ÿ’ฐ Free GitHub

Langfun is a Google open-source library that makes language models fun to work with through object-oriented prompting, with 916 stars on GitHub.

Overview

Langfun, from Google, is a library that aims to make language models feel like a natural part of a Python program. Its central principle is seamless integration between natural language and programming by treating language as functions. Powered by PyGlove, Langfun introduces Object-Oriented Prompting: instead of concatenating strings, you prompt LLMs using objects and types, which gives you structure, reuse and type safety in how prompts are built and how outputs come back. This makes prompt code easier to maintain, test and compose, and simplifies building agents and other LLM-driven features where prompts are numerous and evolving. The project is actively maintained, with updates landing daily in 2026. Because prompts are objects, they can be versioned, unit-tested, serialised and rendered against different models, which brings ordinary software engineering discipline to a part of the stack that is usually managed with copy-pasted strings and hope.

Key Features

  • Object-Oriented Prompting: prompt LLMs with typed Python objects
  • Treats natural language as functions that compose with normal code
  • Powered by Google’s PyGlove symbolic programming library
  • Structured outputs mapped back onto Python types
  • Simplifies building and maintaining LLM agents and features
  • Tutorials and notebooks, including a Langfun 101 walkthrough
  • Free and open source under the Apache-2.0 license

๐Ÿ’ณ Pricing

Langfun is free and open source under the Apache-2.0 license, installable from PyPI. You only pay for the language model calls your own code makes to whichever provider you connect it to.

Who Is It For

Langfun is for Python developers who build serious LLM applications and find string-template prompting hard to maintain. If your prompts have structure โ€” nested data, typed fields, reusable components โ€” or you are building agents in Python, Langfun’s object-oriented approach will feel like a natural upgrade.

๐Ÿš€ Visit Langfun Official Site

๐Ÿšฉ Report an issue