This repository contains both React and Angular implementations of a LangGraph chatbot UI, allowing for direct comparison and reuse of core functionality between the two frameworks.
agent-chat-ui-react/
├── react-reference/ # Official React implementation (submodule)
├── angular-chat-ui/ # Angular implementation
├── LICENSE
├── package-lock.json
└── README.md
The react-reference/ directory contains the official LangGraph Agent Chat UI implementation cloned as a git submodule from:
- Repository: https://github.com/srcJin/agent-chat-ui-angular-react-widget.git
- Framework: Next.js 15 with React 19
- Features:
- Real-time streaming chat interface
- LangGraph SDK integration
- Tailwind CSS styling
- File upload support
- Artifact rendering
- Thread management
The angular-chat-ui/ directory contains a fully functional Angular port of the React implementation:
- Framework: Angular 19 with Signal-based architecture
- Styling: SCSS with modern CSS custom properties
- Type Safety: Full TypeScript support
- Reactive State: Angular signals for reactive state management
- Core Functionality:
- Setup form for LangGraph server configuration
- Real-time chat interface
- Message rendering (human/AI/tool)
- Thread management
- Error handling and loading states
- Tool Call Display: Rich UI for LangGraph tool interactions
- Formatted tool call arguments with JSON support
- Expandable tool result display
- Table view for structured data
- Hide/show tool calls toggle
| Feature | React Implementation | Angular Implementation |
|---|---|---|
| State Management | React Context + hooks | Injectable services + signals |
| Component Communication | Props + callbacks | @Input/@Output + services |
| Reactive Updates | useState + useEffect | signal() + computed() |
| HTTP Client | fetch + LangGraph SDK | Custom fetch wrapper |
| Styling | Tailwind CSS | SCSS with CSS variables |
| Build Tool | Next.js | Angular CLI |
- LanggraphClientService: Handles API communication with LangGraph servers
- StreamService: Manages real-time streaming connections using signals
- ThreadService: Manages chat threads and conversation history
- SetupFormComponent: Configuration form for API credentials
- ThreadComponent: Main chat interface with message history
- MessageComponent: Individual message rendering
- ToolCallsComponent: Display tool calls with formatted arguments
- ToolResultComponent: Show tool results with JSON parsing and expand/collapse
- ToolCallTableComponent: Compact table view for tool call arguments
cd react-reference
pnpm install
pnpm devcd angular-chat-ui
npm install
npm startBoth implementations support the same configuration options:
- Deployment URL: Your LangGraph server URL (e.g.,
http://localhost:2024) - Assistant/Graph ID: The ID of your graph or assistant (e.g.,
agent) - LangSmith API Key: Required for production deployments (optional for local)
This repository demonstrates how to migrate a React application to Angular while:
- Preserving Core Functionality: All essential features are maintained
- Following Framework Best Practices: Each implementation uses framework-specific patterns
- Maintaining Type Safety: Full TypeScript support in both versions
- Enabling Code Reuse: Similar component structure for easy comparison
- Build:
pnpm build - Lint:
pnpm lint - Format:
pnpm format
- Build:
npm run build - Test:
npm test - Lint:
npm run lint
Feel free to contribute improvements to either implementation. The dual implementation approach makes it easy to:
- Compare framework-specific approaches
- Test new features in both environments
- Learn migration patterns between React and Angular
This project is licensed under the MIT License - see the LICENSE file for details.