JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 72
  • Score
    100M100P100Q77984F
  • License MIT

A building block of agentic systems: an LLM that can retrieve information, use tools, and store user inputs.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swift-agent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    SwiftAgent

    SwiftAgent is an NPM module that implements a building block of agentic systems, which refers to an LLM enhanced with functionalities, such as information retrieval, tool use, and the memory storage of user inputs.

    Get Started

    A few lines of code can build an AI agent that can retrieve real-time data of cryptocurrencies.

    import { ChatOpenAI } from "@langchain/openai"
    import SwiftAgent from "swift-agent";
    
    async function main() {
      const llm = new ChatOpenAI({ model: "gpt-4o" });
      const mcp = {
        mcpServers: {
          "coinmarketcap": {
            "command": "npx",
            "args": ["@shinzolabs/coinmarketcap-mcp"]
          }
        }
      };
    
      const agent = new SwiftAgent(llm, { mcp });
      const result = await agent.run("What is the current price of bitcoin?");
    
      console.log(result);
    }
    
    main().catch(console.error);