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

@vibe-agent-toolkit/runtime-claude-agent-sdk

v0.1.14

Published

Claude Agent SDK runtime adapter for VAT agents

Readme

@vibe-agent-toolkit/runtime-claude-agent-sdk

Runtime adapter for deploying VAT agents as Claude Agent SDK MCP tools.

Features

  • Converts VAT agents to Claude Agent SDK MCP tools
  • Supports Pure Function, LLM Analyzer, and Conversational Assistant archetypes
  • Maintains conversation history for multi-turn interactions
  • Validates inputs and outputs using Zod schemas
  • Single-agent or batch conversion patterns

Installation

npm install @vibe-agent-toolkit/runtime-claude-agent-sdk
# or
bun add @vibe-agent-toolkit/runtime-claude-agent-sdk

Supported Archetypes

1. Pure Function Tools

Stateless, deterministic agents with no external dependencies.

import { query } from '@anthropic-ai/claude-agent-sdk';
import { haikuValidatorAgent } from '@vibe-agent-toolkit/vat-example-cat-agents';
import { convertPureFunctionToTool } from '@vibe-agent-toolkit/runtime-claude-agent-sdk';

const { server, metadata } = convertPureFunctionToTool(
  haikuValidatorAgent,
  HaikuSchema,
  HaikuValidationResultSchema
);

// Use with Claude Agent SDK
for await (const message of query({
  prompt: "Validate this haiku: 'Cat sits on warm mat / Purring in the sunshine / Dreams of tuna fish'",
  options: {
    mcpServers: { 'haiku-tools': server },
    allowedTools: [metadata.toolName]
  }
})) {
  if (message.type === 'result') {
    console.log(message.result);
  }
}

2. LLM Analyzer Tools

Single LLM call agents for classification and extraction.

import { query } from '@anthropic-ai/claude-agent-sdk';
import { nameGeneratorAgent } from '@vibe-agent-toolkit/vat-example-cat-agents';
import { convertLLMAnalyzerToTool } from '@vibe-agent-toolkit/runtime-claude-agent-sdk';

const { server, metadata } = convertLLMAnalyzerToTool(
  nameGeneratorAgent,
  NameGeneratorInputSchema,
  NameSuggestionSchema,
  {
    apiKey: process.env.ANTHROPIC_API_KEY,
    model: 'claude-3-5-haiku-20241022',
    temperature: 0.9
  }
);

// Use with Claude Agent SDK
for await (const message of query({
  prompt: "Generate a distinguished cat name for an orange cat",
  options: {
    mcpServers: { 'name-tools': server },
    allowedTools: [metadata.toolName]
  }
})) {
  if (message.type === 'result') {
    console.log(message.result);
  }
}

3. Conversational Assistant Tools

Multi-turn conversation agents with session state and history.

import { query } from '@anthropic-ai/claude-agent-sdk';
import { breedAdvisorAgent } from '@vibe-agent-toolkit/vat-example-cat-agents';
import { convertConversationalAssistantToTool } from '@vibe-agent-toolkit/runtime-claude-agent-sdk';

const { server, metadata } = convertConversationalAssistantToTool(
  breedAdvisorAgent,
  BreedAdvisorInputSchema,
  BreedAdvisorOutputSchema,
  {
    apiKey: process.env.ANTHROPIC_API_KEY,
    model: 'claude-3-5-haiku-20241022',
    temperature: 0.7
  }
);

// Multi-turn conversation
const turns = [
  "Hi! I'm looking for a cat breed. I live in a small apartment.",
  "I love classical music! Chopin and Debussy are my favorites.",
  "I don't mind grooming. What breeds would you recommend?"
];

for (const turn of turns) {
  for await (const message of query({
    prompt: turn,
    options: {
      mcpServers: { 'breed-advisor': server },
      allowedTools: [metadata.toolName]
    }
  })) {
    if (message.type === 'result') {
      console.log(message.result);
    }
  }
}

Batch Conversion

Convert multiple agents to a single MCP server:

import { convertLLMAnalyzersToTools } from '@vibe-agent-toolkit/runtime-claude-agent-sdk';

const { server, metadata } = convertLLMAnalyzersToTools({
  generateName: {
    agent: nameGeneratorAgent,
    inputSchema: NameGeneratorInputSchema,
    outputSchema: NameSuggestionSchema,
  },
  generateHaiku: {
    agent: haikuGeneratorAgent,
    inputSchema: HaikuGeneratorInputSchema,
    outputSchema: HaikuSchema,
  },
}, {
  apiKey: process.env.ANTHROPIC_API_KEY,
  model: 'claude-3-5-haiku-20241022',
  temperature: 0.8,
});

