Quick Start
Get up and running with the Skillful Web SDK in minutes.
Basic Setup
Basic Setupconst { SkillfulClient } = require('@skillfulai/agents');
// Initialize the client
const client = new SkillfulClient({
apiKey: 'your-api-key'
});Your First Conversation
Your First Conversationasync 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 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 referencesNext Steps
Next StepsExplore agent capabilities using
agent.getSkills()Manage conversation history with
client.getConversationHistory()Implement error handling for robust applications
Last updated