Skip to main content

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

Manage API authentication and sessions

Agent Operations

Create, manage, and interact with AI agents

Type Definitions

TypeScript interfaces and types

Error Handling

Error types and handling patterns

SDK Initialization

Constructor

Initialize a new instance of the Maikers SDK. Parameters: SDKConfig Interface:
Example:

Authentication Methods

auth()

Authenticate with the Maikers API using an API key. Parameters: Returns: Promise<AuthResponse> AuthResponse Interface:
Example:

isAuthenticated()

Check if the SDK is currently authenticated. Returns: boolean Example:

logout()

Clear the current authentication session. Example:

Agent Operations

agent.create()

Create a new AI agent with the specified configuration. Parameters: AgentConfig Interface:
AgentSettings Interface:
Returns: Promise<Agent> Agent Interface:
Example:

agent.get()

Retrieve information about a specific agent. Parameters: Returns: Promise<Agent> Example:

agent.list()

List all agents associated with your account. Parameters: ListOptions Interface:
Returns: Promise<Agent[]> Example:

agent.update()

Update an existing agent’s configuration. Parameters: Returns: Promise<Agent> Example:

agent.updateSettings()

Update specific settings for an agent. Parameters: Returns: Promise<Agent> Example:

agent.delete()

Delete an agent permanently. Parameters: Returns: Promise<void> Example:

Agent Interaction

agent.query()

Send a query to an agent and receive a response. Parameters: QueryRequest Interface:
Returns: Promise<QueryResponse> QueryResponse Interface:
Example:

agent.chat()

Start an interactive chat session with an agent. Parameters: ChatOptions Interface:
Returns: Promise<ChatSession> ChatSession Interface:
ChatMessage Interface:
Example:

Error Handling

Error Types

The SDK throws specific error types for different scenarios:

Error Handling Examples

Utility Methods

getCredits()

Get information about your current credit balance and usage. Returns: Promise<CreditsInfo> CreditsInfo Interface:
Example:

getUsage()

Get usage statistics for your account. Parameters: Returns: Promise<UsageStats> UsageStats Interface:
Example:

Type Definitions

Complete Type Reference

Next Steps

Quick Start

Get started with the SDK in minutes

Examples

Explore practical examples and use cases

CLI Tool

Learn about the command-line interface

GitHub

View source code and contribute