Integrate Kairos into your applications with our official SDKs. Each SDK provides a type-safe, idiomatic interface for your preferred language.
Choose your language and install the SDK:
npm install @kairos-connect/sdkpip install kairos-sdkgo get github.com/kairos-connect/kairos-goOfficial SDK for Node.js and browser environments with full TypeScript support. Works with npm, yarn, pnpm, and Bun.
@kairos-connect/sdkPythonic SDK with async support and type hints for modern Python applications.
kairos-sdkIdiomatic Go client with strongly-typed interfaces and context support.
github.com/kairos-connect/kairos-goAll SDKs provide a consistent interface across languages:
// Initialize the client
const kairos = new Kairos({ apiKey: 'YOUR_API_KEY' });
// Resources available
kairos.tasks // Tasks API
kairos.goals // Goals API
kairos.comments // Comments API
kairos.team // Team API
kairos.documents // Documents API
// Common methods
kairos.tasks.list(params?) // Paginated list
kairos.tasks.get(id) // Get single resource
kairos.tasks.create(data) // Create resource
kairos.tasks.update(id, data) // Update resource
kairos.tasks.delete(id) // Delete resourceList methods return paginated responses:
// Fetch first page
const result = await kairos.tasks.list({ limit: 50 });
console.log(result.data); // Array of tasks
console.log(result.pagination.page); // Current page
console.log(result.pagination.total); // Total count
console.log(result.pagination.has_more); // More pages?
// Fetch next page
if (result.pagination.has_more) {
const nextPage = await kairos.tasks.list({
limit: 50,
page: result.pagination.page + 1
});
}All SDKs throw typed errors that you can catch and handle:
try {
const task = await kairos.tasks.get('invalid-id');
} catch (error) {
if (error instanceof KairosNotFoundError) {
console.log('Task not found');
} else if (error instanceof KairosValidationError) {
console.log('Invalid request:', error.message);
} else if (error instanceof KairosRateLimitError) {
console.log('Rate limited, retry after:', error.retryAfter);
} else if (error instanceof KairosAuthError) {
console.log('Invalid API key');
}
}