Overview
This page provides comprehensive documentation for all Maikers SDK methods and interfaces. The SDK is built with TypeScript and provides full type safety for all operations.Authentication
Agent Operations
Type Definitions
Error Handling
SDK Initialization
Constructor
SDKConfig Interface:
Authentication Methods
auth()
Returns:
Promise<AuthResponse>
AuthResponse Interface:
isAuthenticated()
boolean
Example:
logout()
Agent Operations
agent.create()
AgentConfig Interface:
Promise<Agent>
Agent Interface:
agent.get()
Returns:
Promise<Agent>
Example:
agent.list()
ListOptions Interface:
Promise<Agent[]>
Example:
agent.update()
Returns:
Promise<Agent>
Example:
agent.updateSettings()
Returns:
Promise<Agent>
Example:
agent.delete()
Returns:
Promise<void>
Example:
Agent Interaction
agent.query()
QueryRequest Interface:
Promise<QueryResponse>
QueryResponse Interface:
agent.chat()
ChatOptions Interface:
Promise<ChatSession>
ChatSession Interface:
Error Handling
Error Types
The SDK throws specific error types for different scenarios:Error Handling Examples
Utility Methods
getCredits()
Promise<CreditsInfo>
CreditsInfo Interface:
getUsage()
Returns:
Promise<UsageStats>
UsageStats Interface:
