Skip to main content

API Overview

NikCLI provides a comprehensive set of APIs for integrating with external tools, extending functionality, and building custom applications. The APIs are designed following TypeScript-first principles with full type safety and extensive documentation.

Agent APIs

Create, manage, and interact with AI agents

Tool APIs

Extend functionality with custom tools

Configuration APIs

Manage settings and preferences programmatically

Streaming APIs

Real-time communication and progress tracking

Core Interfaces

AgentTask Interface

Represents a task that can be executed by an agent:

WorkspaceContext Interface

Provides context about the current project and environment:

AgentExecution Interface

Represents the execution of a task by an agent:

Agent Management APIs

AgentService

Central service for managing agent lifecycle and operations:

BaseAgent Interface

All agents implement the BaseAgent interface:

Tool System APIs

ToolService

Manages the tool system and provides secure tool execution:

Configuration APIs

ConfigManager

Provides programmatic access to configuration management:

Streaming APIs

Real-time Communication

NikCLI provides real-time APIs for monitoring agent progress and system events:

Error Handling

Error Types and Recovery

Next Steps

Tool System

Learn about the tool system and creating custom tools

Streaming APIs

Master real-time communication and progress tracking

Integrations

Integrate NikCLI with external tools and services

Examples

See practical examples of API usage
All APIs are fully typed with TypeScript. Use your IDE’s IntelliSense for comprehensive autocomplete and documentation while developing.