Apple Human Interface Guidelines
Apple's platform design guidance: foundations, patterns, components, inputs, technologies.
Sourcedeveloper.apple.com/design/human-interface-guidelines
Agent Academy is a free, source-linked library of skills, prompts, MCP servers and bot templates, organised into courses by profession, for people who hand real work to AI agents: 1,467 live resources, each with its original link, license and safety tags.
Style library
Original text · 简体中文智能体聊天界面
https://github.com/langchain-ai/agent-chat-ui
Republished in full under its license, with attribution. The source is authoritative.
Agent Chat UI is a Next.js application which enables chatting with any LangGraph server with a messages key through a chat interface.
> [!NOTE]
> 🎥 Watch the video setup guide here.
> [!TIP]
> Don't want to run the app locally? Use the deployed site here: agentchat.vercel.app!
First, clone the repository, or run the npx command:
npx create-agent-chat-app
or
git clone https://github.com/langchain-ai/agent-chat-ui.git
cd agent-chat-ui
Install dependencies:
pnpm install
Run the app:
pnpm dev
The app will be available at http://localhost:3000.
Once the app is running (or if using the deployed site), you'll be prompted to enter:
langsmith-api-key.After entering these values, click Continue. You'll then be redirected to a chat interface where you can start chatting with your LangGraph server.
You can bypass the initial setup form by setting the following environment variables:
NEXT_PUBLIC_API_URL=http://localhost:2024
NEXT_PUBLIC_ASSISTANT_ID=agent
NEXT_PUBLIC_AUTH_SCHEME=
> [!NOTE]
> If you are connecting to a LangSmith Agent Builder deployment, set NEXT_PUBLIC_AUTH_SCHEME=langsmith-api-key.
> [!TIP]
> If you want to connect to a production LangGraph server, read the [Going to Production](#going-to-production) section.
To use these variables:
.env.example file to a new file named .env.env fileWhen these environment variables are set, the application will use them instead of showing the setup form.
You can control the visibility of messages within the Agent Chat UI in two main ways:
1. Prevent Live Streaming:
To stop messages from being displayed _as they stream_ from an LLM call, add the langsmith:nostream tag to the chat model's configuration. The UI normally uses on_chat_model_stream events to render streaming messages; this tag prevents those events from being emitted for the tagged model.
_Python Example:_
from langchain_anthropic import ChatAnthropic
# Add tags via the .with_config method
model = ChatAnthropic().with_config(
config={"tags": ["langsmith:nostream"]}
)
_TypeScript Example:_
import { ChatAnthropic } from "@langchain/anthropic";
const model = new ChatAnthropic()
// Add tags via the .withConfig method
.withConfig({ tags: ["langsmith:nostream"] });
Note: Even if streaming is hidden this way, the message will still appear after the LLM call completes if it's saved to the graph's state without further modification.
2. Hide Messages Permanently:
To ensure a message is _never_ displayed in the chat UI (neither during streaming nor after being saved to state), prefix its id field with do-not-render- _before_ adding it to the graph's state, along with adding the langsmith:do-not-render tag to the chat model's configuration. The UI explicitly filters out any message whose id starts with this prefix.
_Python Example:_
result = model.invoke([messages])
# Prefix the ID before saving to state
result.id = f"do-not-render-{result.id}"
return {"messages": [result]}
_TypeScript Example:_
const result = await model.invoke([messages]);
// Prefix the ID before saving to state
result.id = `do-not-render-${result.id}`;
return { messages: [result] };
This approach guarantees the message remains completely hidden from the user interface.
The Agent Chat UI supports rendering artifacts in the chat. Artifacts are rendered in a side panel to the right of the chat. To render an artifact, you can obtain the artifact context from the thread.meta.artifact field. Here's a sample utility hook for obtaining the artifact context:
export function useArtifact<TContext = Record<string, unknown>>() {
type Component = (props: {
children: React.ReactNode;
title?: React.ReactNode;
}) => React.ReactNode;
type Context = TContext | undefined;
type Bag = {
open: boolean;
setOpen: (value: boolean | ((prev: boolean) => boolean)) => void;
context: Context;
setContext: (value: Context | ((prev: Context) => Context)) => void;
};
const thread = useStreamContext<
{ messages: Message[]; ui: UIMessage[] },
{ MetaType: { artifact: [Component, Bag] } }
>();
return thread.meta?.artifact;
}
After which you can render additional content using the Artifact component from the useArtifact hook:
import { useArtifact } from "../utils/use-artifact";
import { LoaderIcon } from "lucide-react";
export function Writer(props: {
title?: string;
content?: string;
description?: string;
}) {
const [Artifact, { open, setOpen }] = useArtifact();
return (
<>
setOpen(!open)}
className="cursor-pointer rounded-lg border p-4"
>
{props.title}
{props.description}
{props.content}
</>
);
}
Once you're ready to go to production, you'll need to update how you connect, and authenticate requests to your deployment. By default, the Agent Chat UI is setup for local development, and connects to your LangGraph server directly from the client. This is not possible if you want to go to production, because it requires every user to have their own LangSmith API key, and set the LangGraph configuration themselves.
To productionize the Agent Chat UI, you'll need to pick one of two ways to authenticate requests to your LangGraph server. Below, I'll outline the two options:
The quickest way to productionize the Agent Chat UI is to use the API Passthrough package (NPM link here). This package provides a simple way to proxy requests to your LangGraph server, attaching your LangSmith API key on the server so your users never need one. It does not authenticate the callers of that proxy for you — see [Authenticating the API Passthrough](#authenticating-the-api-passthrough) below, which you should set up before deploying.
This repository already contains the proxy route itself. The only configuration you need to do is set the proper environment variables.
NEXT_PUBLIC_ASSISTANT_ID="agent"
# This should be the deployment URL of your LangGraph server
LANGGRAPH_API_URL="https://my-agent.default.us.langgraph.app"
# This should be the URL of your website + "/api". This is how you connect to the API proxy
NEXT_PUBLIC_API_URL="https://my-website.com/api"
# Your LangSmith API key which is injected into requests inside the API proxy
LANGSMITH_API_KEY="lsv2_..."
Let's cover what each of these environment variables does:
NEXT_PUBLIC_ASSISTANT_ID: The ID of the assistant you want to use when fetching, and submitting runs via the chat interface. This still needs the NEXT_PUBLIC_ prefix, since it's not a secret, and we use it on the client when submitting requests.LANGGRAPH_API_URL: The URL of your LangGraph server. This should be the production deployment URL.NEXT_PUBLIC_API_URL: The URL of your website + /api. This is how you connect to the API proxy. For the Agent Chat demo, this would be set as https://agentchat.vercel.app/api. You should set this to whatever your production URL is.LANGSMITH_API_KEY: Your LangSmith API key to use when authenticating requests sent to LangGraph servers. Once again, do _not_ prefix this with NEXT_PUBLIC_ since it's a secret, and is only used on the server when the API proxy injects it into the request to your deployed LangGraph server.For in depth documentation, consult the LangGraph Next.js API Passthrough docs.
> [!WARNING]
> The API passthrough does not authenticate your callers. If you deploy this repository with LANGGRAPH_API_URL and LANGSMITH_API_KEY set and no gate of your own, anyone who reaches your deployment URL can read, overwrite, and delete every thread and store item in your LangGraph deployment, and start runs billed to your LangSmith account.
Before you deploy, set up [custom authentication](#advanced-setup---custom-authentication) on your LangGraph deployment and delete src/app/api/[..._path]/route.ts, so your LangSmith key never sits behind a public route.
Custom authentication in your LangGraph deployment is an advanced, and more robust way of authenticating requests to your LangGraph server. Using custom authentication, you can allow requests to be made from the client, without the need for a LangSmith API key. Additionally, you can specify custom access controls on requests.
To set this up in your LangGraph deployment, please read the LangGraph custom authentication docs for Python, and TypeScript here.
Once you've set it up on your deployment, you should make the following changes to the Agent Chat UI:
NEXT_PUBLIC_API_URL environment variable to your production LangGraph deployment URL.NEXT_PUBLIC_ASSISTANT_ID environment variable to the ID of the assistant you want to use when fetching, and submitting runs via the chat interface.useTypedStream](src/providers/Stream.tsx) (extension of useStream) hook to pass your authentication token through headers to the LangGraph server:const streamValue = useTypedStream({
apiUrl: process.env.NEXT_PUBLIC_API_URL,
assistantId: process.env.NEXT_PUBLIC_ASSISTANT_ID,
// ... other fields
defaultHeaders: {
Authentication: `Bearer ${addYourTokenHere}`, // this is where you would pass your authentication token
},
});
Apple's platform design guidance: foundations, patterns, components, inputs, technologies.
Sourcedeveloper.apple.com/design/human-interface-guidelines
Curated multilingual directory of ~2,391 public UI resources with visual-style (vs) facets, design KB (specs, skills), JSON endpoints and a recommended design-skill workflow.
Sourcesiinxu.github.io/ui-resource-hub/llms.txt
Workflow: pick ONE direction skill (frontend-design or taste-skill) → search resources by style/kind → build with emil-design-eng → audit with impeccable + web-design-guidelines + accessibility → verify in browser light+dark, mobile.
Sourcesiinxu.github.io/ui-resource-hub/api/skills.json
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Sourcegithub.com/anthropics/skills/blob/main/skills/algorithmic-art/SKILL.md
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Sourcegithub.com/anthropics/skills/blob/main/skills/canvas-design/SKILL.md
A Streamlit application that provides comprehensive design analysis using a team of specialized AI agents powered by Google's Gemini model.
Sourcegithub.com/Shubhamsaboo/awesome-llm-apps/tree/main/advanced_ai_agents/multi_agent_apps/agent_teams/multimodal_design_agent_team