AI SDKs
xsAI SDK
Agentic adapter for the xsAI SDK.
- package:
@agentic/xsai
- exports:
function createXSAITools
- source
- xsAI SDK docs
Install
Usage
Note that createXSAITools
is async
because xsai
’s underlying
xsschema.toJsonSchema
is async.
Note that this example snippet also requires you to install the Agentic weather tool and dotenv
.
Running this example
You’ll need a free API key from weatherapi.com
to run this example. Store it in a local .env
file as WEATHER_API_KEY
.
You’ll need an OpenAI API key
to run this example. Store it in a local .env
file as OPENAI_API_KEY
.