The open-source agent harness - the runtime layer that turns an LLM into a working agent.
Agent Mode Updates (#167)
qaifi-tfb557368aacab
diff --git a/docs/images/agent-composer-1.png b/docs/images/agent-composer-1.pngnew file mode 100644index 000000000..144a16e08Binary files /dev/null and b/docs/images/agent-composer-1.png differdiff --git a/docs/images/agent-library-1.png b/docs/images/agent-library-1.pngnew file mode 100644index 000000000..6249f515cBinary files /dev/null and b/docs/images/agent-library-1.png differdiff --git a/docs/images/agent-library-with-composer-1.png b/docs/images/agent-library-with-composer-1.pngnew file mode 100644index 000000000..e2b108e7aBinary files /dev/null and b/docs/images/agent-library-with-composer-1.png differdiff --git a/docs/images/single-agent-1.png b/docs/images/single-agent-1.pngnew file mode 100644index 000000000..1f3526283Binary files /dev/null and b/docs/images/single-agent-1.png differdiff --git a/docs/ui-sdk/guides/agent-modes.mdx b/docs/ui-sdk/guides/agent-modes.mdxindex a9cdfdb30..d8aac90a0 100644--- a/docs/ui-sdk/guides/agent-modes.mdx+++ b/docs/ui-sdk/guides/agent-modes.mdx@@ -7,67 +7,47 @@ This can be configured by using the `agentConfig` object.```tstype AgentConfig =- | { mode: "SingleAgent"; name: string }+ | { mode: "SingleAgent"; name: string } //name is agent name| { mode: "AgentLibrary" }- | { mode: "AgentComposer"; defaultAgentSpec?: AgentSpec }- | { mode: "AgentLibraryWithComposer"; defaultAgentSpec?: AgentSpec };+ | { mode: "AgentComposer" } //Composer is agent creation flow+ | { mode: "AgentLibraryWithComposer" }; //Default mode```-The default is `{ mode: "AgentLibraryWithComposer" }`.-| Mode | Library | Composer | New chat || --- | --- | --- | --- |-| `SingleAgent` | — | — | yes |-| `AgentLibrary` | yes | — | no |-| `AgentComposer` | — | yes | yes |-| `AgentLibraryWithComposer (Default)` | yes | yes | yes |+| `SingleAgent` | — | — | Yes |+| `AgentLibrary` | Yes | — | No |+| `AgentComposer` | — | Yes | Yes |+| `AgentLibraryWithComposer (Default)` | Yes | Yes | Yes |## Single Agent-Pins the UI to one named agent. All selection controls are hidden and the user cannot switch agents or open the composer.+All chats are done with one named agent which can be configured in `name` param. All selection controls are hidden and the user cannot switch agents or open the composer.<Frame>- + </Frame>-<AccordionGroup>- <Accordion title="SingleAgent">- Pins the UI to one named agent. All selection controls are hidden and the user cannot switch agents or open the composer.- </Accordion>-- <Accordion title="AgentLibrary">- Users pick from agents your `searchAgents` implementation returns, but cannot author a new one. Note that "new chat" is disabled in this mode only.-- <Frame caption="The Agents Library: users pick from the agents your `searchAgents` returns.">- - </Frame>- </Accordion>+## AgentComposer- <Accordion title="AgentComposer">- Users assemble an ad-hoc agent — model, skills, MCP servers — without browsing a library, and can save it back to the library.+Users compose/create a new agent by selecting models, skills, MCP servers and can save it to the library.- <Frame caption="Composing an agent — pick a model, add connectors and skills, then save it to the library.">- <div style={{ position: "relative", boxSizing: "content-box", width: "100%", aspectRatio: "1.46", padding: "40px 0" }}>- <iframe src="https://app.supademo.com/embed/cmsk13xio00k81p0j1wj6amj6?embed_v=2&utm_source=embed" loading="lazy" title="Compose an agent in TrueForge" allow="clipboard-write" allowFullScreen style={{ position: "absolute", top: 0, left: 0, width: "100%", height: "100%", border: 0 }} />-</div>- </Frame>- </Accordion>+<Frame>+ +</Frame>- <Accordion title="AgentLibraryWithComposer">- Both surfaces, and the default. Users can pick an existing agent or author a new one.- </Accordion>-</AccordionGroup>+## AgentLibrary-## Gotchas+Users chat with agents already saved in your library but cannot compose a new one. Note that “new chat” is disabled in this mode only. Ideally for restricting agent creation by users.-<Warning>- `defaultAgentSpec` seeds a new draft rather than binding to the current one. Changing it does not alter the conversation on screen, and it does not apply on **clear chat** either — that path deliberately preserves the spec already bound to the draft. The new value is picked up when a **new chat** starts. To apply it immediately, remount the component with a new `key`. It is ignored entirely in `SingleAgent` mode.-</Warning>+<Frame>+ +</Frame>-<Warning>- Always pass an explicit `defaultAgentSpec` in composer modes. Omitting it falls back to `{ model: { name: "openai-main/gpt-4.1" } }`, and requests fail if your backend does not expose a model under that exact name.-</Warning>+## AgentLibraryWithComposer-## Settings+Users can pick an existing agent from the library or create a new one.-The settings panel appears only when your server exposes a `catalog`. Without one it is silently absent — there is no error, so an unexpectedly missing settings button usually means the catalog is not attached. Note that `useCatalogServer()` throws when there is no catalog; use `useOptionalCatalogServer()` in code that must tolerate its absence.\ No newline at end of file+<Frame>+ +</Frame>diff --git a/docs/ui-sdk/guides/layouts-and-theme.mdx b/docs/ui-sdk/guides/layouts-and-theme.mdxindex da436db30..ae6161f4d 100644--- a/docs/ui-sdk/guides/layouts-and-theme.mdx+++ b/docs/ui-sdk/guides/layouts-and-theme.mdx@@ -106,9 +106,9 @@ The `chatgpt`, `claude`, and `gemini` presets (the default is `truefoundry`):## Light and dark mode-Skip means defaults to system theme. User can choose via UI.+When you skip this key then the SDK defaults to system theme. User will get an option to switch to dark or light theme via UI.-Pass to set a theme to light, dark or system. User CANNOT update it. This is useful when you want to control the theme based on the main/top level app theme.+If you want to control the theme based on the app level theme then pass a value to set a theme to light, dark or system to match the main app theme. Please note, user does not get an option to update it via UI.<Frame caption="Dark mode applied to the chat UI.">@@ -116,6 +116,8 @@ Pass to set a theme to light, dark or system. User CANNOT update it. This is use### Set separate logo for light and dark theme+You can also provide different logos for dark and light mode as shown below:+```tsx App.tsx<TrueforgeUI...