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

@retinue/agentkit

v0.3.3

Published

A provider-neutral, durable AI agent runtime for TypeScript: agents, tools, approvals, context, knowledge and persistence behind ports.

Readme

@retinue/agentkit

npm licence provenance

A durable AI agent runtime for TypeScript. Agents that survive a restart, tools that ask before they act, and retrieval that cites its sources — behind ports you can replace.

For teams building an assistant or an automation that has to be correct: a run that crashes resumes instead of vanishing, an external write waits for a human, and every token is accounted for.

Install

npm i @retinue/agentkit

Node 20+. Provider SDKs, PostgreSQL, Redis and BullMQ are optional peers — install only what you use. The package root imports nothing but ai and zod.

Your first agent

import { createAgent } from "@retinue/agentkit/providers";

const agent = createAgent({
  manifest: {
    id: "assistant",
    name: "Assistant",
    instructions: "You are a helpful assistant. Be concise.",
    // A capability, not a hardcoded model id — swapping providers is config.
    modelPolicy: { role: "smart" },
  },
});

const result = await agent.run({
  conversationId: "conv-1",
  message: "Draft a one-line launch note for our analytics dashboard.",
});

console.log(result.text);     // the assistant's reply
console.log(result.outcome);  // "completed" | "failed" | "cancelled" | …

createAgent is the batteries-included path: it wires the in-memory stores, the model registry and the default engine for you, and reads ANTHROPIC_API_KEY from the environment. Swap in PostgreSQL, Redis and your own model catalogue when you need them — same code above.

What you get

| | | |---|---| | Durable runs | Leases, checkpoints and recovery. Kill the worker mid-turn; the run resumes rather than disappearing | | Approval gates | An external write stops and waits for a person. Idempotency keys mean a retry does not fire the side effect twice | | Tools that scale | A compact catalogue in context, full schemas fetched on demand, authorization re-checked at execution | | Knowledge with citations | Block-aware chunking, hybrid retrieval fused by rank, and answers that point at the source | | Injection containment | Untrusted content is wrapped in a nonce-delimited envelope with delimiter forgery neutralised — structural, not a detector | | Usage you can bill | Per-model, per-principal token and cost accounting, with quotas enforced before a run is admitted | | Flows and teams | Durable multi-step workflows; a team compiles to a flow, and each member's turn is a child run with its own ceiling | | Replaceable everything | 32 ports, three adapter families, one conformance suite held over all of them — exported, so your adapter is held to it too |

Composing it yourself

The root exports five values and every type. Everything else sits behind a documented subpath, so a consumer never installs a dependency they do not use:

import { createRuntime, defineAgent } from "@retinue/agentkit";
import { createDefaultEngine } from "@retinue/agentkit/runtime";
import { createPostgresConversationStore } from "@retinue/agentkit/adapters/postgres";

Anything reachable only by a deep import is not API — and that is enforced against the published tarball rather than asserted here.

Documentation

Licence

MIT — see LICENSE.

Copyright (c) 2026 Azeem Sarwar and Rise Experts.