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

@aizonaai/adk

v0.1.1

Published

AIZona Agent Development Kit — Build, deploy, and orchestrate AI agents

Readme

@aizonaai/adk

npm version npm downloads license node

Agent Development Kit — build, deploy, and orchestrate AI agents in TypeScript. Zero runtime dependencies beyond zod. Dual ESM + CJS publish, full TypeScript declarations, npm provenance.

npm install @aizonaai/adk
# or
pnpm add @aizonaai/adk
# or
yarn add @aizonaai/adk

Requires Node ≥ 20.


Five-minute quick start

import { AnthropicProvider, Runner, defineAgent } from "@aizonaai/adk";

const agent = defineAgent({
  name: "tutor",
  model: "claude-haiku-4-5-20251001",
  instructions: "You are a patient programming tutor. Keep answers under 6 sentences.",
});

const runner = new Runner({
  provider: new AnthropicProvider({ apiKey: process.env.ANTHROPIC_API_KEY! }),
});

const { output, usage } = await runner.run(agent, { input: "What is a closure?" });
console.log(output);
console.log(`cost: $${usage.totalCostUsd.toFixed(6)}`);

That's the entire surface for a single-agent program. From here you add tools, guardrails, handoffs, and streaming as you need them.


What you can build

| Capability | API entry point | Example | | ---------- | --------------- | ------- | | Single agent with custom instructions | defineAgent, Runner | 01-basic-agent | | Tools with Zod-validated inputs | defineTool | web-scraper | | Multi-agent handoffs (Swarm pattern) | defineAgent({ handoffs }) | 02-multi-agent | | Guardrails (content, PII, budget, consent) | contentFilter, piiFilter, budgetLimit, consentGate | 03-guardrails | | Token-by-token streaming | runner.stream(), streamToSSE | 04-streaming | | MCP server integration | mcpServerTools | 05-mcp-tools | | Vector memory with decay | MemoryManager, PgVectorMemoryBackend | — | | Multi-provider routing | ADKRouter | — | | Sandboxed code execution | CodeExecutor, createExecuteCodeTool | — | | Evaluation harness | defineEvalSuite, runEval | — | | Voice / realtime | RealtimeAgent | — |


BYOK (bring your own key)

The ADK is provider-agnostic and standalone. You hold the API keys; the SDK never phones home.

import { createProvider } from "@aizonaai/adk";

// Local development — your key, your bill
const provider = createProvider({
  providerId: "anthropic",         // or "openai" | "google" | "xai" | "ollama" | "lmstudio"
  apiKey: process.env.ANTHROPIC_API_KEY,
});

For production deployments, put @aizonaai/adk-server in front so clients never see the provider key — they present a short-lived ADK key that you mint and validate. See docs/security.md for the full pattern.

Supported providers

| Provider | providerId | Notes | | -------- | ------------ | ----- | | Anthropic | anthropic | Claude family | | OpenAI | openai | GPT family + structured outputs | | Google | google | Gemini family | | xAI | xai | Grok family | | Ollama | ollama | Self-hosted; set OLLAMA_BASE_URL | | LM Studio | lmstudio | Self-hosted; OpenAI-compatible |


Core APIs

defineAgent(config)

const agent = defineAgent({
  name: "my-agent",
  model: "claude-sonnet-4-5-20250929",
  instructions: "You are a helpful assistant.", // string or (ctx) => string
  description: "Short description for handoff discovery",
  tools: [myTool],
  guardrails: [contentFilter()],
  handoffs: [{ agent: otherAgent, description: "Specialized tasks" }],
  outputSchema: z.object({ answer: z.string() }),
  consentLevel: "auto", // auto | notify | explicit | multi_party
  maxTurns: 25,
});

defineTool(config)

import { z } from "zod";

const search = defineTool({
  name: "search",
  description: "Search the web",
  inputSchema: z.object({ query: z.string() }),
  execute: async ({ query }, ctx) => ({ results: await api(query) }),
  hooks: {
    preExecute: async (input) => input,    // modify or block
    postExecute: async (output) => output, // transform result
  },
});

Runner

const runner = new Runner({ provider, eventBus, defaultMaxTurns: 25 });

