Eloquent

Documentation

<!-- AUTO-GENERATED from packages/@elqnt/SDK-REFERENCE.md — do not edit here. Run `pnpm docs:sync`. -->

@elqnt SDK — Hook Reference

Every @elqnt/* package, its React hooks, and the functions each hook gives a client app. Auto-generated from the packages' published type contracts (etc/hooks.api.d.ts) by scripts/gen-sdk-reference.mjs — do not edit by hand.

See CONVENTIONS.md for the architecture and README.md for the package index.

How to use any hook

import { ElqntConfigProvider } from "@elqnt/api-client/react";
import { useEntityRecords } from "@elqnt/entity/hooks";   // hooks live on the /hooks subpath
import type { EntityRecord } from "@elqnt/entity/models";  // types on /models

// Inject baseUrl/orgId/product ONCE (baseUrl from API_GATEWAY_URL_PUBLIC at request time):
<ElqntConfigProvider config={{ baseUrl, orgId, product: "my-product" }}></ElqntConfigProvider>

// Then anywhere in the tree — options are optional once a provider is mounted:
const { queryRecords, loading, error } = useEntityRecords({ entityName: "ticket" });

Contract: imperative methods are async (...args) => Promise<Result>, they never throw (resolve to a default + set error), and they don't auto-fetch on mount. Hooks marked (stateful) also hold their own data/stream state.

Packages

PackageHooks
@elqnt/adminuseOrgAdmin, useUsersAdmin
@elqnt/agentsuseAgents, useSkills, useSubAgents, useToolDefinitions, useConnectors, useAgentJobs, useWidgets, useSkillUserConfig, useAnalytics, useIntegrations, useSandbox, useImageGeneration, useSchedulerTasks, useSchedulerSchedules, useBackgroundAgents
@elqnt/analytics
@elqnt/api-client
@elqnt/chatuseChat, useChatHistory, useChatMonitoring, useHumanAgentSessions
@elqnt/docsuseLibraries, useFolders, useDocuments, useDocumentSearch, useAdminDocIngestion
@elqnt/entityuseEntityDefinitions, useEntityRecords, useEntityAnalytics
@elqnt/kguseGraphs, useKGQuery, useKGDesigner, useCrawlJobs, useQuickIngest, useFullIngest
@elqnt/notificationsuseEmail
@elqnt/types
@elqnt/workflowuseWorkflows, useWorkflowInstances, useWorkflowTemplates

@elqnt/admin

Org / users / invites / settings administration.

useOrgAdmin(options: UseOrgAdminOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any in-flight call runs.
errorstring | nullLast error message, else null.
listOrgs(filter?: ListOrgsFilter) => Promise<Org[]>GET /api/v1/admin/orgs (optional ?status&type&product) — default [].
getOrg(orgId: string) => Promise<Org | null>GET /api/v1/admin/orgs/{orgId} — default null.
getOrgInfo(orgId: string) => Promise<OrgInfo | null>GET /api/v1/admin/orgs/{orgId}/info (lightweight) — default null.
createOrg(org: Partial<Org> & { product?: string; }) => Promise<Org | null>POST /api/v1/admin/orgs — created org, or null on error.
updateOrg(orgId: string, updates: Partial<Org>) => Promise<Org | null>PUT /api/v1/admin/orgs/{orgId} — updated org, or null on error.
deleteOrg(orgId: string) => Promise<boolean>DELETE /api/v1/admin/orgs/{orgId} — true on success.
getSettings() => Promise<OrgSettings | null>GET /api/v1/admin/orgs/{orgId} → OrgSettings — default null.
createSettings(settings: Partial<OrgSettings>) => Promise<OrgSettings | null>Alias for updateSettings (settings rows always exist).
updateSettings(settings: Partial<OrgSettings>) => Promise<OrgSettings | null>PUT /api/v1/admin/orgs/{orgId} then re-GET — updated OrgSettings, or null on error.

useUsersAdmin(options: UseUsersAdminOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any in-flight call runs.
errorstring | nullLast error message, else null.
listUsers() => Promise<User[]>GET /api/v1/admin/users — default [].
getUser(userId: string) => Promise<User | null>GET /api/v1/admin/users/{userId} — default null.
getUserByEmail(email: string) => Promise<User | null>GET /api/v1/admin/users/by-email?email= — default null.
getUserByPhone(phone: string) => Promise<User | null>GET /api/v1/admin/users/by-phone?phone= — default null.
createUser(user: Partial<User>) => Promise<User | null>POST /api/v1/admin/users — created user, or null on error.
updateUser(userId: string, updates: Partial<User>) => Promise<User | null>PUT /api/v1/admin/users/{userId} — updated user, or null on error.
deleteUser(userId: string) => Promise<boolean>DELETE /api/v1/admin/users/{userId} — true on success.
getUserSettings(userId: string) => Promise<UserSettingsResponse | null>GET /api/v1/admin/users/{userId}/settings — default null.
updateUserSettings(userId: string, settings: { settings?: UserSettings; notificationPreferences?: NotificationPreferences; }) => Promise<UserSettingsResponse | null>PUT /api/v1/admin/users/{userId}/settings — updated settings, or null on error.
listInvites() => Promise<Invite[]>GET /api/v1/admin/invites — default [].
getInvite(inviteId: string) => Promise<Invite | null>GET /api/v1/admin/invites/{inviteId} — default null.
sendInvite(invite: InviteInput) => Promise<Invite | null>POST /api/v1/admin/invites/single — created invite, or null on error.
sendInvites(invites: InviteInput[]) => Promise<InvitesResult | null>POST /api/v1/admin/invites, body { invites } — batch result, or null on error.
resendInvite(inviteId: string) => Promise<Invite | null>POST /api/v1/admin/invites/{inviteId}/resend — invite, or null on error.
revokeInvite(inviteId: string) => Promise<boolean>DELETE /api/v1/admin/invites/{inviteId} — true on success.
acceptInvite(inviteId: string) => Promise<Invite | null>POST /api/v1/admin/invites/{inviteId}/accept — invite, or null on error.

@elqnt/agents

AI agents — design/save agents, skills, tools, sub-agents, widgets, jobs, integrations, schedules.

useAgents(options?: UseAgentsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listAgents() => Promise<Agent[]>GET /api/v1/agents — default [].
listAgentSummaries() => Promise<AgentSummary[]>GET /api/v1/agents/summary — default [].
getAgent(agentId: string) => Promise<Agent | null>GET /api/v1/agents/{agentId} — default null.
createAgent(agent: Partial<Agent>) => Promise<Agent | null>POST /api/v1/agents, body Partial<Agent> — created agent, or null on error.
updateAgent(agentId: string, agent: Partial<Agent>) => Promise<Agent | null>PUT /api/v1/agents/{agentId}, body Partial<Agent> — updated agent, or null on error.
deleteAgent(agentId: string) => Promise<boolean>DELETE /api/v1/agents/{agentId} — true on success.
getDefaultAgent() => Promise<Agent | null>GET /api/v1/agents/default — default null.
exportAgent(agentId: string) => Promise<Agent | null>GET /api/v1/agents/{agentId}/export — returns the exported Agent, or null on error (non-throwing).
importAgent(agent: Agent) => Promise<Agent | null>POST /api/v1/agents/import, body Agent — imported agent, or null on error.

useSkills(options?: UseSkillsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listSkills() => Promise<Skill[]>GET /api/v1/skills — default [].
getSkill(skillId: string) => Promise<Skill | null>GET /api/v1/skills/{skillId} — default null.
createSkill(skill: Partial<Skill>) => Promise<Skill | null>POST /api/v1/skills, body Partial<Skill> — created skill, or null on error.
updateSkill(skillId: string, skill: Partial<Skill>) => Promise<Skill | null>PUT /api/v1/skills/{skillId}, body Partial<Skill> — updated skill, or null on error.
deleteSkill(skillId: string) => Promise<boolean>DELETE /api/v1/skills/{skillId} — true on success.
getCategories() => Promise<string[]>GET /api/v1/skills/categories — default [].

useSubAgents(options?: UseSubAgentsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listSubAgents() => Promise<SubAgent[]>GET /api/v1/subagents — default [].
getSubAgent(subAgentId: string) => Promise<SubAgent | null>GET /api/v1/subagents/{subAgentId} — default null.
createSubAgent(subAgent: Partial<SubAgent>) => Promise<SubAgent | null>POST /api/v1/subagents, body { subAgent } — created sub-agent, or null on error.
updateSubAgent(subAgentId: string, subAgent: Partial<SubAgent>) => Promise<SubAgent | null>PUT /api/v1/subagents/{subAgentId}, body { subAgent } — updated sub-agent, or null on error.
deleteSubAgent(subAgentId: string) => Promise<boolean>DELETE /api/v1/subagents/{subAgentId} — true on success.

useToolDefinitions(options?: UseToolDefinitionsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listToolDefinitions() => Promise<ToolDefinition[]>GET /api/v1/tool-definitions — default [].
getToolDefinition(toolDefId: string) => Promise<ToolDefinition | null>GET /api/v1/tool-definitions/{toolDefId} — default null.
getToolDefinitionsByIds(ids: string[]) => Promise<ToolDefinition[]>POST /api/v1/tool-definitions/by-ids, body { ids } — default [].
createToolDefinition(toolDefinition: Partial<ToolDefinition>) => Promise<ToolDefinition | null>POST /api/v1/tool-definitions, body Partial<ToolDefinition> — created def, or null on error.
updateToolDefinition(toolDefId: string, toolDefinition: Partial<ToolDefinition>) => Promise<ToolDefinition | null>PUT /api/v1/tool-definitions/{toolDefId}, body Partial<ToolDefinition> — updated def, or null on error.
deleteToolDefinition(toolDefId: string) => Promise<boolean>DELETE /api/v1/tool-definitions/{toolDefId} — true on success.

useConnectors(options?: UseConnectorsOptions)

MemberSignatureWhat it does
loadingbooleanstate
errorstring | nullstate
listConnectors() => Promise<Connector[]>GET /api/v1/connectors — default [].
getConnector(id: string) => Promise<Connector | null>GET /api/v1/connectors/{id} — default null.
createConnector(connector: ConnectorWrite) => Promise<Connector | null>POST /api/v1/connectors — created connector, or null on error.
updateConnector(id: string, connector: ConnectorWrite) => Promise<Connector | null>PUT /api/v1/connectors/{id} — updated connector, or null on error.
deleteConnector(id: string) => Promise<boolean>DELETE /api/v1/connectors/{id} — true on success.
testConnector(connector: ConnectorWrite & { id?: string; }) => Promise<ConnectorTestResult | null>POST /api/v1/connectors/test — discovery/health result, or null on error.
refreshConnector(id: string) => Promise<Connector | null>POST /api/v1/connectors/{id}/refresh — re-discovered connector, or null.
startConnectorOAuth(id: string, redirectUri: string) => Promise<string | null>POST /api/v1/connectors/{id}/oauth/start — returns the provider authorize URL, or null.
completeConnectorOAuth(id: string, code: string, state: string) => Promise<Connector | null>POST /api/v1/connectors/{id}/oauth/callback — connected connector, or null.

useAgentJobs(options?: UseAgentJobsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listAgentJobs() => Promise<AgentJob[]>GET /api/v1/agent-jobs — default [].
getAgentJob(jobId: string) => Promise<AgentJob | null>GET /api/v1/agent-jobs/{jobId} — default null.
createAgentJob(job: Partial<AgentJob>) => Promise<AgentJob | null>POST /api/v1/agent-jobs — created job, or null on error.
updateAgentJob(jobId: string, job: Partial<AgentJob>) => Promise<AgentJob | null>PUT /api/v1/agent-jobs/{jobId} — updated job, or null on error.
deleteAgentJob(jobId: string) => Promise<boolean>DELETE /api/v1/agent-jobs/{jobId} — true on success.
pauseAgentJob(jobId: string) => Promise<AgentJob | null>POST /api/v1/agent-jobs/{jobId}/pause — paused job, or null on error.
resumeAgentJob(jobId: string) => Promise<AgentJob | null>POST /api/v1/agent-jobs/{jobId}/resume — resumed job, or null on error.
listJobExecutions(jobId: string, opts?: { limit?: number; offset?: number; }) => Promise<JobExecution[]>GET /api/v1/agent-jobs/{jobId}/executions — paged run history, default [].
listRecentExecutions(opts?: { since?: string; limit?: number; }) => Promise<JobExecution[]>GET /api/v1/agent-jobs/executions — recent runs across the org, default [].

useWidgets(options: UseWidgetsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listWidgets() => Promise<AgentWidget[]>GET /api/v1/agents/{agentId}/widgets — default [].
getWidget(widgetId: string) => Promise<AgentWidget | null>GET /api/v1/widgets/{widgetId} — default null.
getDefaultWidget() => Promise<AgentWidget | null>GET /api/v1/agents/{agentId}/widgets/default — default null.
createWidget(widget: Partial<AgentWidget>) => Promise<AgentWidget | null>POST /api/v1/agents/{agentId}/widgets, body { widget } — created widget, or null on error.
updateWidget(widgetId: string, widget: Partial<AgentWidget>) => Promise<AgentWidget | null>PUT /api/v1/widgets/{widgetId}, body { widget } — updated widget, or null on error.
deleteWidget(widgetId: string) => Promise<boolean>DELETE /api/v1/widgets/{widgetId} — true on success.
setDefaultWidget(widgetId: string) => Promise<boolean>POST /api/v1/widgets/{widgetId}/default, body { agentId } — true on success.

useSkillUserConfig(options?: UseSkillUserConfigOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
getSkillUserConfig(skillId: string, agentId?: string) => Promise<SkillUserConfig | null>GET .../skills/{skillId}/user-config — default null.
updateSkillUserConfig(skillId: string, data: { enabled?: boolean; displayOrder?: number; config?: Record<string, unknown>; agentId?: string; }) => Promise<SkillUserConfig | null>PUT .../skills/{skillId}/user-config — config or null on error.
deleteSkillUserConfig(skillId: string, agentId?: string) => Promise<boolean>DELETE .../skills/{skillId}/user-config — true on success.
listSkillUserConfigs(params?: { agentId?: string; limit?: number; offset?: number; }) => Promise<SkillUserConfig[]>GET .../skills/user-configs — default [].
resolveSkillConfig(skillId: string, agentId: string) => Promise<ResolveSkillConfigResponse | null>GET .../skills/{skillId}/resolve — default null.

useAnalytics(options?: UseAnalyticsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
getAgentChatsAnalytics(params: { date_filter: DateFilter; agent_id?: string; }) => Promise<unknown[]>POST /api/v1/agents/analytics/chats — default [].
getAgentCSATAnalytics(params: { date_filter: DateFilter; agent_id?: string; }) => Promise<unknown[]>POST /api/v1/agents/analytics/csat — default [].
getAgentListAnalytics() => Promise<unknown[]>GET /api/v1/agents/analytics/list — default [].
getTaskOutcomes(params: { date_filter: DateFilter; }) => Promise<unknown[]>POST /api/v1/agents/analytics/task-outcomes — default [].

useIntegrations(options?: UseIntegrationsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listIntegrations() => Promise<UserIntegration[]>GET /api/v1/integrations — default [].
getIntegration(provider: IntegrationProviderTS, integrationType: IntegrationTypeTS) => Promise<UserIntegration | null>GET /api/v1/integrations/{provider}/{type} — default null.
connectIntegration(params: { provider: IntegrationProviderTS; integrationType: IntegrationTypeTS; redirectUri: string; }) => Promise<{ authUrl: string; state: string; } | null>POST /api/v1/integrations/connect — { authUrl, state } or null on error.
disconnectIntegration(params: { provider: IntegrationProviderTS; integrationType: IntegrationTypeTS; }) => Promise<boolean>POST /api/v1/integrations/disconnect — true on success.
refreshIntegration(params: { provider: IntegrationProviderTS; integrationType: IntegrationTypeTS; }) => Promise<UserIntegration | null>POST /api/v1/integrations/refresh — integration or null on error.
updateTriage(params: { provider: IntegrationProviderTS; integrationType: IntegrationTypeTS; triageEnabled: boolean; }) => Promise<UserIntegration | null>POST /api/v1/integrations/triage — integration or null on error.
runEmailTriage() => Promise<{ success: boolean; emailsFound: number; instancesCreated: number; } | null>POST /api/v1/integrations/triage/run — { success, emailsFound, instancesCreated } or null on error.

useSandbox(options?: UseSandboxOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
createSandbox(request: Omit<CreateSandboxRequest, "orgId">) => Promise<SandboxMutationResult | null>POST /api/v1/sandboxes — { id, url, sandbox? } or null on error.
getSandbox(sandboxId: string) => Promise<Sandbox | null>GET /api/v1/sandboxes/{sandboxId} — default null.
updateSandbox(sandboxId: string, request: { prompt: string; title?: string; }) => Promise<SandboxMutationResult | null>PUT /api/v1/sandboxes/{sandboxId} — { id, url, sandbox? } or null on error.
listSandboxes(limit?: number) => Promise<{ sandboxes: Sandbox[]; total: number; }>GET /api/v1/sandboxes — { sandboxes, total };
deleteSandbox(sandboxId: string) => Promise<boolean>DELETE /api/v1/sandboxes/{sandboxId} — true on success.

useImageGeneration(options: UseImageGenerationOptions)

MemberSignatureWhat it does
generate(request: ImageGenerationRequest) => Promise<ImageGenerationResponse | null>POST /api/v1/agents/images — hosted image URL, or null on error.
loadingbooleanTrue while a request is in flight.
errorstring | nullLast error message, else null.
clearError() => voidClears the current error.

useSchedulerTasks(options?: UseSchedulerTasksOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listTasks(params?: { status?: string; limit?: number; offset?: number; }) => Promise<SchedulerTask[]>GET /api/v1/scheduler/tasks — default [].
createTask(task: Partial<SchedulerTask>) => Promise<SchedulerTask | null>POST /api/v1/scheduler/tasks — created task, or null on error.
getTask(taskId: string) => Promise<SchedulerTask | null>GET /api/v1/scheduler/tasks/{taskId} — default null.
updateTask(taskId: string, task: Partial<SchedulerTask>) => Promise<SchedulerTask | null>PUT /api/v1/scheduler/tasks/{taskId} — updated task, or null on error.
deleteTask(taskId: string) => Promise<boolean>DELETE /api/v1/scheduler/tasks/{taskId} — true on success.
snoozeTask(taskId: string, delay: { amount: number; unit: string; }) => Promise<SchedulerTask | null>POST /api/v1/scheduler/tasks/{taskId}/snooze — task or null on error.
completeTask(taskId: string) => Promise<SchedulerTask | null>POST /api/v1/scheduler/tasks/{taskId}/complete — task or null on error.
startTask(taskId: string) => Promise<SchedulerTask | null>POST /api/v1/scheduler/tasks/{taskId}/start — task or null on error.

useSchedulerSchedules(options?: UseSchedulerSchedulesOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listSchedules(params?: { status?: string; limit?: number; offset?: number; }) => Promise<SchedulerSchedule[]>GET /api/v1/scheduler/schedules — default [].
createSchedule(schedule: Partial<SchedulerSchedule>) => Promise<SchedulerSchedule | null>POST /api/v1/scheduler/schedules — created schedule, or null on error.
getSchedule(scheduleId: string) => Promise<SchedulerSchedule | null>GET /api/v1/scheduler/schedules/{scheduleId} — default null.
updateSchedule(scheduleId: string, schedule: Partial<SchedulerSchedule>) => Promise<SchedulerSchedule | null>PUT /api/v1/scheduler/schedules/{scheduleId} — updated schedule, or null on error.
deleteSchedule(scheduleId: string) => Promise<boolean>DELETE /api/v1/scheduler/schedules/{scheduleId} — true on success.
pauseSchedule(scheduleId: string) => Promise<SchedulerSchedule | null>POST /api/v1/scheduler/schedules/{scheduleId}/pause — schedule or null on error.
resumeSchedule(scheduleId: string) => Promise<SchedulerSchedule | null>POST /api/v1/scheduler/schedules/{scheduleId}/resume — schedule or null on error.
runSchedule(scheduleId: string) => Promise<SchedulerSchedule | null>POST /api/v1/scheduler/schedules/{scheduleId}/run — schedule or null on error.

useBackgroundAgents(options: UseBackgroundAgentsOptions) (stateful)

MemberSignatureWhat it does
liveStatesRecord<string, BGAgentLiveState>Live SSE-accumulated state per streamed jobId.
streamJob(jobId: string) => voidOpen an SSE stream for a job's progress (job runs via the jobs API).
createTask(prompt: string, attachments?: Attachment[]) => Promise<string | null>Create a background task via the chat system — returns chatKey, or null on error.
watchChat(chatKey: string) => Promise<void>Watch a chat for realtime updates via SSE.
unwatchChat(chatKey: string) => voidStop watching a chat and tear down its SSE connection.
watchedChatsRecord<string, WatchedChatState>Live state per watched chatKey.
triggerAgent(request: Pick<TriggerBackgroundAgentRequest, "name" | "prompt" | "agentName" | "context" | "enableSSE" | "description">) => Promise<TriggerBackgroundAgentResponse | null>POST /api/v1/agents/background/trigger — response, or null on error.
checkStatus(jobId: string) => Promise<BackgroundAgentStatusResponse | null>GET /api/v1/agents/background/{jobId}/status — response, or null on error.
listAgentSummaries() => Promise<AgentSummary[]>GET /api/v1/agents/summary — default [].
loadingbooleanOR of the imperative methods' in-flight loading flags.
errorstring | nullFirst non-null imperative-method error, else null.

@elqnt/analytics

Product analytics — event tracking + usage/summary queries.

No hooks.

@elqnt/api-client

The transport core: gateway auth + the ElqntConfigProvider and the useResource hook factory every other package is built on.

No hooks.

@elqnt/chat

Chat — history (tier-1) + realtime SSE (tier-2), monitoring, human-agent sessions, memory.

useChat(options: UseChatOptions) (stateful)

MemberSignatureWhat it does
connect() => Promise<void>Connect to the chat server
disconnect() => voidDisconnect from the server
connectionStateTransportStateCurrent connection state
isConnectedbooleanWhether currently connected
startChat(metadata?: Record<string, unknown>) => Promise<string>Start a new chat session.
loadChat(chatKey: string) => Promise<Chat>Load an existing chat, returns the loaded chat
sendMessage(content: string, attachments?: unknown[], data?: Record<string, unknown>) => Promise<void>Send a text message.
sendEvent(event: Omit<ChatEvent, "timestamp">) => Promise<void>Send a raw chat event (for custom event types)
stopGeneration() => Promise<void>Abort the in-flight agent turn for the current chat.
endChat(reason?: string) => Promise<void>End the current chat
startTyping() => voidSignal that user is typing
stopTyping() => voidSignal that user stopped typing
currentChatChat | nullCurrent chat object
chatKeystring | nullCurrent chat key
messagesChatMessage[]Chat messages
streamingMessage{ id: string; content: string; seq: number; } | nullLive preview of the assistant reply currently being generated, fed by message_delta events (cumulative text).
errorTransportError | nullCurrent error
metricsConnectionMetricsConnection metrics
on(eventType: string, handler: (event: ChatEvent) => void) => UnsubscribeSubscribe to specific event type
clearError() => voidClear current error

useChatHistory(options?: UseChatHistoryOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any history verb is in flight.
errorstring | nullLast error from any history verb (string), or null.
getChatHistory(params?: { limit?: number; offset?: number; skipCache?: boolean; }) => Promise<ChatHistoryResult>List the caller's chats (paged).
getChat(chatKey: string) => Promise<ChatSummary | null>Fetch one chat summary by key.
updateChat(chatKey: string, updates: { title?: string; pinned?: boolean; }) => Promise<boolean>Rename / pin a chat.
deleteChat(chatKey: string) => Promise<boolean>Delete a chat.
getChatsByUser(userEmail: string) => Promise<ChatSummary[]>List a user's chats by email.

useChatMonitoring(options?: UseChatMonitoringOptions)

MemberSignatureWhat it does
loadingbooleanstate
errorstring | nullstate
getActiveChats(pastHours?: number) => Promise<ChatSummary[]>
getActiveChatsCount() => Promise<number>
getWaitingChatsCount() => Promise<number>
listQueues() => Promise<Queue[]>

useHumanAgentSessions(options?: UseHumanAgentSessionsOptions)

MemberSignatureWhat it does
loadingbooleanstate
errorstring | nullstate
getOnlineSessions() => Promise<AgentSession[]>
getAgentSession(agentId: string) => Promise<AgentSession | null>

@elqnt/docs

Document libraries — libraries/folders/documents, file/text upload + embeddings, semantic search.

useLibraries(options: UseLibrariesOptions) (stateful)

MemberSignatureWhat it does
librariesDocLibrary[]state
selectedLibraryDocLibrary | nullstate
isLoadingbooleanstate
isReadybooleanstate
errorstring | nullstate
loadLibraries() => Promise<DocLibrary[]>
getLibrary(libraryId: string) => Promise<DocLibrary | null>
createLibrary(data: CreateLibraryInput) => Promise<DocLibrary | null>
updateLibrary(libraryId: string, updates: Partial<DocLibrary>) => Promise<DocLibrary | null>
deleteLibrary(libraryId: string) => Promise<boolean>
forkLibrary(libraryId: string) => Promise<DocLibrary | null>
selectLibrary(library: DocLibrary | null) => void
refresh() => Promise<void>
clearError() => void

useFolders(options: UseFoldersOptions) (stateful)

MemberSignatureWhat it does
foldersDocFolder[]state
isLoadingbooleanstate
isReadybooleanstate
errorstring | nullstate
loadFolders() => Promise<DocFolder[]>
createFolder(input: CreateFolderInput | string) => Promise<DocFolder | null>
renameFolder(folderId: string, newTitle: string) => Promise<boolean>
updateFolderColor(folderId: string, color: string) => Promise<boolean>
updateFolder(folderId: string, updates: Partial<DocFolder>) => Promise<DocFolder | null>
deleteFolder(folderId: string) => Promise<boolean>
moveFolder(folderId: string, newParentFolderId: string | null) => Promise<boolean>Re-parent a folder.
refresh() => Promise<void>
clearError() => void

useDocuments(options: UseDocumentsOptions) (stateful)

MemberSignatureWhat it does
documentsDocument[]state
isLoadingbooleanstate
isReadybooleanstate
errorstring | nullstate
totalCountnumberstate
loadDocuments() => Promise<Document[]>
createDocument(data: CreateDocumentInput) => Promise<Document | null>Create a document.
renameDocument(documentId: string, newTitle: string) => Promise<boolean>
updateDocument(documentId: string, updates: CreateDocumentInput) => Promise<Document | null>Update a document.
deleteDocument(documentId: string) => Promise<boolean>
moveDocument(documentId: string, newFolderId: string, newLibraryId?: string) => Promise<boolean>
refresh() => Promise<void>
clearError() => void

useDocumentSearch(options: UseDocumentSearchOptions) (stateful)

MemberSignatureWhat it does
resultsSearchResult[]state
isSearchingbooleanstate
errorstring | nullstate
search(request: SearchRequest) => Promise<SearchResult[]>
clear() => void

useAdminDocIngestion(options: UseAdminDocIngestionOptions) (stateful)

MemberSignatureWhat it does
jobsAdminIngestionJob[]state
currentJobAdminIngestionJob | nullstate
progressEventsAdminIngestionProgressEvent[]state
isLoadingbooleanstate
isProcessingbooleanstate
isReadybooleanstate
errorstring | nullstate
loadJobs() => Promise<AdminIngestionJob[]>
getJob(jobId: string) => Promise<AdminIngestionJob | null>
startIngestion(files: AdminIngestionFileInput[]) => Promise<string | null>
cancelJob(jobId: string) => Promise<boolean>
connectToProgress(jobId: string) => void
disconnectFromProgress() => void
refresh() => Promise<void>
clearError() => void
clearProgressEvents() => void

@elqnt/entity

Dynamic, schema-driven records — CRUD, query (filter DSL), aggregation, relationships.

useEntityDefinitions(options?: UseEntityDefinitionsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listDefinitions(params?: ListDefinitionsParams) => Promise<EntityDefinition[]>GET /api/v1/entities/definitions — default [].
getDefinition(entityName: string) => Promise<EntityDefinition | null>GET .../definitions/{entityName} — default null.
createDefinition(definition: Partial<EntityDefinition>) => Promise<string>POST .../definitions — new id ("" on error).
updateDefinition(entityName: string, definition: Partial<EntityDefinition>) => Promise<boolean>PUT .../definitions/{entityName} — true on success.
deleteDefinition(entityName: string, params?: DeleteDefinitionParams) => Promise<boolean>DELETE .../definitions/{entityName} — true on success.
listViews(entityName: string) => Promise<EntityView[]>GET .../definitions/{entityName}/views — default [].
createView(entityName: string, view: Partial<EntityView>) => Promise<string>POST .../definitions/{entityName}/views — new id.
updateView(entityName: string, viewId: string, view: Partial<EntityView>) => Promise<boolean>PUT .../definitions/{entityName}/views/{viewId} — true on success.
deleteView(entityName: string, viewId: string) => Promise<boolean>DELETE .../definitions/{entityName}/views/{viewId} — true on success.

useEntityRecords(options: UseEntityRecordsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
queryRecords(params?: QueryRecordsParams) => Promise<PaginatedResult<EntityRecord>>POST /api/v1/entities/{entityName}/records/query — default empty page.
getRecord(recordId: string) => Promise<EntityRecord | null>GET .../records/{recordId} — default null.
createRecord(record: Partial<EntityRecord>) => Promise<EntityRecord | null>POST .../records — created record, or null on error.
updateRecord(recordId: string, record: Partial<EntityRecord>) => Promise<boolean>PUT .../records/{recordId} — true on success.
deleteRecord(recordId: string) => Promise<boolean>DELETE .../records/{recordId} — true on success (soft delete).
countRecords(filters?: Record<string, unknown>) => Promise<number>POST .../records/count, body { filters } — default 0.
aggregateRecords(request: AggregateRequest) => Promise<AggregateResponse>POST .../records/aggregate — default { groups: [], totals: {} }.
bulkCreate(records: Partial<EntityRecord>[]) => Promise<BulkResult>POST .../records/bulk/create, body { records }.
bulkUpdate(records: Partial<EntityRecord>[]) => Promise<BulkResult>POST .../records/bulk/update, body { records }.
bulkDelete(recordIds: string[]) => Promise<BulkResult>POST .../records/bulk/delete, body { recordIds }.
createRelationship(recordId: string, relationship: CreateRelationshipRequest) => Promise<EntityRelationship | null>POST .../records/{recordId}/relationships — default null.
listRelationships(recordId: string, params?: ListRelationshipsParams) => Promise<EntityRelationship[]>GET .../records/{recordId}/relationships — default [].
deleteRelationship(recordId: string, relationshipId: string) => Promise<boolean>DELETE .../records/{recordId}/relationships/{relationshipId} — true on success.

useEntityAnalytics(options: UseEntityAnalyticsOptions)

MemberSignatureWhat it does
loadingRecord<AnalyticsOp, boolean> & { any: boolean; }Per-operation flags, plus loading.any.
errorRecord<AnalyticsOp, string | null> & { first: string | null; }Per-operation messages, plus error.first.
clearError(key?: AnalyticsOp) => voidClear one operation's error, or all of them when called with no key.
tiles<K extends string>(specs: Record<K, EntityFilters>) => Promise<Record<K, number>>N named filtered counts — the tile row.
breakdown(params: BreakdownParams) => Promise<BreakdownBucket[]>GROUP BY one field — default [].
matrix(params: MatrixParams) => Promise<MatrixCell[]>GROUP BY two fields — default [].
timeseries(params: TimeseriesParams) => Promise<TimeseriesPoint[]>Date-bucketed counts, ascending — default [].
percentiles(params: PercentilesParams) => Promise<Record<number, number | null>>Percentiles of a numeric field, keyed by the requested p — default {}.
total(params: TotalParams) => Promise<Record<string, unknown>>Raw ungrouped aggregate, keyed by alias — default {}.

@elqnt/kg

Knowledge graph — graphs, nodes/edges (designer), semantic query, crawl + ingest.

useGraphs(options?: UseGraphsOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listGraphs() => Promise<Graph[]>GET /api/v1/kg/graphs — default [].
getGraph(graphId: string) => Promise<Graph | null>GET /api/v1/kg/graphs/{graphId} — default null.
createGraph(graph: CreateGraphRequest) => Promise<Graph | null>POST /api/v1/kg/graphs — created graph, or null on error.
updateGraph(graphId: string, updates: Partial<Graph>) => Promise<Graph | null>PUT /api/v1/kg/graphs/{graphId} — updated graph, or null on error.
deleteGraph(graphId: string) => Promise<boolean>DELETE /api/v1/kg/graphs/{graphId} — true on success.

useKGQuery(options?: UseKGOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
query(queryParams: KGQuery) => Promise<KGQueryResult | null>POST /api/v1/kg/query (X-Graph-ID header) — nodes + edges, or null on error.
getLabels() => Promise<KGLabelInfo[]>GET /api/v1/kg/labels?graphId= — labels with counts, default [].
getNode(nodeId: string) => Promise<KGNode | null>GET /api/v1/kg/nodes/{nodeId}?graphId= — default null.
ingestNode(node: KGNodeIngestRequest) => Promise<string | null>POST /api/v1/kg/nodes (X-Graph-ID header) — new node id, or null on error.
updateNode(nodeId: string, updates: Partial<KGNode>) => Promise<boolean>PUT /api/v1/kg/nodes/{nodeId} (X-Graph-ID header) — true on success.

useKGDesigner(options?: UseKGOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listNodes() => Promise<GraphNodeDefinition[]>GET /api/v1/kg/designer/nodes?graphId= — default [].
getNode(label: string) => Promise<GraphNodeDefinition | null>GET /api/v1/kg/designer/nodes/{label}?graphId= — default null.
createNode(node: Omit<GraphNodeDefinition, "createdAt" | "updatedAt">) => Promise<GraphNodeDefinition | null>POST /api/v1/kg/designer/nodes, body { node } (X-Graph-ID header) — created def, or null.
updateNode(label: string, updates: Partial<GraphNodeDefinition>) => Promise<GraphNodeDefinition | null>PUT /api/v1/kg/designer/nodes/{label}, body { node } (X-Graph-ID header) — updated def, or null.
deleteNode(label: string) => Promise<boolean>DELETE /api/v1/kg/designer/nodes/{label}?graphId= — true on success.
listEdges() => Promise<GraphEdgeDefinition[]>GET /api/v1/kg/designer/edges?graphId= — default [].
createEdge(edge: Omit<GraphEdgeDefinition, "createdAt" | "updatedAt">) => Promise<GraphEdgeDefinition | null>POST /api/v1/kg/designer/edges, body { edge } (X-Graph-ID header) — created def, or null.
updateEdge(label: string, updates: Partial<GraphEdgeDefinition>) => Promise<GraphEdgeDefinition | null>PUT /api/v1/kg/designer/edges/{label}, body { edge } (X-Graph-ID header) — updated def, or null.
deleteEdge(label: string) => Promise<boolean>DELETE /api/v1/kg/designer/edges/{label}?graphId= — true on success.

useCrawlJobs(options?: UseKGOptions)

MemberSignatureWhat it does
loadingbooleanOR of all in-flight method loading flags.
errorstring | nullFirst non-null method error, else null.
listJobs(params?: { limit?: number; offset?: number; status?: string; }) => Promise<{ jobs: CrawlJob[]; total: number; }>GET /api/v1/kg/crawl/jobs?graphId=&limit=&offset=&status= — default { jobs: [], total: 0 }.
startJob(params: { baseUrl: string; depth: number; maxPages: number; }) => Promise<string | null>POST /api/v1/kg/crawl/jobs (X-Graph-ID header) — new job id, or null on error.
getJobStatus(jobId: string) => Promise<CrawlJob | null>GET /api/v1/kg/crawl/jobs/{jobId}?graphId= — default null.
cancelJob(jobId: string) => Promise<boolean>POST /api/v1/kg/crawl/jobs/{jobId}/cancel (X-Graph-ID header) — true on success.
getCrawledPages(jobId: string) => Promise<CrawledPage[]>GET /api/v1/kg/crawl/jobs/{jobId}/pages?graphId= — default [].

useQuickIngest(options: UseQuickIngestOptions) (stateful)

MemberSignatureWhat it does
itemsQuickIngestItem[]List of items in the ingestion queue
isProcessingbooleanWhether ingestion is currently processing
errorstring | nullAny error that occurred
uploadFile(file: File) => Promise<QuickIngestItem>Upload a file to the queue
addUrl(url: string) => voidAdd a URL to the queue
removeItem(id: string) => voidRemove an item from the queue
startIngestion(options: QuickIngestStartRequest["options"]) => Promise<void>Start the ingestion process
cancelIngestion() => voidCancel the current ingestion
clearQueue() => voidClear all items from the queue

useFullIngest(options: UseFullIngestOptions) (stateful)

MemberSignatureWhat it does
sourceType"document" | "website" | nullCurrent source type
documentDocumentInfo | nullUploaded document info
crawlJobCrawlJob | nullCrawl job info
selectedLabelsstring[]Selected label names for extraction
extractedNodesExtractedNode[]Extracted nodes
extractedEdgesExtractedEdge[]Extracted edges/relationships
isExtractingbooleanWhether extraction is in progress
extractionProgressExtractionProgress | nullExtraction progress
isIngestingbooleanWhether ingestion is in progress
ingestProgressIngestProgress | nullIngestion progress
jobIdstring | nullCurrent job ID
errorstring | nullAny error that occurred
uploadDocument(file: File) => Promise<void>Upload a document
setDocumentUrl(url: string, pageCount: number, sizeBytes: number) => voidSet document URL directly (for already uploaded docs)
startCrawl(url: string, depth: number, maxPages: number) => Promise<void>Start a website crawl
setSelectedLabels(labels: string[]) => voidSet selected labels
startExtraction() => Promise<void>Start extraction
cancelExtraction() => Promise<void>Cancel extraction
removeNode(id: string) => voidRemove an extracted node
updateNode(id: string, fields: Record<string, unknown>) => voidUpdate an extracted node
removeEdge(id: string) => voidRemove an extracted edge
ingestNodes() => Promise<void>Ingest all extracted nodes and edges
reset() => voidReset to initial state

@elqnt/notifications

Notifications — transactional email.

useEmail(options?: UseEmailOptions)

MemberSignatureWhat it does
loadingbooleanTrue while a send request is in flight.
errorstring | nullLast error message, or null.
send(request: SendEmailRequest) => Promise<SendEmailResponse | null>Send a pre-rendered notification email.

@elqnt/types

Shared TypeScript types (tygo-generated from Go). No hooks — import types only.

No hooks.

@elqnt/workflow

Workflows — definitions, templates, and instance lifecycle.

useWorkflows(options?: UseWorkflowsOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any method is in flight.
errorstring | nullLatest method error, else null.
listWorkflows() => Promise<WorkflowDefinition[]>GET /api/v1/workflows — default [] on error.
getWorkflow(workflowId: string) => Promise<WorkflowDefinition | null>GET /api/v1/workflows/{id} — default null.
createWorkflow(workflow: Partial<WorkflowDefinition>) => Promise<WorkflowDefinition | null>POST /api/v1/workflows — created definition, or null on error.
updateWorkflow(workflowId: string, workflow: Partial<WorkflowDefinition>) => Promise<WorkflowDefinition | null>PUT /api/v1/workflows/{id} — updated definition, or null on error.
deleteWorkflow(workflowId: string) => Promise<boolean>DELETE /api/v1/workflows/{id} — true/false.

useWorkflowInstances(options?: UseWorkflowInstancesOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any method is in flight.
errorstring | nullLatest method error, else null.
listInstances(definitionId: string, filters?: { userId?: string; status?: string; }) => Promise<WorkflowInstance[]>GET /api/v1/workflows/{definitionId}/instances(?userId=&status=) — default [].
getInstance(instanceId: string) => Promise<WorkflowInstance | null>GET /api/v1/workflows/instances/{id} — default null.
createInstance(definitionId: string, data?: { variables?: Record<string, unknown>; autoExecute?: boolean; }) => Promise<WorkflowInstance | null>POST /api/v1/workflows/{definitionId}/instances — new instance, or null.
updateStatus(instanceId: string, status: string) => Promise<WorkflowInstance | null>PUT /api/v1/workflows/instances/{id}/status — updated instance, or null.
executeNode(instanceId: string, nodeId: string, input: Record<string, unknown>) => Promise<Record<string, unknown> | null>POST .../instances/{id}/nodes/{nodeId}/execute — node output, or null.
resumeNode(instanceId: string, nodeId: string, result: Record<string, unknown>) => Promise<WorkflowInstance | null>POST .../instances/{id}/nodes/{nodeId}/resume — updated instance, or null.
retryNode(instanceId: string, nodeId: string) => Promise<WorkflowInstance | null>POST .../instances/{id}/nodes/{nodeId}/retry — updated instance, or null.

useWorkflowTemplates(options?: UseWorkflowTemplatesOptions)

MemberSignatureWhat it does
loadingbooleanTrue while any method is in flight.
errorstring | nullLatest method error, else null.
listTemplates(category?: string) => Promise<WorkflowTemplate[]>GET /api/v1/workflows/templates(?category=) — default [] on error.
getTemplate(templateId: string) => Promise<WorkflowTemplate | null>GET /api/v1/workflows/templates/{id} — default null.
instantiateTemplate(templateId: string, params: { variables: Record<string, unknown>; title?: string; }) => Promise<WorkflowDefinition | null>POST /api/v1/workflows/templates/{id}/instantiate — new definition, or null.

@elqnt/api-client — the primitives every hook uses

Imported by apps to wire config + (rarely) build custom hooks:

  • ElqntConfigProvider / useElqntConfig / useResolvedConfig (@elqnt/api-client/react) — inject { baseUrl, orgId, product, … } once.
  • useResource(defs, options) (@elqnt/api-client/hooks) — the factory that builds the imperative hooks above.
  • browserApiRequest / configureAuth (/browser), createServerClient / serverApiRequest (/server, server-only).