Skip to main content
The qckfx Agent SDK provides a comprehensive set of classes, types, and utilities for building AI agents. This reference covers all public APIs available in the @qckfx/agent package.

Core Classes

Agent

The main entry point for creating and managing AI agents.

Agent Class

Complete reference for the Agent class including all methods and properties

Configuration

Agent configuration options and schema

Tools & Execution

Tool System

Tool creation, registration, and execution

Built-in Tools

Reference for all built-in tools available to agents

Types & Interfaces

Core Types

Essential types and interfaces for agent development

Event System

Event types and callback interfaces

Context & Sessions

Context Window

Managing conversation context and message history

Session Management

Session state, rollbacks, and multi-repo tracking

Quick Reference

Installation

npm install @qckfx/agent

Basic Usage

import { Agent } from '@qckfx/agent';

// Create agent with configuration
const agent = await Agent.create({
  config: {
    defaultModel: 'claude-3-5-sonnet-20241022',
    environment: 'local',
    systemPrompt: 'You are a helpful coding assistant.'
  }
});

// Process a query
const result = await agent.processQuery('What files are in this directory?');
console.log(result.response);

Environment Variables

The SDK requires these environment variables:
  • LLM_API_KEY - API key for your LLM provider
  • LLM_BASE_URL - Base URL for LLM API (optional, defaults to OpenAI)
  • REMOTE_ID - Remote environment ID (only for remote execution)

Error Handling

All SDK methods can throw errors. Always wrap calls in try-catch blocks:
try {
  const result = await agent.processQuery('Your query here');
  console.log(result.response);
} catch (error) {
  console.error('Agent error:', error.message);
}