Feature Request: Complete Integration Guide for Embedding DB-GPT into External Systems (Frontend, API, SSO, RBAC, WebSocket, Plugins)
Search before asking
- I had searched in the issues and found no similar feature requirement.
Description
Hello,
Our team is evaluating options for integrating DB-GPT into an existing business system. During implementation, we found that the official documentation lacks systematic guidance on integrating DB-GPT with external systems, which increases the cost and complexity of integration. Below are the main challenges we encountered and the features we hope to see.
Current Status and Problems
- No official recommendation for frontend embedding We would like to embed the DB-GPT chat interface directly into our existing frontend application by inserting a small piece of JavaScript code or an iframe, similar to products like Sqlbot. However, the current documentation does not clearly explain:
Which frontend embedding methods are supported (iframe, SDK, Web Component, etc.)?
How to securely pass authentication information (e.g., temporary token, postMessage)?
How to configure browser security policies such as CORS, CSP, and X-Frame-Options?
How to customize the style and size of the chat interface to match the host system?
- API access documentation is scattered In addition to frontend embedding, we also want to call DB-GPT capabilities through backend APIs. Although the documentation provides OpenAI-compatible APIs and REST APIs, there is no complete integration guide covering:
How to create sessions, send messages, and receive streaming responses via API?
How to manage knowledge bases, database connections, agents, and other resources?
Are there official SDKs (e.g., Python/Java/JavaScript) that encapsulate common operations?
How to handle API errors, retries, and timeouts?
- Single sign-on (SSO) and authentication integration Our existing system already has its own user system and login state. We want users to access DB-GPT without a second login. Although the documentation mentions JWT and OAuth2, it lacks specific integration steps and examples, such as:
How to configure DB-GPT to trust externally issued JWTs?
How to connect to common enterprise authentication platforms (LDAP, OAuth2, SAML, etc.)?
Is it possible to dynamically create users and bind permissions via API?
How to automatically map roles and permissions when a user logs in for the first time?
- User permission and data isolation After integration, we need user-level or department-level data isolation, where different users can only access authorized knowledge bases, databases, and agents. The documentation on permission management is fragmented:
How to assign access permissions to a user or user group for a specific knowledge base?
Is role-based access control (RBAC) supported?
What REST APIs are available for permission management? What are the request and response formats?
How to synchronize user roles and data permissions from an external system to DB-GPT in real time or periodically?
- WebSocket and real-time communication For scenarios requiring real-time interaction (e.g., streaming output, task progress updates), the documentation includes some WebSocket notes but lacks examples for integration with external systems:
How to establish a WebSocket connection in a third-party frontend and receive streaming data?
How to handle disconnection, reconnection, heartbeat, and message serialization?
Is it possible to subscribe to events such as task status changes?
- Plugin and custom extension If deep integration is needed (e.g., custom tools, data source connectors, authentication plugins), the development guides are minimal:
How to develop a custom tool and register it with an agent?
How to develop a custom data source connector?
How to extend the authentication backend to integrate with enterprise SSO?
Expected Features Provide an official JS SDK or embed script Similar to Sqlbot, only a
Source: eosphoros-ai/DB-GPT