Files
langgraphjs/examples/ai-elements
github-actions[bot] e6082e0575 chore: version packages (#2554)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @langchain/langgraph@1.4.4

### Patch Changes

- [#2552](https://github.com/langchain-ai/langgraphjs/pull/2552)
[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(langgraph): isolate concurrent singleton-agent invocations by thread

`ensureLangGraphConfig` ignores the ambient `AsyncLocalStorage`
`configurable`
on root-level invokes that supply an invoke-time `thread_id` and have no
nesting
keys (ignoring graph-bound `.withConfig()` defaults). On a fresh
top-level run
the ambient `configurable` can belong to another concurrent invocation,
so its
    keys — internal scratchpad/task-input as well as user keys like
`tenant_id`/`user_id` — must not leak in; values the caller wants arrive
through
the explicit (bound + invoke-time) configs. Ambient nesting
(`__pregel_read__`)
and bound child graphs invoked from parent tasks are unaffected. This
prevents
cross-invocation leakage between concurrent `invoke()` calls on a shared
compiled
graph (e.g. BullMQ workers with `concurrency > 1`). Complements the
config-merge
fix that stopped shared graph-bound `metadata`/`configurable` objects
from being
    mutated across invocations
    ([#2040](https://github.com/langchain-ai/langgraphjs/issues/2040)).

- [#2553](https://github.com/langchain-ai/langgraphjs/pull/2553)
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(langgraph): recognize JSON-erased `Overwrite` values across runtimes

`Overwrite` already survives JSON serialization in JS because
`Overwrite.toJSON()`
emits the canonical `{ "__overwrite__": value }` sentinel.
`_getOverwriteValue`
now additionally recognizes the discriminator form `{ "type":
"__overwrite__",
value }` produced when a typed `Overwrite` from another runtime (e.g. a
Python
dataclass routed through the LangGraph API server) is serialized and its
type is
erased. This keeps `Overwrite` (and `DeltaChannel`) semantics intact
across
cross-runtime JSON boundaries. These delta-channel APIs remain Beta.

## @example/ai-elements@0.1.40

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

## @examples/assistant-ui-claude@0.1.40

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

## @examples/ui-angular@0.0.50

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

## @examples/ui-multimodal@0.0.26

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

## @examples/ui-react@0.0.26

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

## langgraph@1.0.44

### Patch Changes

- Updated dependencies
\[[`d662cbb`](https://github.com/langchain-ai/langgraphjs/commit/d662cbbc63eebdf1312e57d41908da1b9018e783),
[`1c2aa5b`](https://github.com/langchain-ai/langgraphjs/commit/1c2aa5bfeacd8b7463e3d5b6010daee26e9217e0)]:
    -   @langchain/langgraph@1.4.4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-17 16:41:40 -07:00
..
2026-06-17 16:41:40 -07:00
2026-06-17 16:41:40 -07:00

AI Elements — Tool-Calling Agent Example

A self-contained chat interface built with AI Elements components and @langchain/react. It demonstrates how to build a production-quality agentic UI using AI Elements' composable component library.

What it shows

  • Tool call rendering — each tool invocation is displayed with Tool + ToolHeader + ToolContent + ToolInput + ToolOutput, updating live as the agent streams tool input and then the result.
  • Reasoning display — when the model emits reasoning tokens, a collapsible Reasoning block auto-opens during streaming and collapses when done.
  • Streaming messagesMessage + MessageContent + MessageResponse renders streaming markdown via Streamdown with full GFM support.
  • Loading skeleton — a Shimmer placeholder appears between the user's message and the first assistant token.
  • Conversation scrollConversation + ConversationContent + ConversationScrollButton auto-scrolls and shows a jump-to-bottom button when you scroll up.
  • Message actionsMessageActions + MessageAction with a copy button appears below the last assistant message once streaming completes.
  • Prompt inputPromptInput + PromptInputBody + PromptInputTextarea + PromptInputFooter + PromptInputSubmit provides a full-featured input bar.
  • SuggestionsSuggestions + Suggestion shows preset prompts before the first message.

Agent

The backing LangGraph agent (packages/agents/src/agents/ai-elements.ts) is a createReactAgent with two simulated tools:

Tool Description
get_weather Returns deterministic simulated weather data for any city
web_search Returns three simulated search result objects for any query

No external API keys are required for the tools.

Setup

Create a .env file in this folder (optional — defaults are provided):

VITE_LANGGRAPH_API_URL=http://localhost:2024   # default when running locally
VITE_LANGGRAPH_ASSISTANT_ID=ai_elements         # matches langgraph.json

Run

Start the LangGraph agent server first:

bun run dev --filter=@langchain/playground-agents

Then start this preview app:

bun run dev --filter=@langchain/playground-preview-ai-elements

Open http://localhost:4600.

AI Elements components used

Component Source file
Conversation, ConversationContent, ConversationScrollButton src/components/ai-elements/conversation.tsx
Message, MessageContent, MessageResponse, MessageActions, MessageAction src/components/ai-elements/message.tsx
PromptInput, PromptInputBody, PromptInputTextarea, PromptInputFooter, PromptInputSubmit src/components/ai-elements/prompt-input.tsx
Tool, ToolHeader, ToolContent, ToolInput, ToolOutput src/components/ai-elements/tool.tsx
Reasoning, ReasoningTrigger, ReasoningContent src/components/ai-elements/reasoning.tsx
Suggestions, Suggestion src/components/ai-elements/suggestion.tsx
Shimmer src/components/ai-elements/shimmer.tsx

Components live in src/components/ai-elements/ and are owned by this package (shadcn/AI Elements registry style — copy-paste, not a node_modules import).

Vite path alias

AI Elements components use bare src/ imports (e.g. import { cn } from "src/lib/utils"). The vite.config.ts maps src./src to resolve these correctly in both dev and production builds.