Get up and running with Khwand AI in minutes
Before you begin, ensure you have the following installed:
Install the Khwand SDK using your preferred package manager:
npm install @khwand/sdkyarn add @khwand/sdkpnpm add @khwand/sdkpip install khwand-sdkInitialize Khwand in your project directory:
npx khwand initConnect your GitHub repository to enable automated testing on PRs:
npx khwand setup githubCreate a test file for your AI agent:
// tests/agent.test.ts
import { testAgent } from '@khwand/sdk';
testAgent('customer-support-agent', {
scenarios: [
{
input: 'What is your refund policy?',
expected: 'mentions 30-day refund window',
},
{
input: 'I want to speak to a human',
expected: 'offers human handoff',
},
],
});Execute your test suite locally:
npx khwand testPush your changes to trigger automated testing:
git push origin mainCheck your GitHub PR for test results and stability scores:
# Results appear in your PR checksMain configuration file for Khwand
export default {
// Test configuration
tests: {
timeout: 30000, // 30 seconds per test
parallel: true, // Run tests in parallel
retries: 2, // Retry failed tests twice
},
// Model configuration
models: {
primary: 'gpt-4',
fallback: ['claude-3-opus', 'gemini-pro'],
},
// Reporting
reporting: {
format: ['json', 'html'],
output: './khwand-reports',
},
};