Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-managed-runtimenpx skills add mpsuesser/pi-effect-harness --skill effect-managed-runtimegit clone --depth 1 https://github.com/mpsuesser/pi-effect-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-managed-runtime)<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-managed-runtime"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-managed-runtime.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00063 | $0.02827 |
| Opus 5 | $0.00032 | $0.01413 |
| Sonnet 5 | $0.00013 | $0.00565 |
| Haiku 4.5 | $0.00006 | $0.00283 |
Grade A, and why
effect-managed-runtime scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
async fetch(request: Request): Promise<Response> { How it starts
The opening of the file, as written. The whole thing — 389 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an Effect TypeScript expert specializing in integrating Effect services into external frameworks using ManagedRuntime.
Effect Source Reference
The Effect v4 source is available at ~/.cache/effect-v4/.
Browse and read files there directly to look up APIs, types, and implementations.
Reference this for:
packages/effect/src/ManagedRuntime.ts— full API surfaceai-docs/src/03_integration/10_managed-runtime.ts— Hono integration example
When to Use ManagedRuntime
Use ManagedRuntime when Effect does not own the process lifecycle. This is the bridge pattern — your domain logic lives in Effect services and layers, but the outer framework (Hono, Express, Fastify, Koa, AWS Lambda, Cloudflare Workers, etc.) controls the HTTP server, routing, and process lifecycle.
Typical scenarios:
- Web frameworks: Hono, Express, Fastify, Koa handlers that call Effect services
- Serverless functions: AWS Lambda, Cloudflare Workers, Vercel Edge Functions
- Embedded contexts: Running Effect inside a larger non-Effect application
- Tests: Creating a runtime with test layers for integration testing
Do NOT use ManagedRuntime when:
- Effect owns the entire process → use
NodeRuntime.runMain/BunRuntime.runMain - You have a long-running Effect service that IS the application → use
Layer.launch
Core API
Creating a ManagedRuntime
import { ManagedRuntime, Layer } from 'effect';
// ManagedRuntime.make takes a Layer and returns a ManagedRuntime
// The layer's requirements must be fully satisfied (no remaining R)
const runtime = ManagedRuntime.make(MyService.layer);
Signature:
ManagedRuntime.make<R, ER>(
layer: Layer.Layer<R, ER, never>,
options?: { readonly memoMap?: Layer.MemoMap | undefined }
): ManagedRuntime<R, ER>
The ManagedRuntime<R, ER> type parameters:
R— the services provided by the runtime (available to effects you run)ER— errors that can occur during layer construction
Shared MemoMap
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 389 lines · 63 tokens per session scan A df51296b8f30
effect-managed-runtime is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 2,827 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
effect-patterns-concurrency
Effect-TS patterns for Concurrency. Use when working with concurrency in Effect-TS applications.
effect-patterns-building-apis
Effect-TS patterns for Building Apis. Use when working with building apis in Effect-TS applications.
effect-patterns-building-data-pipelines
Effect-TS patterns for Building Data Pipelines. Use when working with building data pipelines in Effect-TS applications.
effect-patterns-error-management
Effect-TS patterns for Error Management. Use when working with error management in Effect-TS applications.
effect-patterns-making-http-requests
Effect-TS patterns for Making Http Requests. Use when working with making http requests in Effect-TS applications.
effect-patterns-streams
Effect-TS patterns for Streams. Use when working with streams in Effect-TS applications.