Skip to main content
You can create Effect-aware builders from either a Layer or a ManagedRuntime.

Simple path: provide a layer

Use eos.provide(AppLive) when per-call acquisition is acceptable and you do not need to own runtime shutdown. You can also pass the layer directly with makeEffectORPC(AppLive).
layer.ts

Long-lived resources: own the runtime

Use makeEffectORPC(runtime) when scoped resources should be acquired once and released on application shutdown.
runtime.ts
Good candidates for a caller-owned runtime:
  • database pools
  • telemetry SDKs
  • HTTP clients with connection pools
  • caches
  • long-lived scoped resources

Wrap an existing oRPC builder

If your application already has an oRPC builder, wrap it:
wrap-builder.ts

Rule of thumb

Next step

Customize spans with Tracing.
Last modified on June 15, 2026