1.0.2 • Published 3 months ago
@skillfulai/agents v1.0.2
Skillful AI Agents SDK
The official SDK for integrating Skillful AI agents into your JavaScript applications.
Installation
npm install @skillfulai/agents
Quick Start
const { SkillfulClient } = require('@skillfulai/agents');
// Initialize the client
const client = new SkillfulClient({
apiKey: 'your-api-key'
});
// Example usage
async function example() {
try {
// Get available agents
const agents = await client.getAgents();
// Select an agent
await client.setAgent('Wojak');
// Send a message and get response
const response = await client.sendMessage('Hello!');
console.log(response.text);
} catch (error) {
console.error('Error:', error.message);
}
}
example();
Response Structure
When sending messages, you'll receive a structured response:
{
text: "The agent's response text",
events: [...], // Event metadata
tools: [...], // Tools used in response
sources: [...] // Source references
}
Features
- Easy agent selection and management
- Conversation history tracking
- Real-time AI interactions
- Structured response handling
Documentation
For full documentation, visit docs.skillfulai.io
Support
For support, join our Discord community