Getting StartedInstallation and setup guides 6
AIAI chat models, streaming, and history 1
FormInput and selection components 27
FlowWorkflow graph and execution surfaces 4
LayoutStructural layout components 9
NavigationMenu surfaces and hierarchical actions 7
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 6
UtilityGeneral-purpose interface utilities 7

AI Chat API

Public contracts exported from the core and AG-UI secondary entry points.

Chat component

Use tng-ai-chat for the standard controlled presentation and interaction layer.

NameReturns / kindPurpose
TngAiChatComponentcomponentControlled professional chat shell with transcript, composer, run controls, history, auto-scroll, and bounded rendering.
headerComponentType<unknown> | nullReplaces the default header with a trusted local Angular component.
partRenderersreadonly TngAiMessagePartRenderer[]Maps exact trusted part types or namespaced extension names to local components.
TNG_AI_CHAT_HEADER_CONTEXTInjectionTokenReactive title, status, identity, and busy context for a custom header.
TNG_AI_MESSAGE_PART_CONTEXTInjectionTokenReactive message, part, state, and typed action channel for a custom renderer.
provideTngAiMessagePartRenderer(renderer)ProviderRegisters a trusted feature- or application-scoped custom part component.

Core types

Import these from @tailng-ui/ai.

NameReturns / kindPurpose
TngAiThreadtypeConversation identity, timestamps, title, and JSON-safe metadata.
TngAiRuntypeRun identity, lifecycle status, error, usage, and metadata.
TngAiMessagetypeCanonical message envelope containing ordered message parts.
TngAiMessagePartunionText, reasoning, tool, file, source, data, activity, UI, extension, or unsupported content.
TngAiActionRequestunionSubmit, stop, retry, edit, feedback, approval, and history intents emitted by a UI.
TngAiPartRegistry<T>classExplicit registry for namespaced extension renderers.

Chat store

TngAiChatStore keeps records normalized and ordered by thread.

NameReturns / kindPurpose
snapshot()TngAiChatStoreSnapshotReturns normalized thread, run, message, and per-thread order maps.
upsertThread(thread)voidAdds or replaces a thread record.
upsertRun(run)voidAdds or replaces a run record.
upsertMessage(message, position?)voidAdds or updates a message without duplicating identity.
selectMessages(threadId)readonly TngAiMessage[]Returns a cached ordered projection for one thread.
clearThread(threadId)voidClears the thread and its runs and messages.
dispose()voidClears all records and rejects later writes with a diagnostic.

History controller

TngAiHistoryController coordinates bounded, cursor-based loading.

NameReturns / kindPurpose
loadBefore(threadId, cursor?, limit?)Promise<TngAiHistoryLoadResult>Loads and prepends the previous cursor page.
retry(threadId)Promise<TngAiHistoryLoadResult>Retries the last request recorded for a thread.
state(threadId)TngAiHistoryStateReads loading, cursor, exhaustion, and error state.
activateThread(threadId)voidAborts history work belonging to inactive threads.
dispose()voidAborts all active requests.

AG-UI adapter

Import these from @tailng-ui/ai/ag-ui. @ag-ui/core is an optional peer dependency.

NameReturns / kindPurpose
validateTngAgUiEvent(value, options?)TngAgUiValidationResultChecks JSON limits, profile support, and the official AG-UI schema.
new TngAgUiReducer(store, options?)TngAgUiReducerCreates an AG-UI event reducer over a normalized chat store.
reducer.reduce(value)TngAgUiReduceResultValidates and applies one event or returns a diagnostic.
reducer.diagnostics()readonly TngAgUiReducerDiagnostic[]Returns bounded reducer diagnostics for observability.