Google “Mangle” — A New Language Aimed at AI Reasoning
Google “Mangle” — A New Language Aimed at AI Reasoning
Google has open-sourced Mangle, a modern take on Datalog designed to help developers express rules, relationships, and recursive logic over messy, real-world data—useful for everything from dependency analysis to knowledge-graph queries. Reports about the release surfaced this week, and the public GitHub shows active development with the latest tagged release in May 2025.
- https://github.com/google/mangle
The News
Coverage on August 22, 2025 highlighted Google’s introduction of Mangle as an open-source language that extends classic Datalog for deductive database programming. The project is hosted under Google’s GitHub org; the repo notes it’s an experiment for developers and “not an officially supported Google product,”.
What Is Google Mangle?
Mangle is a programming language for deductive database programming. Think of it as “SQL + rules + recursion”: you write facts and rules, and the engine derives new facts by logical inference. Mangle embeds the familiar Datalog core and adds practical extensions such as aggregation, function calls, and optional type checking—making it easier to model domain knowledge and ask complex questions over data from multiple sources.
What Is an “AI Reasoning Language”?
An AI reasoning language is a way to describe logic—facts, constraints, and rules—so a machine can infer new conclusions. Unlike general-purpose coding languages (e.g., Python), reasoning languages are declarative: you state what is true, not how to compute it. Classic examples include Prolog and Datalog. Modern AI stacks increasingly combine statistical models (LLMs) with symbolic reasoning components; Mangle sits on the symbolic side, giving you a precise, auditable rule system that complements probabilistic AI. (Media coverage has framed Mangle as an “AI reasoning” tool because of this fit.)
Features of Google Mangle
- Datalog at the core, with extensions: Supports recursive rules, plus practical add-ons like aggregation, function calls, and optional type checking to handle real-world analytics and data modeling.
- Designed for multi-source data: Useful when unifying facts from different systems; you can represent and query data in a uniform, logic-first way.
- Knowledge-graph friendly: Models binary and n-ary relations (not just pairs), and can represent structured data—handy for ontologies and graph reasoning.
- Recursion & rule composition: Express reachability, dependency chains, and transitive relationships (e.g., walking package graphs).
- Growing language capabilities: Past release notes mention lattice support and an interpreter called
mg
, indicating an evolving toolchain. - Open source under Apache-2.0: Implemented as an embeddable Go library (with some Rust components) for easy integration.
Why It Matters
As AI applications move from demos to production, teams need explainable, auditable logic to sit alongside LLMs. A language like Mangle can encode policies, data lineage rules, and complex joins/recursions in a form that’s maintainable and testable—bridging structured data work (SQL) and symbolic reasoning.
How You Might Use It (Beginner’s Lens)
- Security auditing: Write rules to find projects affected by a vulnerable dependency across a large codebase (e.g., Log4j).
- Knowledge graphs: Model entities and multi-step relationships (people–projects–assets) and derive new links via rules.
- Policy checks: Encode compliance constraints (e.g., “only PII in region X”) and detect violations by inference.
Where to Find It
Mangle’s code, docs, examples, and releases are on Google’s GitHub repository. Note the repo’s disclaimer: it’s not an officially supported Google product.
Top FAQs
Is this an official, fully supported Google product?
No—the repository explicitly states it is not an officially supported Google product, although it’s under the Google org and open-sourced under Apache-2.0.
When was it “released”?
Media coverage about the release appeared on August 22, 2025, but the GitHub shows earlier public releases (v0.1.0 in Dec 2023, v0.2.0 in Aug 2024, and v0.3.0 on May 21, 2025). In short: it’s been evolving in the open, and it drew fresh attention this week.
Is Mangle an “AI reasoning” language?
It’s a logic/deductive database language (an extension of Datalog). That makes it well-suited to symbolic reasoning tasks, which is why some reports frame it as an “AI reasoning” tool.
How is it different from SQL?
SQL is great for tabular queries but doesn’t natively do recursion or rule-based inference. Mangle supports recursive rules, structured/n-ary relations, and derivations—ideal for dependency and graph-like questions.
What language is Mangle implemented in, and how do I run it?
The reference implementation is mainly in Go (with some Rust). Prior notes mention an interpreter called mg
; see the repo’s README, examples, and releases for setup and usage.
Does it integrate with LLMs like Gemini or other AI tools?
There’s no official, built-in LLM integration advertised in the repo. The typical pattern is to pair a symbolic system (like Mangle) with an LLM in your application architecture. Check the repo and community discussions for demos and evolving best practices.