solace-agent-mesh-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Solace-Agent-Mesh Agent JS SDK

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

Usage Example - Weather Agent

This agent provides weather information using the weatherapi.com API.

Check example.ts for the full code.

Setup

  1. Clone this repository

  2. Install dependencies: (requires NodeJS version 20.0 or higher)

    npm install
  3. 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
    
  4. Start the agent:

    cd sam-js-sdk
    ts-node example.ts

Available Actions

getWeather

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"
}

getForecast

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
}

Package Sidebar

Install

npm i solace-agent-mesh-js

Weekly Downloads

7

Version

0.0.3

License

Apache-2.0 license

Unpacked Size

56.4 kB

Total Files

18

Last publish

Collaborators

  • cyrus2281