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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fondation-io/ai-sdk-tools

v1.0.1

Published

Complete toolkit for building AI applications with the Vercel AI SDK - agents, state management, caching, artifacts, devtools, and memory

Readme

@fondation-io/ai-sdk-tools

🔱 Fork Notice

This is a fork of the original ai-sdk-tools project, maintained and published under the @fondation-io npm scope.

Complete toolkit for building advanced AI applications with the Vercel AI SDK. This package provides everything you need: multi-agent orchestration, state management, caching, artifact streaming, development tools, and persistent memory.

Installation

npm install @fondation-io/ai-sdk-tools

This installs all tools in a single package with namespaced exports.

Peer Dependencies

Depending on which features you use, you may need to install:

npm install ai @ai-sdk/react react react-dom zod zustand

What's Included

This package includes all AI SDK tools:

  • agents - Multi-agent orchestration with handoffs and routing
  • artifacts - Structured artifact streaming for React components
  • cache - Universal caching for AI tool executions
  • devtools - Development and debugging tools
  • memory - Persistent memory system for AI agents
  • store - Zustand-based state management for AI applications

Usage

Import tools directly from the package:

import { Agent, artifact, cached, useChat, AIDevtools, InMemoryProvider } from '@fondation-io/ai-sdk-tools';

Multi-Agent Orchestration

Build intelligent workflows with specialized agents:

import { Agent } from '@fondation-io/ai-sdk-tools';
import { openai } from '@ai-sdk/openai';

const supportAgent = new Agent({
  model: openai('gpt-4'),
  name: 'SupportAgent',
  instructions: 'You handle customer support queries.',
});

const billingAgent = new Agent({
  model: openai('gpt-4'),
  name: 'BillingAgent',
  instructions: 'You handle billing and payment issues.',
  handoff: [supportAgent], // Can hand off back to support
});

// Support agent can route to billing
supportAgent.handoff = [billingAgent];

const result = await supportAgent.generateText({
  prompt: 'I need help with my invoice',
});

State Management

Manage chat state globally with Zustand:

import { useChat } from '@fondation-io/ai-sdk-tools';

export const useChatHook = useChat({
  api: '/api/chat',
});

// Access chat state from anywhere
function ChatComponent() {
  const { messages, input, handleInputChange, handleSubmit } = useChatHook();
  
  return (
    <form onSubmit={handleSubmit}>
      {messages.map((msg) => (
        <div key={msg.id}>{msg.content}</div>
      ))}
      <input value={input} onChange={handleInputChange} />
    </form>
  );
}

Tool Caching

Cache expensive tool executions to reduce costs and improve performance:

import { cached } from '@fondation-io/ai-sdk-tools';
import { tool } from 'ai';
import { z } from 'zod';

const weatherTool = cached(
  tool({
    description: 'Get weather for a location',
    parameters: z.object({
      location: z.string(),
    }),
    execute: async ({ location }) => {
      // Expensive API call
      const response = await fetch(`https://api.weather.com/${location}`);
      return response.json();
    },
  }),
  { ttl: 3600 } // Cache for 1 hour
);

Artifact Streaming

Stream structured artifacts from AI tools to React components:

import { artifact, useArtifact } from '@fondation-io/ai-sdk-tools';
import { z } from 'zod';

const chartArtifact = artifact({
  id: 'chart',
  description: 'Generate a chart visualization',
  schema: z.object({
    data: z.array(z.number()),
    title: z.string(),
  }),
  execute: async ({ data, title }, writer) => {
    // Stream progressive updates
    await writer.update({ status: 'processing', progress: 50 });
    
    const chartData = processData(data);
    
    return {
      type: 'chart',
      data: chartData,
      title,
    };
  },
});

// In your React component
const { data, status } = useArtifact(chartArtifact);

Development Tools

Debug and monitor your AI applications in real-time:

import { AIDevtools } from '@fondation-io/ai-sdk-tools';

function App() {
  return (
    <>
      <YourChatComponent />
      <AIDevtools />
    </>
  );
}

Persistent Memory

Add long-term memory to your agents:

import { Agent, InMemoryProvider } from '@fondation-io/ai-sdk-tools';
import { openai } from '@ai-sdk/openai';

const memoryProvider = new InMemoryProvider();

const agent = new Agent({
  model: openai('gpt-4'),
  name: 'AssistantAgent',
  instructions: 'You are a helpful assistant with memory.',
  memory: memoryProvider,
});

// Agent can now remember context across conversations

Individual Packages

If you only need specific tools, you can install them individually:

npm install @fondation-io/agents
npm install @fondation-io/artifacts
npm install @fondation-io/cache
npm install @fondation-io/devtools
npm install @fondation-io/memory
npm install @fondation-io/store
npm install @fondation-io/debug

Each package can be used independently with its own API. See individual package documentation for details.

Documentation

Features

Multi-agent orchestration - Coordinate multiple specialized agents
State management - Global state for AI applications
Universal caching - Cache any tool execution
Artifact streaming - Structured real-time updates
Development tools - Debug and monitor AI apps
Persistent memory - Long-term agent memory
TypeScript first - Full type safety throughout
Provider agnostic - Works with any AI SDK provider
Production ready - Battle-tested in real applications

Requirements

  • Node.js 18+
  • AI SDK v5.0.0 or higher
  • React 18+ (for React-specific features)

License

MIT

Links

Acknowledgments

This project is a fork of the excellent AI SDK Tools created by the Midday team. We are grateful for their work and contribution to the open-source community.

All credit for the original implementation goes to the original authors. This fork is maintained independently under the @fondation-io scope.