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

@alchemystai/aisdk

v0.0.2

Published

The Vercel AI SDK Integration for Alchemyst AI.

Downloads

127

Readme

Alchemyst AI — Vercel AI SDK Integration

Alchemyst AI is the context layer for your LLM applications — it remembers, reasons, and injects contextual intelligence automatically into every call. This package provides a seamless integration with Vercel’s AI SDK to enhance your Gen-AI apps with memory, retrieval, and context-aware toolchains — all through a single line of configuration.


🚀 Installation

npm install @alchemystai/aisdk
# or
yarn add @alchemystai/aisdk
#or
pnpm add @alchemystai/aisdk
# or
bun add @alchemystai/aisdk

⚡ Quick Start

Here’s how to plug Alchemyst AI into your ai SDK call in one line:

import { streamText } from 'ai';
import { alchemystTools } from '@alchemystai/aisdk';

const result = await streamText({
  model: "gpt-5-nano",
  prompt: "Remember that my name is Alice",
  tools: alchemystTools("YOUR_ALCHEMYST_AI_KEY", true, true)
});

This automatically attaches the Alchemyst Context Engine to your model call — enabling persistent memory and context-aware generation across sessions.


🧩 API Reference

alchemystTools(apiKey: string, enableMemory?: boolean, enableRetrieval?: boolean)

| Parameter | Type | Default | Description | | ----------------- | --------- | ------- | ------------------------------------------------------- | | apiKey | string | — | Your Alchemyst AI API key. Required. | | enableMemory | boolean | true | Enables contextual memory between user sessions. | | enableRetrieval | boolean | true | Enables semantic retrieval from your connected sources. |

Returns an object compatible with the tools parameter of the ai SDK functions (streamText, generateText, streamObject, etc.).


🧠 What It Does

Once integrated, Alchemyst AI automatically:

  • Persists context across user sessions.
  • Augments prompts with retrieved knowledge from your Alchemyst AI workspace.
  • Supports custom tool functions for domain-specific reasoning.
  • Runs entirely server-side — no extra infrastructure required.

💡 Example: Contextual Chatbot

import { streamText } from 'ai';
import { alchemystTools } from '@alchemystai/aisdk';

export async function POST(req: Request) {
  const { messages } = await req.json();

  const response = await streamText({
    model: 'gpt-5-nano',
    messages,
    tools: alchemystTools(process.env.ALCHEMYST_API_KEY!, true, true),
  });

  return response.toAIStreamResponse();
}

With this, your AI app will:

  • Remember previous user messages (via Alchemyst context memory)
  • Retrieve relevant knowledge chunks
  • Enrich every prompt dynamically before sending it to the model

🔒 Environment Variables

Set your API key in your environment:

ALCHEMYST_API_KEY=sk-xxxxxx

Then reference it in your code as:

alchemystTools(process.env.ALCHEMYST_API_KEY!);

🧰 Supported SDK Methods

Alchemyst AI integrates with all Vercel AI SDK entry points:

| SDK Function | Supported | Notes | | ---------------- | --------- | ------------------------------- | | streamText | ✅ | Real-time streaming generation | | generateText | ✅ | Synchronous generation | | streamObject | ✅ | Structured JSON output | | generateObject | ✅ | Non-streaming structured output |


🧪 Example with Retrieval Off

const result = await streamText({
  model: "gpt-5-nano",
  prompt: "Hello there!",
  tools: alchemystTools("YOUR_ALCHEMYST_AI_KEY", true, false),
});

📜 License

MIT © 2025 Alchemyst AI