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

@cdmbase/ai-sdk-provider-cdecli

v0.1.6

Published

AI SDK v6 provider for cdecli agent running in a Kubernetes pod. Resolves the pod via kubectl, opens a port-forward, and proxies generateText / streamText calls to /v1/agent/chat.

Downloads

1,185

Readme

@cdmbase/ai-sdk-provider-cdecli

AI SDK v6 provider that talks to a cdecli agent's HTTP server (cdecli serve). Conversation state is kept server-side per session_id; the provider only sends the latest user turn.

Install

yarn add @cdmbase/ai-sdk-provider-cdecli ai

Configure

The cdecli agent runs as a pod (e.g. yantra-aistack-cdecli-agent-0 in main-system) and is typically reached through an ingress:

# Production (yantra-stack)
export CDECLI_BASE_URL="https://cdecli-agent.cdebase.dev"
export CDECLI_TOKEN="<bearer-token>"

# Local dev — `cdecli agent serve --port 8090`
export CDECLI_BASE_URL="http://localhost:8090"

The provider also accepts yantra-stack's existing variable names as fallbacks: CDECLI_AGENT_ENDPOINT (URL) and CDECLI_AGENT_TOKEN (bearer).

For in-cluster port-forwarding during dev:

kubectl port-forward -n main-system pod/$(kubectl get pods -n main-system \
  -o name | grep cdecli | head -n1 | cut -d/ -f2) 8080:8080
export CDECLI_BASE_URL="http://127.0.0.1:8080"

Use with @cdmbase/agent-kit

@cdmbase/agent-kit (a fork of inngest/agent-kit) lets you build multi-agent networks with deterministic routing. Pass the cdecli provider as the model for any agent, or as the defaultModel for the whole network.

yarn add @cdmbase/agent-kit @cdmbase/ai-sdk-provider-cdecli inngest

Single agent

import { createAgent, createNetwork } from "@cdmbase/agent-kit";
import { createCdecli } from "@cdmbase/ai-sdk-provider-cdecli";

const cdecli = createCdecli({
  // defaults to CDECLI_BASE_URL / CDECLI_AGENT_ENDPOINT env vars
  defaultSettings: { skill: "support" },
});

const supportAgent = createAgent({
  name: "support",
  description: "Answers customer questions using 960+ Yantra connectors.",
  system: "You are a helpful support agent.",
  model: cdecli("default"), // "default" → server picks GPT-4o
});

const network = createNetwork({
  name: "support-network",
  agents: [supportAgent],
});

const { output } = await network.run(
  "My order #42 hasn't shipped — what's going on?"
);
console.log(output);

Multi-agent network with routing

import { createAgent, createNetwork, createRoutingAgent, createTool } from "@cdmbase/agent-kit";
import { createCdecli } from "@cdmbase/ai-sdk-provider-cdecli";
import { z } from "zod";

const cdecli = createCdecli();

// Triage agent — picks the right specialist
const triageAgent = createAgent({
  name: "triage",
  system: "Classify the request and route to 'billing' or 'technical'.",
  model: cdecli("default"),
  tools: [
    createTool({
      name: "route",
      description: "Route the request to the appropriate team",
      parameters: z.object({ team: z.enum(["billing", "technical"]) }),
      handler: async ({ team }, { network }) => {
        network?.state.kv.set("team", team);
      },
    }),
  ],
});

const billingAgent = createAgent({
  name: "billing",
  system: "You handle billing and payment issues.",
  model: cdecli("default", { skill: "billing" }),
});

const technicalAgent = createAgent({
  name: "technical",
  system: "You handle technical and product issues.",
  model: cdecli("default", { skill: "technical" }),
});

const network = createNetwork({
  name: "support",
  agents: [triageAgent, billingAgent, technicalAgent],
  defaultModel: cdecli("default"),
  router: ({ network }) => {
    const team = network?.state.kv.get("team") as string | undefined;
    if (!team) return triageAgent;
    return network?.agents.get(team);
  },
});

const { output } = await network.run("I was charged twice last month.");
console.log(output);

With session persistence (cross-call memory)

const cdecli = createCdecli();

const agent = createAgent({
  name: "assistant",
  system: "You are a helpful assistant with memory.",
  // Passing a stable sessionId reuses the server-side conversation history
  model: cdecli("default", { sessionId: `user-${userId}` }),
});

Use with AI SDK directly

import { generateText, streamText } from "ai";
import { createCdecli } from "@cdmbase/ai-sdk-provider-cdecli";

const cdecli = createCdecli({
  // baseUrl + authToken default to env vars
  defaultSettings: { skill: "general" },
});

const { text } = await generateText({
  model: cdecli("anthropic/claude-sonnet-4-5"),
  prompt: "Summarize what cdecli does.",
});

const { textStream } = await streamText({
  model: cdecli("anthropic/claude-sonnet-4-5"),
  prompt: "Stream a haiku.",
});
for await (const chunk of textStream) process.stdout.write(chunk);

Options

| Option | Default | Notes | | ----------------- | ------------------------------------------------------------------ | ------------------------------------------ | | baseUrl | CDECLI_BASE_URLCDECLI_AGENT_ENDPOINT | cdecli serve URL | | authToken | CDECLI_TOKENCDECLI_AGENT_TOKENCDECLI_AUTH_TOKEN | Bearer token | | timeoutMs | 120_000 | Per-request timeout | | fetch | global fetch | Override for testing/proxies | | defaultSettings | — | { sessionId?, skill?, skillId?, local? } |

Per-call settings can be supplied as cdecli(modelId, { skill, skillId, local, sessionId }).

Limitations

  • temperature, topP, topK, seed, maxOutputTokens, etc. are reported as unsupported warnings — cdecli decides them server-side.
  • Client-supplied tools are ignored; tools run inside cdecli.
  • Token usage is not reported (cdecli does not surface counts today).