Package Exports

The gecx-chat package exposes eighteen entry points. Each is a separate deep import so bundlers tree-shake unused code.

PathDescriptionKey ExportsWhen to Use
gecx-chatFramework-neutral corecreateChatClient, ChatSession, ChatSdkError, auth providers, transports, defineClientTool, defineServerTool, createServerToolManifest, message builders and predicates, governance, identity, rich content, memory adapters/tools, signals (SignalRunner, SignalEscalator, adapters), permissions (PermissionManager, providers), agent graph (agentGraph, defineRouter, defineSpecialist, createA2AAgentClient, createAgentGraphTransport), computerUseToolEvery project — this is the primary entry point
gecx-chat/reactReact adapterChatProvider, useChatSession, useChatClient, useIdentity, useConversations, useClientToken, useRecaptcha, useRecaptchaToken, useImpressionRef, useMemory, useSentiment, useIntent, usePermission, usePermissionManager, MessagePart, <MemoryList>, <PermissionPrompt>, <ComputerUseSurface>, UI components, renderer registry, recipesReact apps that need hooks and prebuilt components
gecx-chat/react/uiOptional React UI primitivesChatSurface, MessageList, Composer, SuggestionBar, ToolApprovalSurface, HandoffBanner, DebugDrawer, AttachmentProgressItemReact apps that want first-party primitives without growing the main adapter import
gecx-chat/react/voiceReact voice surface<VoiceToggle>, <VoiceComposer>, <TranscriptDisplay>, <AudioMessage>React apps using voice
gecx-chat/serverServer-side helperscreateChatTokenHandler, createServerToolHandler, verifyAllowedOrigin, redaction utilities, Agentis handlers (createAgentisSessionHandler, createAgentisProxyHandler, createAgentisTokenHandler, createAgentisShoppingEventHandler), ComputerUseSession, MockProvider, BrowserbaseProviderNode.js proxy / API route for token minting, server-tool execution, Agentis proxying, computer-use session handling
gecx-chat/agentisAgentis Platform integrationcreateAgentisProxyTransport, createAgentisTransport, connectAgentis, createMockAgentisBackend, Agentis normalizer utilities, createAgentisShoppingEventSink, Agentis server handlersAgentis Platform integrations; prefer proxy-first transport in production and direct transport only with explicit token-exposure opt-ins
gecx-chat/testingTest utilitiescreateMockChatClient, createMockTransport, createMockVoiceProvider, createMockPermissionProvider, transcript, mockScenarios, scenarioCatalog, tool fakesUnit and integration tests
gecx-chat/testing/vitestVitest-only transport contract harnessrunTransportContractTests, describeTransportContractCustom transport contract tests that already run inside Vitest
gecx-chat/voiceVoice subsystemVoiceSession, createGeminiLiveProvider, createWebAudioMockVoiceProvider, createVoiceWebSocketTransport, createWebRTCVoiceTransport, audio utilities (parseAudioMime, encodePcmToBase64, chunkPcm20ms), BargeInArbiterApps wiring real-time voice
gecx-chat/dashboardsPre-built analytics widgets<DeflectionTrend>, <CsatDistribution>, <AhtHistogram>, <AgentAssistRate>, <GmvBreakdown>, <MetricsDashboard> plus the aggregation primitivesReact apps embedding analytics widgets. Recharts is an optional peer dependency.
gecx-chat/evalEvaluation runnerrunEval, scorer registry, judge providers (Anthropic / OpenAI / Gemini), regression gate, reporterProgrammatic evals (the gecx eval CLI is the most common entry point)
gecx-chat/rich-contentRich content registrycreateRichContentRegistry, buildClientCapabilityDoc, buildPartCapabilities, family constants, URL safety, downgrade utilitiesCustom rich-content family registration and version negotiation
gecx-chat/a2uiAgent-to-UI protocol (core)createA2UISurfaceManager, validateA2UIFrame, defaultActionPolicy, catalog validation (validateCatalogDataModel, buildCatalogActionPolicy, createCatalogManifestLookup), A2UI redaction utilitiesApps accepting generative UI frames from an agent
gecx-chat/a2ui/reactAgent-to-UI React adaptercreateA2UIRenderer, A2UISurfaceView, useA2UIActionBridge, DefaultA2UIConfirmDialog, A2UIErrorBoundaryReact apps rendering A2UI surfaces
gecx-chat/cliCLI entry pointThe gecx command dispatcherProgrammatic invocation of gecx doctor, gecx scaffold, gecx add, gecx eval, gecx lab init, gecx walkthrough, gecx validate, gecx ui:doctor, etc.
gecx-chat/compatLegacy widget bridgecreateWidgetEventBridgeMigrating from the legacy embedded widget to the headless SDK
gecx-chat/schemas/*JSON Schema filesStatic .schema.json filesCI validation, codegen, or agent grounding

Which import do I need?

If you don't want to read the table top-to-bottom:

  • Building a React app? Import from gecx-chat and gecx-chat/react. Add gecx-chat/a2ui/react if the agent will return generative UI surfaces. Add gecx-chat/react/voice if you want the voice toggle and composer. Add gecx-chat/dashboards if you want pre-built analytics widgets.
  • Running a Node.js proxy or token endpoint? Import from gecx-chat/server. You usually pair it with gecx-chat for shared types. Add the ComputerUseSession exports if you enable computer-use.
  • Wiring Agentis Platform? Import createAgentisProxyTransport and analytics helpers from gecx-chat/agentis, and server routes from gecx-chat/server.
  • Wiring voice? voice: 'auto' is the one-line path. For full control or non-React voice, import VoiceSession and providers from gecx-chat/voice.
  • Adding sentiment / intent signals? Import adapters from gecx-chat and React hooks from gecx-chat/react.
  • Building a multi-specialist routing layer? Import agentGraph, defineRouter, defineSpecialist, createA2AAgentClient, and createAgentGraphTransport from gecx-chat.
  • Adding long-term memory? Import adapters from gecx-chat; the React surface is in gecx-chat/react.
  • Writing tests? Import from gecx-chat/testing. createMockChatClient is the fastest entry point. For custom transport contract tests, import runTransportContractTests from gecx-chat/testing/vitest.
  • Running evals in CI? Use the gecx eval CLI (or import runEval from gecx-chat/eval for programmatic invocation).
  • Building a non-React UI (Vue, Svelte, vanilla)? Just gecx-chat. The runtime is framework-neutral.
  • Migrating from the legacy widget? Add gecx-chat/compat and follow the migration guide.
  • Doing CI validation or codegen? Pull JSON Schemas from gecx-chat/schemas/*.

Import Examples

// Core
import { createChatClient, createServerToolManifest, tokenEndpointAuth, createProxyTransport } from 'gecx-chat';

// React
import { ChatProvider, useChatSession, MessagePart } from 'gecx-chat/react';

// Optional React UI primitives
import { AttachmentProgressItem } from 'gecx-chat/react/ui';

// Server (Node.js)
import { createChatTokenHandler, createServerToolHandler } from 'gecx-chat/server';

// Agentis Platform
import { createAgentisProxyTransport, createAgentisShoppingEventSink } from 'gecx-chat/agentis';

// Testing
import { createMockChatClient, mockScenarios, transcript } from 'gecx-chat/testing';

// Vitest-only transport contract harness
import { runTransportContractTests } from 'gecx-chat/testing/vitest';

// Rich content
import { createRichContentRegistry, CORE_FAMILIES } from 'gecx-chat/rich-content';

// A2UI core
import { createA2UISurfaceManager, validateA2UIFrame } from 'gecx-chat/a2ui';

// A2UI React
import { createA2UIRenderer, A2UISurfaceView } from 'gecx-chat/a2ui/react';

// Compat
import { createWidgetEventBridge } from 'gecx-chat/compat';
Source: docs/reference/package-exports.md