Scan your whole stack
From OX Research Newsroom
Are you using @truefoundry/trueforge-ui?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.179.2
@truefoundry/trueforge-ui was last scanned on 25 Nov 2026 at version 0.179.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.179.2 LATEST | 25 Nov 2026 | No rules fired |
| 0.186.0-rc.3 | 24 Nov 2026 | No rules fired |
| 0.186.0-rc.2 | 17 Nov 2026 | No rules fired |
| 0.186.0-rc.1 | 16 Nov 2026 | Not shown |
| 0.185.1 | 13 Nov 2026 | Not shown |
Findings for v0.179.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.179.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A themeable, composable React SDK for building production-ready AI agent chat applications. Build your own agent chat platform with a flexible UI layer that works with TrueForge or any custom backend. The SDK is fully open source, giving you complete control over your architecture, components, and integrations. Powered by assistant-ui, it follows the familiar shadcn/ui and Tailwind CSS variable theming conventions, making it easy to customize every aspect of the experience.
Features
TrueForgeServerConfig.Bring your own brand, colors, layout, components, and server—the Agent SDK wires up the rest.
<TrueForgeUI /> propsnpm install @truefoundry/trueforge-ui
# or
pnpm add @truefoundry/trueforge-ui
# or
yarn add @truefoundry/trueforge-ui
react / react-dom are required peers. The host app must have
Tailwind CSS set up (v4 recommended) so preflight
and your app chrome work alongside the SDK. In the host stylesheet:
@import 'tailwindcss';
SDK styles (tokens, utilities, OpenUI) load automatically when TrueForgeUI /
ThemeProvider mounts — you do not need to import the SDK stylesheet for
client-only apps.
Optional (SSR / explicit load order):
@import 'tailwindcss';
@import '@truefoundry/trueforge-ui/styles.css';
See docs/compatibility.md for version ranges.
TrueForge (type: "trueforge") — Harness
Zero-config path for the TrueForge / Harness API. The SDK dynamically loads
@truefoundry/trueforge-ui/plugins/trueforge-agent-server-adapter, builds the
HTTP client, and composes chat + builder + default settings catalogs into an
AgentUIServer.
Install the SDK peer used by the adapter (workspace package in this monorepo):
pnpm add @truefoundry/trueforge-sdk
Bearer token (embeds / remote API):
import { TrueForgeUI } from '@truefoundry/trueforge-ui';
export default function App() {
return (
<div style={{ height: '100dvh' }}>
<TrueForgeUI
server={{
type: 'trueforge',
baseUrl: process.env.TRUEFORGE_BASE_URL, // optional; default '/'
token: process.env.TRUEFORGE_TOKEN!,
}}
layout="sidebar"
/>
</div>
);
}
Cookie / same-origin hosts — omit token and inject fetch (e.g. an
auth-aware wrapper that follows OIDC cookies):
<TrueForgeUI
server={{
type: 'trueforge',
baseUrl: '/',
fetch: authAwareFetch,
}}
layout="sidebar"
agentConfig={{
mode: 'AgentLibraryWithComposer',
defaultAgentSpec: { model: { name: '…' } }, // often seeded at boot from listModels
}}
/>
Optional: pass catalog to override the built-in settings catalogs, or import
createTrueForgeAgentUIServer from
@truefoundry/trueforge-ui/plugins/trueforge-agent-server-adapter when you need
the factory outside <TrueForgeUI />.
Custom — bring your own AgentUIServer
Pass a complete server object directly. Use createTrueForgeServer to compose separately implemented ports.
import { TrueForgeUI, createTrueForgeServer } from '@truefoundry/trueforge-ui';
const server = createTrueForgeServer({
chatServer,
getCapabilities,
getModels,
getSkills,
getMcp,
searchAgents,
saveAgent,
});
<TrueForgeUI server={server} layout="sidebar" />;
<TrueForgeUI /> props<TrueForgeUI /> is the single entry point. Every capability is driven by a prop.
<TrueForgeUI
server={{
type: 'trueforge',
baseUrl: process.env.TRUEFORGE_BASE_URL,
token: process.env.TRUEFORGE_TOKEN,
}} // or a ready AgentUIServer
layout="sidebar" // 'sidebar' | 'drawer' | 'dock' | 'widget' | CustomLayout
agentConfig={{
mode: 'AgentLibraryWithComposer', // default when omitted
defaultAgentSpec: { model: { name: 'openai-main/gpt-4.1' } },
}}
theme={{
preset: 'claude',
brand: { mode: 'icon-title', name: 'Acme', icon: '/icon.svg' },
}}
overrides={{/* slot overrides */}}
className="h-full"
/>
| Prop | Type | Required | Description |
|---|---|---|---|
server |
TrueForgeServerConfig |
✅ | Built-in trueforge config or a ready AgentUIServer. |
layout |
LayoutProp |
✅ | Built-in layout string or a custom React component. |
agentConfig |
AgentConfig |
— | Shell mode: SingleAgent / AgentLibrary / AgentComposer / AgentLibraryWithComposer. Defaults to library + composer. |
theme |
ThemeConfig |
— | Preset, mode, tokens, brand, icons, content classNames (see Theming). |
overrides |
SlotOverrides |
— | Map of slot overrides (see Overriding components). |
className |
string |
— | Applied to the layout root. |
initialSessionId |
string |
— | Resume a specific session. |
onError |
(error: unknown) => void |
— | Host error hook (runtime + server init). |
analytics |
{ track: TrackAnalytics } |
— | Host product-analytics sink; SDK never ships a vendor. |
<TrueForgeUI
server={server}
layout="sidebar"
onError={handleError}
analytics={{
track: (eventName, data) => {
// Forward to PostHog / Segment / your sink
myAnalytics.capture(eventName, data);
},
}}
/>
Later sections use server as a TrueForgeServerConfig (usually type: "trueforge"). For a host-built port, pass the AgentUIServer directly.
Pass a preset and/or tokens and the whole UI adapts. Values map onto product CSS variables (--primary-bg, --text-primary, --card-bg, --primary-button-bg, --failure-bg, --radius, …), so no component needs palette-specific code.
const server = {
type: 'trueforge' as const,
baseUrl: process.env.TRUEFORGE_BASE_URL,
token: process.env.TRUEFORGE_TOKEN,
};
<TrueForgeUI
server={server}
layout="sidebar"
theme={{
preset: 'claude', // 'trueforge' | 'claude' | 'chatgpt' | 'gemini'
mode: 'dark', // omit for uncontrolled (useTheme().setTheme works)
tokens: {
primaryBg: 'oklch(0.14 0.02 260)',
textPrimary: 'oklch(0.97 0 0)',
secondaryBg: 'oklch(0.22 0.02 260)',
primaryButtonBg: 'oklch(0.55 0.2 275)',
primaryButtonHover: 'oklch(0.5 0.2 275)',
primaryButtonText: 'oklch(0.98 0 0)',
ghostButtonHover: 'oklch(0.8 0.12 200)',
radius: '0.5rem',
},
}}
/>;
You can also override tokens from host CSS on .aui-theme-root (inline theme.tokens still win over :root):
.aui-theme-root {
--font-agent-ui: 'Your Font', ui-sans-serif, system-ui, sans-serif;
--primary-button-bg: oklch(0.55 0.2 275);
}
Screenshot: the same layout rebranded with a custom palette.
See docs/theming.md for presets, controlled vs uncontrolled mode, and deeper theming notes.
Style content renderers (markdown, code fences, OpenUI, Monaco) without swapping
slots. Pass theme.classNames on <TrueForgeUI /> — values merge onto the
defaults via cn():
<TrueForgeUI
server={server}
layout="sidebar"
theme={{
classNames: {
markdown: 'prose prose-neutral dark:prose-invert max-w-none',
inlineCode: 'font-semibold',
syntaxHighlighter: {
root: 'my-code-block rounded-lg',
pre: 'bg-zinc-950 p-4',
code: 'text-sm font-mono',
lineNumber: 'opacity-60',
},
openui: { root: 'my-openui-host', scope: 'p-2' },
monaco: { root: 'my-monaco h-64', editor: 'rounded-lg', monacoTheme: 'vs-dark' },
},
}}
/>
theme.classNames key |
Component / surface | Fields |
|---|---|---|
markdown |
Markdown (message prose root) |
string |
inlineCode |
Markdown inline `code` | string |
|
syntaxHighlighter |
SyntaxHighlighter (non-OpenUI fences) |
root, pre, code, lineNumber |
openui |
OpenUiFenceBlock |
root, scope |
monaco |
MonacoEditorCore (code artifacts / diffs) |
root, editor, monacoTheme (Monaco theme id) |
Custom layouts and host atoms under the provider can read the same map with
useOptionalContentClassNames() / useContentClassNames() (exported from the
package). Host CSS on .aui-markdown / .aui-syntax-highlighter / .aui-openui
/ .aui-monaco still works as an alternative.
Set brand.mode, then pass the fields that mode requires. name always labels the
mark (alt / aria-label).
| Look | mode |
Required | Expanded chrome | Collapsed / compact |
|---|---|---|---|---|
| Default | omit brand |
— | TrueForge wordmark | TrueForge square |
| Icon + title | 'icon-title' |
name (+ optional icon) |
square + title text | square |
| Icon only | 'icon-only' |
name, icon |
square (no title text) | square |
| Wide logo | 'logo' |
name, icon, logo |
wide logo (no title text) | square |
<TrueForgeUI
server={server}
layout="sidebar"
theme={{
brand: {
mode: 'icon-title',
name: 'Acme',
icon: '/brand/icon.svg',
},
}}
/>
Icon-only chrome (name kept for alt):
theme={{
brand: {
mode: 'icon-only',
name: 'Acme',
icon: '/brand/icon.svg',
},
}}
Wide logo for expanded chrome. A square icon is required because collapsed chrome,
the welcome screen, and the widget button continue to use the square asset:
<TrueForgeUI
server={server}
layout="sidebar"
theme={{
brand: {
mode: 'logo',
name: 'Acme',
icon: '/brand/icon.svg',
logo: '/brand/wordmark.svg',
href: '/',
},
}}
/>
Both icon and logo accept { src, light, dark }. The SDK picks the source matching the
resolved theme mode; setting only one light/dark source uses it for both. href wraps
configured images in a same-tab link.
Component marks — theme.brand takes image URLs only. To render an inline SVG or a custom
component, override the BrandLogo slot, the same way you replace any other atom:
<TrueForgeUI server={server} layout="sidebar" overrides={{ BrandLogo: MyMark }} />
Custom layouts — import BrandLogo and use variant="icon" for compact surfaces or
variant="logo" for expanded chrome. Prefer resolveBrandChrome(useBrand()) so expanded
vs collapsed choices match the base layouts. Pair with useBrandName() when chrome should
show the title text (see Custom layouts).
Screenshot: external brand mark rendered in the base layout header.
agentConfig controls library chrome, draft composer, and how New Chat / Clear Chat behave.
| Mode | Layout chrome | Agent selection / New Chat |
|---|---|---|
AgentLibraryWithComposer (default) |
Agents + draft builder | New Chat opens draft; library picks a named agent |
SingleAgent |
Named-only, plain composer | Locked to name; New Chat / Clear Chat = new thread |
AgentLibrary |
Agents only (no draft) | Empty until pick; no New Chat; Clear Chat after selection |
AgentComposer |
Draft builder only (no library) | Always draft; New Chat / Clear Chat = fresh draft |
In library modes, picking an agent from Agents switches to a named chat for that agent and remounts the runtime so the new agent starts from a clean conversation. Draft chats can be promoted via Save agent (server.saveAgent on the resolved AgentUIServer). Clear Chat (thread header) resets the current named or draft session.
Mutable composers expose Agent Config for live model parameters, instructions, runtime behavior, per-connector MCP tools, and skills. Runtime Config opens in a second right-side drawer. The compact Tools picker contains only Connectors and Skills. The Save Agent drawer only edits the agent name while preserving the active draft configuration; cancelling it discards that local edit. Model context and output limits render when the server supplies that optional catalog metadata.
{
/* Library + draft (default) */
}
<TrueForgeUI server={server} layout="sidebar" />;
{
/* Named-only lock */
}
<TrueForgeUI server={server} layout="sidebar" agentConfig={{ mode: 'SingleAgent', name: 'support-agent' }} />;
{
/* Library only — select an agent to start */
}
<TrueForgeUI server={server} layout="sidebar" agentConfig={{ mode: 'AgentLibrary' }} />;
{
/* Composer only */
}
<TrueForgeUI
server={server}
layout="sidebar"
agentConfig={{
mode: 'AgentComposer',
defaultAgentSpec: { model: { name: 'openai-main/gpt-4.1' } },
}}
/>;
Screenshot: Agents open; selecting an agent resets the thread.
Built-in layout values:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.