Issue with Combining Agentic Tools and Custom Tools in Vercel AI SDK

Issue with Combining Agentic Tools and Custom Tools in Vercel AI SDK

Current versus Expected Behavior

Currently, when using the Vercel AI SDK with the agentic library, I am able to utilize tools provided by agentic. However, I am facing difficulties in combining these tools with my own custom tools. When I attempt to provide both the agentic tools and my custom tools to the agent, only one set of tools appears to be used, while the others are ignored.

The expected behavior is for the agent to have access to both sets of tools, allowing it to utilize all functionalities without conflict.

Code, Configuration, and Steps that Reproduce this Issue

  1. Set up the project with the Vercel AI SDK and import agentic tools.
  2. Create custom tools using the createAISDKTools method.
  3. Attempt to pass both the agentic tools and the custom tools to the agent using the tools parameter.
  4. Notice that only one set of tools is being utilized.

The issue can be reproduced by following the provided code snippet below:

"use server";

import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createStreamableValue } from "ai/rsc";
import { createAISDKTools } from "@agentic/ai-sdk";
import { WeatherClient } from "@agentic/weather";
import { e2b } from "@agentic/e2b";

export async function continueConversation(history) {
  const weather = new WeatherClient();
  const stream = createStreamableValue();

  const { textStream } = await streamText({
    model: openai("gpt-4o-mini"),Ï
    system: "...",
    messages: history,
    tools: createAISDKTools(weather, e2b), // Here I'm trying to combine tools
    maxSteps: 10,
  });

  for await (const text of textStream) {
    stream.update(text);
  }

  stream.done();
  return { messages: history, newMessage: stream.value };
}

Deployment URL or Custom Domain: N/A
Environment: Local
Project Framework: Next.js
Build Settings:
Framework Preset: Next.js
Build Command (if not default): N/A
Output Directory (if not default): N/A
Install Command (if not default): N/A
Node/Runtime Version: Node 18.x
Package Manager: npm
Relevant Packages: “@agentic/ai-sdk”, “@agentic/weather”, “@agentic/e2b”

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.