Graph Grammar
Declarative graph transformation and rewriting.
Graph Grammar is a set of tools for rewriting graphs with declarative grammar rules. It finds and acts on structure through subgraph pattern matching, and chains rules together with a rudimentary goal-planning system to move a graph toward a target state. It's general-purpose. Converting AI workflows is one thing it's good at, but the same rules apply to anything you can model as a graph.
Match, rewrite, plan
graphs/*Subgraph pattern matching
Find structure anywhere in a graph by matching subgraphs against declarative patterns. When a pattern matches, its rule can fire, with no hand-written traversal code to maintain.
Declarative rewriting
Describe transformations as grammar rules: the shape to find, and the shape to replace it with. Rules are composable, so complex rewrites stay small, testable, and readable.
Goal-driven planning
Give it a target state and the rudimentary goal-planning system chains rules together to move the graph toward it. Multi-step conversions, like translating one AI workflow format into another, become a single request.
Rewrite anything you can model as a graph.
Graph Grammar is general-purpose: converting AI workflows is one thing it's good at, but the same declarative rules apply to any structured graph that needs to change shape.
- Rewrite and transform graphs through composable, declarative grammar rules
- Match subgraphs against declarative patterns to detect and act on structure
- Chain rules with a rudimentary goal-planning system toward a target state
Transforming graphs with Graph Grammar?
Whether you're converting AI workflows or rewriting your own graph structures, tell us what you're working on and we'll help you ship it.