Multi-tenant CQRS/Event Sourcing with an in-memory event store. Includes v2 processors (command, read-model, todo), v2 request handler, query processor, pub/sub, and the event tailer for replaying shared-store events into a node's local pub/sub:
obneyai/grain-core-v2
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-core-v2"}Distributed coordination for multi-instance deployments. Coordinator election, tenant lease management, pull-based polling with batch checkpointing, periodic task scheduling with CAS deduplication, and tenant-aware load balancer routing:
obneyai/grain-control-plane
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-control-plane"}Includes the core CQRS components (event store, read model processor, todo processor, periodic task, pub/sub).
Server-rendered reactive UIs with Datastar. Streams hiccup-rendered HTML over SSE, with event-driven re-rendering, distributed live updates via the event tailer, SSE connection reuse, auto-generated auth redirects, context-dependent gate interceptors, Malli-based JSON coercion, and automatic Pedestal route generation:
obneyai/grain-datastar
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-datastar"}Includes the core CQRS components (command/query/read-model processors, event store, pub/sub, event tailer). See components/datastar for the full source.
Dev-only nREPL-facing tools for coding agents working against a live Grain app. Exposes registered commands, queries, read models, todo processors, periodic triggers, schemas, tenant-scoped event reads, projections, command/query invocation, validation, and runtime diagnostics as plain EDN:
obneyai/grain-code-agent-tools
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-code-agent-tools"}Install it after the app's Grain system starts:
(require '[ai.obney.grain.code-agent-tools.interface :as code-agent-tools])
(code-agent-tools/install! {:system app
:context (::context app)
:mode :dev})Use it from nREPL to inspect the live catalog, validate command/query payloads against the schema registry, read events, inspect projections, and run runtime diagnostics. See Code Agent Tools for the full guide.
Multi-tenant Postgres backend with Row-Level Security, per-tenant advisory locks, Fressian binary serialization, and tenant-scoped operations. All read and append operations require a tenant ID, ensuring structural data isolation:
obneyai/grain-event-store-postgres-v3
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-event-store-postgres-v3"}Embedded SQLite backend implementing the v3 event store protocol for single-process deployments where running Postgres is overkill. WAL mode with BEGIN IMMEDIATE per append, a tenant-scoped events table plus a normalized event_tags join table for indexed superset tag filtering, and Fressian binary serialization. Same tenant-scoped API as the Postgres backend — swap the :conn type to move between them:
obneyai/grain-event-store-sqlite-v3
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-event-store-sqlite-v3"}mulog publisher for CloudWatch metrics:
obneyai/grain-mulog-aws-cloudwatch-emf-publisher
{:git/url "https://github.com/ObneyAI/grain.git"
:sha "0b4d02d8f07302524f3ec9b425242f174e3fc3e5"
:deps/root "projects/grain-mulog-aws-cloudwatch-emf-publisher"}The following packages are deprecated and will be removed in a future release:
| Package | Replacement |
|---|---|
| grain-core | grain-core-v2 |
| grain-event-store-postgres-v2 | grain-event-store-postgres-v3 |
| grain-dspy-extensions | None (deprecated) |