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.

Tools & Execution

Types & Interfaces

Context & Sessions

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);
}
I