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

@daedalus-ai-dev/ai-sdk

v0.1.12

Published

A TypeScript AI SDK for building agents, tools, and multi-agent workflows

Readme

Daedalus AI SDK

A TypeScript SDK for building agents, tools, and multi-agent workflows — provider-agnostic, composable, and designed for production.

npm version License: MIT

Features

  • Agentic loop — automatic tool-use cycles until the model signals completion
  • Provider-agnostic — OpenAI, Anthropic, Google, xAI, OpenRouter, or any Vercel AI SDK model
  • MCP support — connect to any Model Context Protocol server as a tool source
  • Multi-agent patterns — Prompt Chaining, Routing, Parallelization, Orchestrator-Workers, Evaluator-Optimizer
  • Fluent schema builder — define tool input schemas with a type-safe builder API
  • Streaming — first-class async generator streaming with tool-use support

Installation

npm install @daedalus-ai-dev/ai-sdk

Install the provider package for your preferred model:

npm install @ai-sdk/openai       # OpenAI
npm install @ai-sdk/anthropic    # Anthropic
npm install @ai-sdk/google       # Google Gemini
npm install @ai-sdk/xai          # xAI Grok

Quick start

import { agent, configure, anthropic } from '@daedalus-ai-dev/ai-sdk';

configure({ provider: anthropic('claude-sonnet-4-5') });

const response = await agent({
  instructions: 'You are a helpful assistant.',
}).prompt('What is the capital of France?');

console.log(response.text); // Paris

Tools

import { agent, configure, defineTool, openai } from '@daedalus-ai-dev/ai-sdk';

configure({ provider: openai('gpt-4o') });

const weatherTool = defineTool({
  name: 'get_weather',
  description: 'Get the current weather for a city.',
  schema: (s) => ({
    city: s.string().description('City name').required(),
  }),
  async handle({ city }) {
    return `The weather in ${city} is sunny and 22°C.`;
  },
});

const response = await agent({
  instructions: 'You are a weather assistant.',
  tools: [weatherTool],
}).prompt('What is the weather in Tokyo?');

MCP servers

Connect to any MCP server and use its tools directly:

import { agent, configure, connectMcp, anthropic } from '@daedalus-ai-dev/ai-sdk';

configure({ provider: anthropic('claude-sonnet-4-5') });

const { tools, disconnect } = await connectMcp({
  type: 'stdio',
  command: 'npx',
  args: ['-y', 'gitnexus@latest', 'mcp'],
});

const response = await agent({
  instructions: 'Analyse the codebase.',
  tools,
}).prompt('What functions call agent()?');

await disconnect();

Multi-agent patterns

import { agent, configure, defineTool, anthropic } from '@daedalus-ai-dev/ai-sdk';

configure({ provider: anthropic('claude-sonnet-4-5') });

// Orchestrator-Workers: delegate subtasks to specialised sub-agents
const reviewTool = defineTool({
  name: 'review_code',
  description: 'Delegate a code review to a specialist agent.',
  schema: (s) => ({ code: s.string().required() }),
  async handle({ code }) {
    return agent({
      instructions: 'You are a senior code reviewer. Be concise and constructive.',
    }).then((runner) => runner.prompt(`Review this code:\n${code}`))
      .then((r) => r.text);
  },
});

const orchestrator = agent({
  instructions: 'You coordinate code review tasks.',
  tools: [reviewTool],
});

See the Patterns guide for all five patterns with full examples.

Providers

| Import | Provider | Env var | |--------|----------|---------| | openai('gpt-4o') | OpenAI | OPENAI_API_KEY | | anthropic('claude-sonnet-4-5') | Anthropic | ANTHROPIC_API_KEY | | google('gemini-2.5-flash') | Google Gemini | GOOGLE_GENERATIVE_AI_API_KEY | | xai('grok-3') | xAI Grok | XAI_API_KEY | | openrouter({ apiKey }) | OpenRouter (150+ models) | — | | vercelAI({ model }) | Any Vercel AI SDK model | — |

// Config-driven provider selection
import { createProvider } from '@daedalus-ai-dev/ai-sdk';

configure({
  provider: createProvider({
    provider: process.env.AI_PROVIDER,
    model:    process.env.AI_MODEL,
    apiKey:   process.env.AI_API_KEY,
  }),
});

Documentation

Full documentation at daedalus-ai-dev.github.io/ai-sdk.

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.