SkillfulAI
  • Skillful AI
    • Welcome
    • About us
    • Ecosystem
  • Web SDK
    • Overview
    • Getting Started
      • Installation
      • Quick Start
      • Authentication
    • SDK Reference
    • Templates
      • Telegram Bot Template
      • Express Server Template
        • API Reference
      • Discord Bot Template
        • ProActive Mode
      • Kick Stream Bot
        • Getting Started
          • Installation
          • Quick Start
        • Create Commands
        • Advanced Configurations
  • Unity Gaming SDK
    • Overview
    • Getting Started
      • Installation
      • Authentication
    • Services
      • Skillful Agents
        • Overview
        • Quick Start
        • Service Reference
      • Smart NPCs
        • Overview
        • Quick Start
        • Service Reference
      • Skillful Inference
        • Overview
        • Quick Start
        • Service Reference
          • Question Answering
          • Sentence Similarity
          • Speech Recognition
          • Text Classification
          • Text Generation
          • Text Summary
          • Text-To-Image
          • Zero Shot Classification
          • Translation (Localization)
    • Audio Recorder
    • Additional Utilities
Powered by GitBook
On this page
  • Basic Setup
  • Your First Conversation
  • Response Handling
  • Next Steps
  1. Web SDK
  2. Getting Started

Quick Start

Get up and running with the Skillful Web SDK in minutes.

Basic Setup

const { SkillfulClient } = require('@skillfulai/agents');

// Initialize the client
const client = new SkillfulClient({
    apiKey: 'your-api-key'
});

Your First Conversation

async function startConversation() {
    try {
        // Get available agents created on the Skillful Dashboard
        const agents = await client.getAgents();
        
        // Select an agent by name
        await client.setAgent('Wojak');
        
        // Send a message and get a response from the agent
        const response = await client.sendMessage('Hello!');
        console.log(response.text);
        
    } catch (error) {
        console.error('Error:', error.message);
    }
}

Response Handling

// Response includes parsed text and metadata
const response = await client.sendMessage('Tell me about Web3');
console.log(response.text);       // The agent's response
console.log(response.events);     // Event metadata
console.log(response.tools);      // Tools used
console.log(response.sources);    // Source references

Next Steps

  • Explore agent capabilities using agent.getSkills()

  • Manage conversation history with client.getConversationHistory()

  • Implement error handling for robust applications

PreviousInstallationNextAuthentication

Last updated 2 months ago