Keep source, config, and deploy files. Leave runtime data, uploads, and logs out of git. Co-authored-by: Cursor <cursoragent@cursor.com>
3.3 KiB
Kamidso Architecture v3 — Baseline
Status: Implementation baseline
Phase: Phase 1 — Agentic Data Foundation
Backend: Kamidso (product owner)
Product DB: MongoDB
Agent Runtime: DB-GPT (in-process engine)
Frontend: Existing Kamidso frontend + Agent Workspace capabilities
One-line definition
Kamidso owns Product, Data, Resources, and Orchestration; DB-GPT is an internal engine for Agent Planning, Tool Use, SQL/Python, Skills, AWEL, Knowledge, and Model Runtime.
Core invariants
- Kamidso is the system of record.
- DB-GPT is an execution engine, not the product authority.
- Frontend talks only to Kamidso API (
/api/kamidso/v1/*). - Engine IDs never become canonical product IDs.
- All resources belong to a workspace.
- Resources are authorized before engine invocation.
- Large raw datasets are never blindly placed in LLM context.
- Files are owned/stored by Kamidso.
- Datasource credentials are never exposed to frontend or LLM.
- SQL analysis is read-only by default.
- Engine-specific events are normalized before reaching frontend.
- Product contracts must not depend on DB-GPT internal schemas.
- DB-GPT core modifications remain minimal.
- Disabled future features must not leak into Phase 1 UX.
- Agent planning remains DB-GPT's responsibility in Phase 1; Kamidso orchestrates engines/resources, not tool-level reasoning.
Runtime topology
Kamidso Backend Process (kamidso serve)
├── FastAPI — /api/kamidso/v1/*
├── Orchestrator + Resource Registry
├── MongoDB (product SoT)
├── Object Storage (files/artifacts)
└── DB-GPT Runtime (in-process, internal)
Kamidso DB ≠ DB-GPT DB. DB-GPT may use its own internal metadata store; it is not the product source of truth.
Dependency direction
Kamidso API → Application → Domain/Resources → Engine Interfaces → DB-GPT Adapter → DB-GPT
Reverse imports (dbgpt → kamidso) are forbidden except documented KAMIDSO_PATCH blocks.
Phase 1 scope
Build: bootstrap, Mongo repos, auth/workspace, conversations/runs/events, files/storage, resources, DB-GPT engine adapter, skills/models, SSE streaming, frontend contract migration, security limits, golden benchmarks.
Do not build: Ontology, Metrics, RCA, Reports, Dashboards, Widgets, Radar product UI, second agent loop in Kamidso.
Primary milestone
Login → Upload Excel via Kamidso Files → Ask structured question with ResourceRef → DB-GPT Python analysis → Kamidso events → answer → browser refresh recovery.
Repository layout — preserve vs product
This repository holds the API and the engine (kamidso/, configs/, skills/, tests/kamidso/, docs/kamidso/). The web UI is the frontend repository.
Removed from the repo: web/, examples/, packages/dbgpt-*, and the upstream Docusaurus site.
Keep
| Path | Role |
|---|---|
docs/kamidso/ |
Product architecture and runbooks |
docker/ |
Mongo compose and the Walmart sample |
configs/ |
Engine + product TOML |
kamidso/ |
Product API and execution engine |
| frontend repository | Product UI |
skills/ |
Product + engine skills |
tests/kamidso/ |
Product tests |
See REPO_LAYOUT.md for the production tree.