executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
apis-client-and-sandboxOperate DB-GPT 0.8.1 through its Python client, HTTP service APIs, application routes, file and app workflows, and explicitly bounded sandbox runtimes.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route when a task names dbgpt-client, dbgpt_serve, dbgpt-app HTTP/OpenAPI, datasource or knowledge CRUD, AWEL flow service calls, app/skill/file uploads, model service endpoints, or dbgpt-sandbox. It is the integration boundary: it teaches request construction, service composition, response/error interpretation, and safe execution boundaries. It does not replace the data/RAG, agent/AWEL, or model-provider routes.
Establish these before making a request or executing code:
dbgpt-serve, or standalone sandbox API.http://localhost:5670/api/v2; do not give it only a host or a URL ending at /api unless the operation is intentionally raw HTTP.DBGPT_API_KEY or an explicitly supplied key only when the server is configured with API keys. Never place a real key in a script, fixture, log, or prompt. The client sends Authorization: Bearer <key> when a key is present./docs or OpenAPI description to confirm the exact mounted prefix and request shape. A safe health or test-auth request is optional and still counts as a live request.Client uses httpx.AsyncClient; use await client.aclose() in a finally block. Treat stream iterators as one-shot and consume data: [DONE] for OpenAI-style SSE.Result envelope with a success flag and data, while some failures are HTTP 400/401/404/5xx. Do not call a response successful merely because JSON parsed.Result), service failure (5xx), connection/timeout, and missing optional backend. See the troubleshooting reference.0.0.0.0 and port 5670; the standard API base is http://localhost:5670/api/v2.Client(api_base=None, api_key=None, version="v2", timeout=120) reads DBGPT_API_BASE and DBGPT_API_KEY. The URL must have a scheme and network location. A timeout of None creates an unlimited httpx timeout and should be used only deliberately./serve for its generic service methods. Thus client.get("/datasources") targets <api_base>/serve/datasources, and post_param sends query parameters rather than a JSON body.dbgpt_client.datasource, dbgpt_client.knowledge, dbgpt_client.flow, and dbgpt_client.app; only Client and ClientException are exported from the package root.model and messages. chat_mode is normally chat_normal; specialized modes require chat_param: chat_app, chat_flow, chat_knowledge, chat_data, chat_with_db_qa, and chat_dashboard. Non-streaming app chat is rejected by the v2 route. Flow and app chat normally stream./api; v2 chat is /api/v2/chat/completions. Stable service routes are mounted under /api/v2/serve/...; a few compatibility v1 routes remain and are not automatically compatible with v2.dbgpt-serve components are registered into one FastAPI application. A health response indicates a route is alive, not that its datasource, model, vector store, file backend, or sandbox dependency is healthy.data-and-rag.agents-and-awel; this route only covers calling a persisted flow or app over an API.models-and-serving.network_disabled setting is not host-network isolation in LocalRuntime.For a client/API change, validate without a live service where possible:
inspect.signature and imports resolve for Client, ClientException, the target schema, and the target helper.Result, malformed response, 401/404/409, and a transport/timeout failure.data: JSON events and stop at [DONE]; non-200 streams are failures, not assistant content.For a sandbox change, validate safely:
RuntimeFactory.create() fails closed with container detection disabled and local opt-in absent.local fails unless both local opt-in controls were enabled before module initialization; an opted-in local factory reports LocalRuntime.The bundled sandbox_cli_wrapper.py validates request payloads and policy-shaped code locally. It never starts a server or executes the supplied code.
Use the symptom-driven matrix in troubleshooting.md. Preserve the original HTTP status, response body (with secrets redacted), request path, operation ID, and whether the failure occurred before or after the service boundary. Do not retry destructive create/delete or upload operations blindly; check idempotency and current resource state first.