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

agent-engines

v0.11.0

Published

One thread, turn and event API for Codex app-server, the Claude Agent SDK and ACP agents.

Readme

agent-engines

npm Runtimes Licence: MIT

One TypeScript API for Codex, Claude and any agent that speaks ACP.

Every coding agent has its own interface. Codex has a JSON-RPC app-server, Claude has the Agent SDK, and others use the Agent Client Protocol. agent-engines puts them behind one set of threads, turns and events, so your app can support several agents, or move between them, without a separate integration for each.

Read the documentation

import { createEngine } from "agent-engines";

const engine = createEngine("claude"); // or "codex"

const thread = await engine.startThread({ cwd: "/path/to/project", model: "haiku" });
const turn = thread.run("Summarise this repository.");

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

What you get

  • Threads and turns. Start, resume, fork and rewind conversations. Steer or interrupt a turn while it runs.
  • One event stream. Text, reasoning, tool calls, file diffs, plans, subagents and usage all arrive in the same shape.
  • Approvals as events. Permission requests and questions from the agent reach your code to answer however you like.
  • Plan mode, structured output and code review, wherever the runtime supports them.
  • Portable conversations. Export a conversation from one runtime and continue it on another.
  • Runtime management. Check versions, update the CLIs and read plan limits without spending a turn.
  • Codex speed tiers. List the account's available tiers and request one explicitly, including Ultrafast. Requested and accepted settings stay distinct from inference confirmation.
  • Honest about differences. capabilities() says what a runtime can do, and a method it can't run throws an error rather than quietly doing something else.

Supported runtimes

| Runtime | How it connects | What it needs | | --- | --- | --- | | Codex | codex app-server over stdio | The codex CLI | | Claude | Claude Agent SDK | Nothing extra; the SDK bundles Claude Code | | ACP agents | Agent Client Protocol v1 over stdio | The agent's command, such as opencode acp or gemini --acp |

Install

Requires Node 22 or later. ESM only.

npm install agent-engines

Next, follow Getting started.

What it leaves to you

agent-engines covers provider mechanics only. Which tools an agent may use, who approves what, retries, job queues and UI all stay in your app. Restrictive settings are available as presets you opt into, not defaults.

Sign-in and billing

By default it uses the sign-ins from codex login and claude, and refuses to run on an API key, so turns are never billed per token by accident. Set requireSubscription: false to allow API keys.

If you're building something for other people, read Sign-in and billing first: providers set their own terms on using subscription logins in third-party products, and those terms aren't always clear.

Project status

agent-engines is pre-1.0, so the API may change between minor versions. A weekly check runs it against the latest Codex and Claude Code releases. Bugs and requests go in GitHub Issues.

This is an independent project, not affiliated with or endorsed by OpenAI, Anthropic or the ACP project.

Licence

MIT