Usage
TS Tool Usage
Agentic clients like WeatherClient
can be used as normal TS classes:
LLM Tool Usage
Or you can use these clients as LLM-based tools. Here’s an example using Vercel’s AI SDK:
You can use our standard library of thoroughly tested AI functions with your favorite AI SDK – without having to write any glue code!
Using Multiple Tools
All adapters (like createAISDKTools
) accept a very flexible var args of AIFunctionLike
parameters, so you can pass as many tools as you’d like.
They also expose a .functions
property which is an AIFunctionSet
. This combination makes it really easy to mix & match different tools together.
An AIFunctionLike
can be any agentic client instance, a single AIFunction
selected from the client’s .functions
property (which holds an AIFunctionSet
of available AI functions), or an AI function created manually via createAIFunction
.
AIFunctionLike
and AIFunctionSet
are implementation details that you likely won’t have to touch directly, but they’re important because of their flexibility.
AI SDKs
Vercel AI SDK
Using Agentic with the Vercel AI SDK.
Mastra
Using Agentic with Mastra.
LangChain
Using Agentic with LangChain.
LlamaIndex
Using Agentic with LlamaIndex.
Firebase Genkit
Using Agentic with Genkit.
Dexa Dexter
Using Agentic with Dexter.
OpenAI
Using Agentic with OpenAI directly.
xsAI SDK
Using Agentic with the xsAI SDK.