This is a JavaScript SDK for creating agents for the Solace-Agent-Mesh.
Supported Features:
Feature | Supported |
---|---|
Agent Registration | ✅ |
Adding Actions | ✅ |
File Response | ❌ |
LLM Request | ❌ |
Embedding Request | ❌ |
Middlewares | ❌ |
FileService Access | ❌ |
This agent provides weather information using the weatherapi.com API.
Check example.ts for the full code.
-
Clone this repository
-
Install dependencies: (requires NodeJS version 20.0 or higher)
npm install
-
Set your Weather API key as an environment variable:
export WEATHER_API_KEY="your_api_key_here"
Or create a
.env
file in the root directory:WEATHER_API_KEY=your_api_key_here
-
Start the agent:
cd sam-js-sdk ts-node example.ts
Gets the current weather for a location.
Parameters:
-
location
: The location to get weather for (city name, zip code, coordinates, etc.)
Example:
{
"location": "San Francisco, CA"
}
Gets a multi-day weather forecast for a location.
Parameters:
-
location
: The location to get forecast for -
days
: Number of forecast days (1-10, default: 3)
Example:
{
"location": "San Francisco, CA",
"days": 5
}