Quick Start
This tutorial is a detailed quick-deployment guide. Even if you’re not yet familiar with the components used in this project, you can still complete the deployment and start using it smoothly.
Prerequisites for Deployment:
- Git
sudoand GNUmake
Docker Quick Deployment:
- Clone the source code and enter the directory
- Install Docker and set image configuration (skip if Docker is already installed):
For TencentOS Server 4.4:
For Ubuntu Server 24.04:
- Copy the
.env.examplefile to the deploy folder
- Edit the configuration items in
deploy/default/.env
Based on your Tencent Cloud account and ADP platform information, fill in the following secrets and application keys:
⚠️ Note:
- The content of
APP_CONFIGSmust be JSON. Follow JSON rules, e.g., no trailing commas on the last item, and//comments are not supported.Comment: fill in anything helpful to locate the corresponding agent application.International: set tofalsefor Tencent Cloud Mainland China (default). If the agent app is developed on the International site, set this totrue.
- Build images
- Start containers
⚠️ Note: For production systems, you should apply for an SSL certificate under your own domain and deploy via HTTPS with reverse proxy such as Nginx. If you deploy over plain HTTP, some features (e.g., speech recognition, message copy, etc.) may not work properly.
- Log in
This system supports integration with your existing account system. Here we demonstrate the login method based on URL Redirect:
This command generates a login URL. Open it in your browser for a seamless login. For more details on URL redirect login, see Account Integration.
If you have configured an OAuth login method, open http://localhost:8000 in your browser to log in. For how to configure OAuth, see Account Integration.
- Troubleshooting
Account Integration:
1. OAuth Protocol Integration
We currently support GitHub OAuth and Microsoft Entra ID OAuth by default. Configure them in the deploy/default/.env file as needed:
GitHub OAuth:
Microsoft Entra ID OAuth:
If you want to customize authentication for other OAuth systems, modify server/core/oauth.py per the specific protocol for adaptation.
2. URL Redirect
If you already have your own account system but no standard OAuth—and prefer a simpler approach—you can integrate via URL redirect. The URL redirect integration includes the following three steps:
- Your existing account service: generate a URL pointing to this system, carrying
CustomerId,Name,ExtraInfo,Timestamp, and the signature. - User: the user clicks the URL to log in.
- This system: after verifying the signature, automatically creates/binds the account, generates a session, and redirects to the chat page.
Detailed parameters required for URL redirect:
| Parameter | Description |
|---|---|
| url | https://your-domain.com/account/customer?CustomerId=&Name=&Timestamp=&ExtraInfo=&Code= |
| CustomerId | The uid in your existing account system |
| Name | The username in your existing account system (optional) |
| Timestamp | Current timestamp |
| ExtraInfo | User information |
| Code | Signature, SHA256(HMAC(CUSTOMER_ACCOUNT_SECRET_KEY, CustomerId + Name + ExtraInfo + str(Timestamp))) |
📝 Note:
- Each parameter above needs
url_encode. For detailed implementation, refer toCoreAccount.customer_authinserver/core/account.py. For how to generate the URL, seegenerate_customer_account_urlinserver/main.py.- You need to set
CUSTOMER_ACCOUNT_SECRET_KEYin.env. It should be a random string, which you can generate withuuidgen.
Service:
To ensure features work properly, please enable/configure the following capabilities in the Tencent Cloud Console in advance:
- Conversation Title: Knowledge Engine Atomic Capability: Postpaid Settings, enable: Atomic Capability_DeepSeek API-V3 Postpaid
Hidden component (why enable this?): The conversation title summarization in the adp-chat-client chat UI calls the deepseek-V3 model and consumes tokens. For convenience, enable postpaid settings to avoid title issues.
- Voice Input: real-time communication, enable: RTC in the required regions.
Hidden component (why enable this?): The chat page of adp-chat-client supports voice input using Tencent Cloud ASR technology. You need to enable it to use voice input in the chat box.
- Application Permissions: ensure that the account corresponding to
TC_SECRET_ID/TC_SECRET_KEYconfigured in.envhas access to the added agent application(s). See: Platform-side User Permission.
Hidden component: possible issues you may encounter:
If the account corresponding to your TC_SECRET_ID / TC_SECRET_KEY does not have permission for the imported application, that agent app will display as “Unknown Application” on the chat page, affecting user experience.
FAQ
- Q:
python-dotenv could not parse ...A:APP_CONFIGSin.envis not valid single-line JSON (multi-line, trailing commas, or comments will cause errors). - Q: The page shows “Unknown Application.”
A: The current
TC_SECRET_ID/KEYlack permissions for the app. Grant permissions on the platform or switch to credentials that have them. - Q: Voice input is unavailable. A: Confirm that ASR is enabled; browsers need HTTPS to avoid policy restrictions.
- Q: OAuth callback error or 404.
A: Check whether the callback URL exactly equals
SERVICE_API_URL + /oauth/callback/..., and whether the third-party platform configuration matches.
Next Step:
Congratulations on successfully deploying adp-chat-client. Next, you can: See the development guide: read the Development Guide for tutorials on debugging the frontend and backend.