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

Next Steps

  • Explore agent capabilities using agent.getSkills()

  • Manage conversation history with client.getConversationHistory()

  • Implement error handling for robust applications

Last updated