This project is a fork of Agent Chat UI by LangChain. It has been customized for AOSTOCK's financial analysis and trading assistant applications.
AOSTOCK Agent Chat UI is a Next.js application that provides a chat interface for interacting with LangGraph-based AI agents. It's specifically configured to work with AOSTOCK's financial analysis services and trading assistants.
- Financial Data Integration: Pre-configured to connect to AOSTOCK's financial data APIs
- Specialized Assistants: Custom AI assistants for financial analysis, trading, and investment research
- Enhanced UI Components: Tailored interface for displaying financial data, charts, and analysis results
- Multi-Model Support: Configurable intent recognition and analysis models
First, clone the repository:
git clone https://github.com/aostock/agent-chat-ui
cd agent-chat-uiInstall dependencies:
pnpm installRun the app:
pnpm devThe app will be available at http://localhost:3000.
The application comes pre-configured with AOSTOCK's default settings:
- Server API URL:
https://agent.aostock.com - Assistant ID:
agent - Financial Data API:
https://data.aostock.com
You can override these settings through the UI or by setting environment variables:
NEXT_PUBLIC_API_URL=https://agent.aostock.com
NEXT_PUBLIC_ASSISTANT_ID=agentThis application includes several specialized financial assistants:
- Portfolio Manager: For portfolio analysis and optimization
- Risk Manager: For risk assessment and management
- Trading Assistant: For trading strategy execution
- Valuation Expert: For company valuation and analysis
- Technical Analyst: For technical analysis of market data
- Fundamental Analyst: For fundamental analysis of stocks
- Sentiment Analyzer: For market sentiment analysis
Each assistant is represented by a custom icon and is optimized for specific financial tasks.
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm lint:fix- Run ESLint and fix issuespnpm format- Format code with Prettierpnpm format:check- Check code formatting
src/app/- Next.js app directorysrc/components/- React componentssrc/providers/- React context providerssrc/hooks/- Custom React hookssrc/lib/- Utility functionspublic/images/assistants/- Custom assistant icons
To deploy to production:
-
Update the environment variables in your deployment platform:
NEXT_PUBLIC_API_URL=https://agent.aostock.com NEXT_PUBLIC_ASSISTANT_ID=agent
-
Build and deploy the application:
pnpm build
To add new assistants:
- Add a new icon to
public/images/assistants/ - Update the assistant configuration in the settings
- Configure the corresponding backend LangGraph agent
The application supports configuring different models for:
- Intent Recognition: For understanding user queries
- Analysis: For deep financial analysis
These can be configured in the settings dialog or through environment variables.
This project is based on the Agent Chat UI by LangChain, which provides a foundation for building chat interfaces for LangGraph applications.
For more information on LangGraph and LangChain, check out the LangChain documentation.
