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

@zhivex-ai/sdk

v1.36.0

Published

Unified high-level SDK for multi-provider AI workflows.

Readme

@zhivex-ai/sdk

Recommended entry point for Zhivex AI SDK. Re-exports the high-level public API for agents, sessions, text generation, streaming, structured output, tools, multimodal messages, embeddings, workflows, artifacts, and local CLI utilities.

Provider conformance reporting is available as a Beta surface from both the root package and @zhivex-ai/sdk/evals. Reports keep declared, offline, installed, and live evidence separate; skipped credentials do not certify support.

Install

bun add @zhivex-ai/sdk @zhivex-ai/openai

Install only the provider packages your application uses. Install @zhivex-ai/sdk from the npm latest tag, or pin an exact version. The next dist-tag can lag latest, so it does not track the newest stable release. Use a provider prerelease only when that provider was published in the same prerelease and the tag is newer than latest.

Quick Start

import { generateText } from "@zhivex-ai/sdk";
import { createOpenAI } from "@zhivex-ai/openai";

const openai = createOpenAI({
  apiKey: process.env.OPENAI_API_KEY
});

const result = await generateText({
  model: openai("gpt-4o-mini"),
  prompt: "Explain the unified SDK in one sentence."
});

console.log(result.text);

Use provider-backed models from Bun, Node.js, route handlers, workers, or other server runtimes. Keep provider credentials and effectful tools out of browser bundles.

Focused entrypoints are available for smaller and more explicit imports:

  • @zhivex-ai/sdk/runtime for generation and runtime helpers
  • @zhivex-ai/sdk/workflows for declarative workflows and state services
  • @zhivex-ai/sdk/ui for UI message and SSE contracts
  • @zhivex-ai/sdk/mcp-http for opt-in Stable MCP HTTP transport and OAuth with host-owned token storage
  • @zhivex-ai/sdk/mcp-stdio for the opt-in Experimental Node/Bun stdio transport. Browser bundles resolve a stub that throws instead of spawning a process
  • @zhivex-ai/sdk/mcp-server for the opt-in Experimental MCP server that exposes local tools and agents. @zhivex-ai/sdk/mcp-server-stdio binds it to process stdio; browser bundles resolve a stub that throws
  • @zhivex-ai/sdk/a2a for the opt-in Experimental Agent2Agent 1.0 server and client. Browser bundles keep the client and throw from the server factory
  • @zhivex-ai/sdk/evals for agent, workflow, and Beta comparative model evaluations
  • @zhivex-ai/agents for the dedicated agent-first facade

The release-managed default model inventory is available from the SDK root or @zhivex-ai/sdk/catalog. @zhivex-ai/core keeps catalog contracts and the createModelCatalog mechanism plus a deprecated, frozen compatibility snapshot until the next major. Later inventory updates are shipped only by the SDK, so new applications should not import the core compatibility copy. Inject an application-owned catalog when model availability or pricing must be pinned independently from SDK releases.

The local zhivex-ai agents ledger command omits full output text by default; use --include-output-text only for a reviewed local export. zhivex-ai init agent creates a private .env with mode 0600 on POSIX systems, and doctor reports unsafe environment-file permissions.

Stability

The shared realtime session and streamLiveAgent lifecycle is Stable. Provider model IDs, provider-specific options, and upstream preview availability remain provider-scoped. The root export also contains Beta and Experimental surfaces; new code can make that risk explicit with @zhivex-ai/sdk/beta and @zhivex-ai/sdk/experimental. Existing root imports remain compatible. Check runtime symbols with getApiStability() and review https://github.com/Zhivex/zhivex-ai-sdk/blob/main/STABILITY.md before upgrading.

Start Here

Repository and full documentation:

Reliable streaming

For long responses, opt into bounded tail replay:

const stream = streamText({
  model,
  prompt: "Explain the design in detail.",
  streamBuffer: { maxHistory: 4096, replayOverflow: "drop-oldest" }
});
for await (const text of stream.textStream) process.stdout.write(text);
const result = await stream.collect(); // Rejects on provider failure.

Import streamText from @zhivex-ai/sdk; model is your provider-backed model. Active consumers receive ordered events; late subscribers receive only the retained tail. The default replayOverflow: "error" preserves full replay and fails beyond 4,096 retained events. collect() returns the complete result in either mode. The same streamBuffer options apply to object generation and agents. maxSteps must be a positive safe integer and defaults to one.