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

@agentdock-ai/agentdock

v0.1.1

Published

An easy-to-use TypeScript wrapper around LangGraph for building AI agents.

Readme

Agentdock gives TypeScript applications a focused runtime for model calls, typed tools, approvals, sessions, persistence, streaming, and lifecycle control. LangChain and LangGraph run internally; application code uses the Agentdock API.

✨ What you get

  • Agent runtime: one AgentDock class for runs, streams, and resumes.
  • Typed tools: validation, authorization, progress, cancellation, and approvals.
  • Durable sessions: memory, SQLite, PostgreSQL, MongoDB, and Redis adapters.
  • Normalized events: one frontend-friendly contract for text, tools, usage, and interrupts.
  • Safe lifecycle: timeouts, cancellation, cleanup, and owned resource management.

🚀 Install

yarn add @agentdock-ai/agentdock @agentdock-ai/models zod

💻 Quick start

import { AgentDock, defineTool } from "@agentdock-ai/agentdock";
import { AgentDockModel } from "@agentdock-ai/models";
import { z } from "zod";

const weather = defineTool({
  name: "get_weather",
  description: "Get the weather for a city.",
  input: z.object({ city: z.string() }),
  run: async ({ city }) => ({ city, forecast: "Sunny" }),
});

const agent = new AgentDock({
  model: AgentDockModel.openAI({ model: "gpt-5.4-mini" }),
});

agent.registerTool(weather);

try {
  const result = await agent.run(
    "What is the weather in Lahore?",
    { userId: "user-123" },
    { sessionId: "session-123" },
  );

  console.log(result.content);
} finally {
  await agent.close();
}

Use agent.stream() when the UI should receive text and tool activity as it arrives:

const { stream, result } = await agent.stream(
  "Summarize my latest order.",
  { userId: "user-123" },
  { sessionId: "session-123" },
);

for await (const event of stream) {
  if (event.type === "message.part.delta" && event.part.type === "text") {
    process.stdout.write(event.part.text);
  }
}

console.log(await result);

🧠 Sessions and approvals

Pass a stable sessionId to continue a conversation. Use a durable checkpoint adapter when sessions must survive restarts or be shared across instances:

yarn add @agentdock-ai/checkpoint-postgres
import { PostgresCheckpoint } from "@agentdock-ai/checkpoint-postgres";

const agent = new AgentDock({
  model,
  checkpoint: new PostgresCheckpoint({
    connectionString: process.env.DATABASE_URL!,
  }),
});

Set requiresApproval: true on a side-effecting tool. Agentdock pauses the run, persists the interrupt, and resumes it with agent.resume() after approval.

📚 Useful APIs

| API | Use it for | | --------------------- | --------------------------------------------------- | | run() | Execute a prompt and receive one result. | | stream() | Consume normalized events while a run is executing. | | resume() | Continue a paused approval run. | | getSession() | Read the current normalized message state. | | getSessionHistory() | Inspect checkpoint-by-checkpoint history. | | deleteSession() | Remove a session’s checkpoint context. | | close() | Stop active work and release owned resources. |

🔗 Related packages

📄 License

MIT. See the repository license.