Eloquent

Documentation

Package Reference

The @elqnt/* packages provide shared code, types, APIs, and React hooks for building applications on the Eloquent platform.

Installation

All packages are published to npm under the @elqnt scope:

npm install @elqnt/api-client @elqnt/types @elqnt/agents

Package Categories

Core Infrastructure

PackageVersionDescription
@elqnt/api-client1.0.4HTTP client for browser & server
@elqnt/types2.0.13Core TypeScript types

Domain Packages

PackageVersionDescription
@elqnt/admin2.0.6Admin, billing, onboarding
@elqnt/agents3.0.5AI agents & tools
@elqnt/chat3.0.2Chat SDK for React/React Native
@elqnt/docs2.0.9Document processing
@elqnt/entity2.1.3Dynamic entity management
@elqnt/kg3.0.0Knowledge graph
@elqnt/workflow2.1.2Workflow engine

Package Structure

Each package follows a consistent structure with multiple entry points:

// Models/Types
import type { Agent } from "@elqnt/agents/models";

// Browser API
import { getAgentsApi } from "@elqnt/agents/api";

// Server API (SSR)
import { getAgentsServer } from "@elqnt/agents/api/server";

// React Hooks
import { useAgents } from "@elqnt/agents/hooks";

Quick Start

1. Install packages

npm install @elqnt/api-client @elqnt/types @elqnt/agents

2. Configure API client

// Browser
import { browserApiRequest } from "@elqnt/api-client/browser";

const agents = await browserApiRequest("/api/v1/agents", {
  baseUrl: "https://api.example.com",
  orgId: "org_123",
});

// Server (SSR)
import { createServerClient } from "@elqnt/api-client/server";

const client = createServerClient({
  gatewayUrl: process.env.API_GATEWAY_URL!,
  jwtSecret: process.env.JWT_SECRET!,
});

3. Use React hooks

import { useAgents } from "@elqnt/agents/hooks";

function AgentList() {
  const { agents, loading, createAgent } = useAgents({
    baseUrl: config.apiGatewayUrl,
    orgId: config.orgId,
  });

  // ...
}

Type Generation

TypeScript types are generated from Go source using tygo:

cd backend && tygo generate

See Type System for details.

Version Policy

  • Major: Breaking changes to exports or APIs
  • Minor: New features, backward compatible
  • Patch: Bug fixes, documentation

All breaking changes are documented in each package's CHANGELOG.md.