// One-shot
const result = await runner.run(agent, {
  input: "Hello",
  messages: [],         // prior conversation
  sessionId: "s-123",
  maxTurns: 10,
  signal: abort.signal,
});

// Streaming
for await (const event of runner.stream(agent, { input: "Hello" })) {
  if (event.type === "text_delta") process.stdout.write(event.content);
  if (event.type === "run_complete") console.log(event.result.usage);
}

Guardrails

import { contentFilter, piiFilter, budgetLimit, consentGate } from "@aizonaai/adk";

defineAgent({
  // …
  guardrails: [
    contentFilter({ blockedTerms: ["ignore previous"] }),
    piiFilter({ redact: true }),
    budgetLimit({ maxCostUsd: 0.50 }),
    consentGate({ level: "explicit" }),
  ],
});

Tripwire violations throw GuardrailTripwireError — catch at the call site.

Multi-agent

import { ParallelRunner, Team, agentAsTool } from "@aizonaai/adk";

// Handoff routing
const router = defineAgent({
  name: "router",
  handoffs: [
    { agent: codeAgent, description: "Code questions" },
    { agent: mathAgent, description: "Math questions" },
  ],
});

// Parallel fan-out
const parallel = new ParallelRunner();
const results = await parallel.run([agent1, agent2], { input: "Analyze this" });

// Wrap an agent as a tool
const researchTool = agentAsTool(researchAgent, "Research a topic deeply");

Provider routing

import { ADKRouter } from "@aizonaai/adk";

const router = new ADKRouter({
  providers: [anthropic, openai],
  strategy: "balanced", // cost-optimized | latency-optimized | quality-optimized | balanced | fallback-chain
});

Skills

import { defineSkill } from "@aizonaai/adk";

const summarize = defineSkill({
  name: "summarize",
  description: "Summarize a document",
  execute: async (input, ctx) => {
    const r = await ctx.runner.run(summarizerAgent, { input: input.text });
    return { summary: r.output };
  },
});

Memory

import { MemoryManager, EmbeddingService, PgVectorMemoryBackend } from "@aizonaai/adk";

const memory = new MemoryManager({
  backend: new PgVectorMemoryBackend(dbClient),
  embeddings: new EmbeddingService({ provider: anthropic }),
});

await memory.storeMemory({ content: "User prefers TypeScript", type: "fact" });
const hits = await memory.searchMemories("programming language preference");

Event bus

import { ADKEventBus } from "@aizonaai/adk";

const bus = new ADKEventBus();
bus.on("run.started",     (e) => console.log("→", e.runId));
bus.on("tool.invoked",    (e) => console.log("  tool:", e.toolName));
bus.on("run.completed",   (e) => console.log("✓", e.usage.totalCostUsd, "USD"));

MCP integration

import { mcpServerTools } from "@aizonaai/adk";

const tools = await mcpServerTools({ transport: "http", url: "http://localhost:3000/mcp" });
const agent = defineAgent({ name: "mcp-agent", tools });

Eval harness

import { defineEvalSuite, runEval } from "@aizonaai/adk";

const suite = defineEvalSuite({
  name: "factuality",
  cases: [{ input: "Capital of France?", expected: /Paris/i }],
});

const report = await runEval(suite, agent, { runner });
console.log(report.passRate);

Architecture

  • Turn loop — messages → LLM call → tool execution → guardrails → handoff check → repeat.
  • Standalone — zero platform coupling. Works against any supported provider.
  • Type-safe — full TypeScript with Zod validation on every boundary.
  • Composable — tools, guardrails, handoffs, and skills mix freely.
  • Observable — structured event bus, distributed tracing, streaming-first transport.

Documentation

| Guide | What it covers | | ----- | -------------- | | docs/deployment.md | Docker, Compose, Railway, Vercel, Kubernetes, sizing | | docs/security.md | Keys, CORS, rate limiting, validation, secrets, guardrails | | docs/troubleshooting.md | Common errors, debug mode, perf, memory leaks | | examples/ | Six runnable examples covering the production surface |

Issues and feature requests: github.com/ai-zona/adk/issues.

License

MIT — see LICENSE.