11# RainEngine
22
3- RainEngine is a self-improving, event-sourced Rust kernel for building durable
4- AI agent systems.
3+ RainEngine is a self-improving, event-sourced Rust library workspace for
4+ building durable AI agent systems.
55
66The core idea is simple: an agent is a state machine backed by an append-only
77ledger. Every webhook, human message, scheduled wake, approval, delegation
@@ -19,23 +19,19 @@ visible, auditable, and never grants new power silently.
1919- ` rain-engine-core ` : provider-neutral event kernel, domain models, policies, traits, ledger projections, and in-memory stores
2020- ` rain-engine-cognition ` : optional planners, task routing, review policy, wake policy, and reflection policy
2121- ` rain-engine-memory ` : ledger-backed exact replay, recent working sets, graph lookup, and simple semantic retrieval
22- - ` rain-engine-runtime ` : reference Axum runtime that parses events and owns the advance loop
23- - ` rain-engine-gateway ` : batteries-included gateway that wires runtime, built-in skills, channels, and wake handling
24- - ` rain-engine-ui ` : Solid/Vite control room for live session inspection and human approval
25- - ` rain-engine-client ` : Rust client for gateway integrations
26- - ` sdk/typescript ` : TypeScript SDK for browser and Node clients
22+ - ` rain-engine-runtime ` : reference Axum runtime library that parses events and owns the advance loop
23+ - ` rain-engine-client ` : Rust client for runtime integrations
2724- ` rain-engine-ingress ` : shared event envelope and Valkey Streams worker utilities
2825- ` rain-engine-blob ` : local and in-memory blob stores for multimodal attachments
2926- ` rain-engine-wasm ` : Wasmtime executor for untrusted skills with explicit host capabilities
3027- ` rain-engine-macros ` : ` #[derive(SkillManifest)] ` for typed skill manifests
31- - ` rain-engine-skills ` : built-in trusted native skills for local development and gateway deployments
28+ - ` rain-engine-skills ` : built-in trusted native skills for local development and runtime-backed deployments
3229- ` rain-engine-channels ` : channel adapters that translate external messages into kernel events
3330- ` rain-engine-provider-gemini ` : Gemini REST provider with multimodal content, parallel tool calls, and cache metadata
3431- ` rain-engine-openai ` : OpenAI-compatible baseline provider
3532- ` rain-engine-store-pg ` : Postgres append-only ledger store
3633- ` rain-engine-store-sqlite ` : SQLite ledger store for local development and tests
3734- ` rain-engine-store-valkey ` : Valkey coordination claims and short-lived scratchpad storage
38- - ` rain-engine-cli ` : declarative ` agent.yaml ` validation and runtime bootstrapping
3935
4036## Architecture
4137
@@ -101,37 +97,13 @@ Guardrails are explicit:
10197- regressions create rollback records and remove the overlay from future
10298 effective policy
10399
104- ## Control Room
100+ ## Library Surface
105101
106- RainEngine includes a web control room for operating the kernel through the
107- server-client contract. The UI connects to the gateway, streams session updates
108- over server-sent events, and renders the ledger as a live workbench:
109-
110- - session status, provider capabilities, and registered tools
111- - human input and assistant outcomes
112- - reasoning plans, tool execution graphs, checkpoints, validation failures, and
113- tool results
114- - approval checkpoints with exact arguments and structured approve/deny actions
115- - learning events, active policy overlays, reflections, and rollback history
116- - projected goals, tasks, observations, artifacts, and raw records
117-
118- Start the development gateway:
119-
120- ``` bash
121- cargo run -p rain-engine-cli -- dev
122- ```
123-
124- Then run the UI:
125-
126- ``` bash
127- cd rain-engine-ui
128- npm install
129- npm run dev
130- ```
131-
132- The runtime exposes ` GET /capabilities ` , ` GET /sessions/{id}/view ` , and
133- ` GET /sessions/{id}/stream ` so other clients can build the same control surface
134- without depending on UI internals.
102+ RainEngine intentionally stops at reusable libraries. There are no first-party
103+ CLI, standalone daemon binary, or browser UI surfaces in this repository. The runtime,
104+ client, ingress, store, and provider crates are intended to be embedded in
105+ other systems that provide their own process model, configuration UX, and
106+ operator tooling.
135107
136108## State Model
137109
@@ -151,14 +123,11 @@ must be rebuildable from stored records.
151123
152124- Embedded SQLite flow: [ embedded_sqlite.rs] ( /Users/adrift/projects/rain-engine/rain-engine-runtime/examples/embedded_sqlite.rs )
153125- Runtime bootstrap config: [ runtime_postgres.rs] ( /Users/adrift/projects/rain-engine/rain-engine-runtime/examples/runtime_postgres.rs )
154- - Customer support deployment sketch: [ customer_support_agent.rs] ( /Users/adrift/projects/rain-engine/rain-engine-cli/examples/customer_support_agent.rs )
155- - Declarative deployment config: [ agent.yaml] ( /Users/adrift/projects/rain-engine/rain-engine-cli/examples/agent.yaml )
156126
157127## Verification
158128
159129``` bash
160130cargo fmt
161131cargo clippy --workspace --all-targets
162132cargo test --workspace --all-targets --quiet
163- cd rain-engine-ui && npm run build
164133```
0 commit comments