What is Grove?
Grove is a declarative language for building applications with durable workflow orchestration. You define what your application does -- records, events, actions, workflows -- and the runtime handles persistence, state management, and execution.
What you'll learn: What problems Grove solves, who it's for, and how its core concepts fit together.
The Problem
Building structured applications typically requires choosing and gluing together multiple frameworks -- a state machine library, a workflow engine, a schema system. Each has its own DSL, its own deployment model, and its own failure semantics. As the application grows, so does the incidental complexity.
Grove replaces this stack with a single language that covers the full lifecycle: from defining your data model and business rules to orchestrating multi-step workflows across external services.
How It Works
Grove has two areas that share a common type system, expression language, and module model:
Area 1: Aggregates -- Domain modeling. You declare record, event, action, validate, and state.
Area 2: Workflows -- Service orchestration. You declare workflow, activity, service, route, and query.
Area 1: The Action-Event-Record Pipeline
Every state change flows through a pipeline:
- An action receives input and validates it
- The action emits one or more events
- Each event applies changes to the record
This pattern gives you a complete audit trail -- every change is an event that can be replayed.
module todo
record {
kind "todo"
title: String
status: String = "open"
}
event created {
title: String
}
@create
action create {
title: String
apply {
emit created { title: params.title }
}
}
Area 2: Workflows
Workflows orchestrate multi-step operations as directed acyclic graphs (DAGs). Activities perform the work -- calling external APIs, publishing messages, querying databases -- with built-in retry policies and compensation (rollback) support.
workflow process_order v1 {
node validate = validate_order v1
node charge = charge_payment v1
node fulfill = fulfill_order v1
edge validate -> charge
edge charge -> fulfill
}
Key Properties
- Declarative -- You describe structure and rules, not control flow. The runtime handles execution, persistence, and retries.
- Immutable history -- Every state change is recorded as an immutable event. Records are derived state.
- Type-safe -- A static checker catches errors before runtime: missing fields, invalid state transitions, unreachable events.
- Durable execution -- Workflows survive process restarts. Timers, signals, and compensation are built-in.
- LLM-friendly -- Grove's constrained grammar makes it reliable for code generation by AI agents.
Who Is Grove For?
Grove is designed for teams building business process applications -- order management, approval workflows, payment processing, customer onboarding. The language is intentionally constrained: it excels at structured, event-driven applications and is not a general-purpose programming language.
LLM agents are a primary consumer of the language. Grove's declarative syntax, strict type system, and constrained grammar make it well-suited for AI-generated code that passes validation on the first attempt.
See Also
- Installation -- Set up your development environment
- Hello World -- Create and run your first module
- 5-Minute Tutorial -- Build a todo app end to end
- Concepts Overview -- Mental model and terminology