npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

generalist

v0.67.0

Published

Effect-native agent framework with an optional durable runtime

Readme

Generalist

An agent handling a support case or waiting for approval shouldn't lose its work when a server restarts. Generalist turns disposable agent sessions into durable workers in TypeScript, built on Effect.

The optional Runtime records accepted work in object storage so another host can recover it. S3-compatible storage and a local directory use one engine; application-owned processes and the generic server are replaceable compute hosts. Commands serialize within a partition. Uncertain external outcomes require resolution, not blind retries.

For scripts and request-local work, use the Effect agent loop without storage or Runtime. It calls a model, runs its tools, and continues to an answer.

Install

This process-local example uses OpenAI. You will need an API key and Bun 1.4+; model calls incur provider costs.

bun add generalist [email protected] @effect/[email protected]
export OPENAI_API_KEY="your-api-key"

Run an agent

Save this as index.ts and run bun index.ts:

import { Config, Console, Effect, Layer } from "effect"
import { FetchHttpClient } from "effect/unstable/http"
import { OpenAiClient, OpenAiLanguageModel } from "@effect/ai-openai"
import { Agent } from "generalist"

const assistant = Agent.make({
  name: "assistant",
  instructions: "Give short, practical answers.",
})

const client = OpenAiClient.layerConfig({ apiKey: Config.redacted("OPENAI_API_KEY") }).pipe(
  Layer.provide(FetchHttpClient.layer),
)
const model = OpenAiLanguageModel.model("gpt-4o-mini").pipe(Layer.provide(client))

await Agent.run(assistant, "When would I use an AI agent instead of a single model call?").pipe(
  Effect.provide(model),
  Effect.flatMap(Console.log),
  Effect.runPromise,
)

Agent.make defines the agent; Agent.run returns its answer. Provide a different model Layer to change providers or test without an API key. Use Agent.stream when you need events instead of just the final result.

Next steps

  • Architecture: system boundaries, object commits, and recovery from the top down.
  • Tools: give an agent functions it can call.
  • Structured output: return schema-validated objects.
  • Object durability: recover work with the shared object-storage engine and S3-compatible or local-directory transport.
  • Documentation: the documentation site source plus feature, decision, and tradeoff references.

Status

Generalist is pre-1.0: APIs can change between releases. Requires [email protected] and Node 22+ or Bun 1.4+. Public exports are @experimental while Effect AI is unstable. Install optional Effect provider and platform packages at the matching version.

Local qualification uses MinIO, not live AWS or another S3-compatible provider. Local performance measurements are not production latency or throughput guarantees. Use fresh object namespaces; there is no compatibility reader or migration fallback.

Everything ships in this package. Imports such as generalist/runtime, generalist/durability/s3, and generalist/testing/model are subpaths, not separate installs. You only need the optional dependencies for adapters you use. Object storage is the only production execution authority; ordinary process-local agents need no persistence. The durability contract's long-term intent is not provider certification or a verified performance claim.

MIT · Source