// Use all tools together
for await (const message of query({
  prompt: "Generate a cat name and haiku",
  options: {
    mcpServers: { 'cat-llm-tools': server },
    allowedTools: [
      'mcp__cat-llm-tools__generateName',
      'mcp__cat-llm-tools__generateHaiku'
    ]
  }
})) {
  console.log(message);
}

API Reference

Single Agent Conversion

convertPureFunctionToTool(agent, inputSchema, outputSchema, serverName?)

Converts a VAT Pure Function agent to Claude Agent SDK MCP tool.

Parameters:

  • agent - The VAT pure function agent
  • inputSchema - Zod schema for input validation
  • outputSchema - Zod schema for output validation
  • serverName - Optional server name (defaults to agent name)

Returns: AgentConversionResult<TInput, TOutput>

convertLLMAnalyzerToTool(agent, inputSchema, outputSchema, llmConfig, serverName?)

Converts a VAT LLM Analyzer agent to Claude Agent SDK MCP tool.

Parameters:

  • agent - The VAT LLM analyzer agent
  • inputSchema - Zod schema for input validation
  • outputSchema - Zod schema for output validation
  • llmConfig - LLM configuration ({ apiKey?, model?, temperature?, maxTokens? })
  • serverName - Optional server name (defaults to agent name)

Returns: AgentConversionResult<TInput, TOutput>

convertConversationalAssistantToTool(agent, inputSchema, outputSchema, llmConfig, serverName?)

Converts a VAT Conversational Assistant agent to Claude Agent SDK MCP tool.

Parameters:

  • agent - The VAT conversational assistant agent
  • inputSchema - Zod schema for input validation
  • outputSchema - Zod schema for output validation
  • llmConfig - LLM configuration ({ apiKey?, model?, temperature?, maxTokens? })
  • serverName - Optional server name (defaults to agent name)

Returns: AgentConversionResult<TInput, TOutput>

Batch Conversion

convertPureFunctionsToTools(configs, serverName?)

Batch converts multiple Pure Function agents.

Parameters:

  • configs - Map of tool names to agent configurations
  • serverName - Server name (defaults to 'vat-agents')

Returns: BatchConversionResult

convertLLMAnalyzersToTools(configs, llmConfig, serverName?)

Batch converts multiple LLM Analyzer agents.

Parameters:

  • configs - Map of tool names to agent configurations
  • llmConfig - Shared LLM configuration
  • serverName - Server name (defaults to 'vat-llm-agents')

Returns: BatchConversionResult

convertConversationalAssistantsToTools(configs, llmConfig, serverName?)

Batch converts multiple Conversational Assistant agents.

Parameters:

  • configs - Map of tool names to agent configurations
  • llmConfig - Shared LLM configuration
  • serverName - Server name (defaults to 'vat-conversational-agents')

Returns: BatchConversionResult

Types

AgentConversionResult<TInput, TOutput>

interface AgentConversionResult<TInput, TOutput> {
  server: ClaudeAgentMcpServer;
  metadata: {
    name: string;
    description: string;
    version: string;
    archetype: string;
    serverName: string;
    toolName: string;
  };
  inputSchema: z.ZodType<TInput>;
  outputSchema: z.ZodType<TOutput>;
}

BatchConversionResult

interface BatchConversionResult {
  server: ClaudeAgentMcpServer;
  metadata: {
    serverName: string;
    tools: Record<string, {
      name: string;
      description: string;
      version: string;
      archetype: string;
      toolName: string;
    }>;
  };
}

ClaudeAgentLLMConfig

interface ClaudeAgentLLMConfig {
  apiKey?: string;        // Defaults to ANTHROPIC_API_KEY env var
  model?: string;         // Defaults to 'claude-3-5-haiku-20241022'
  temperature?: number;   // Defaults to 0.7
  maxTokens?: number;     // Defaults to 4096
}

Examples

This adapter implements the RuntimeAdapter interface and can be tested with the runtime-agnostic demo:

# See vat-example-cat-agents/examples/runtime-adapter-demo.ts
# The common demo works with ALL runtime adapters via the RuntimeAdapter interface

For usage patterns, see the code examples in this README above.

Architecture

This adapter:

  1. Wraps VAT agents as Claude Agent SDK MCP tools
  2. Validates inputs/outputs using Zod schemas
  3. Manages conversation history for conversational agents
  4. Provides LLM context for agents that need it
  5. Returns structured results in Claude Agent SDK format

License

MIT

Related Packages