KDCube is a self-hosted platform and SDK for building customer-facing AI apps as bundles.
A bundle is an application slice, not just a prompt or an agent wrapper. One bundle can combine:
- Python backend logic
- authenticated and public APIs
- widgets and a full custom UI
- React v2, Claude Code, and/or custom agents
- tools, skills, MCP, storage, props, and secrets
- scheduled jobs with
@cron(...) - dependency-isolated helpers with
@venv(...) - optional Node or TypeScript backend logic behind a Python bridge
KDCube gives you the runtime, streaming, isolation, memory, operations, and deployment model so you can ship real AI products, not just local agent demos.
- Build one bundle as a complete app slice: backend, APIs, streaming UX, widgets, and storage.
- Compose the right brains for each job: React v2, Claude Code, custom agents, tools, or isolated exec.
- Ship on a production runtime with multi-tenant isolation, backpressure, rate limits, economics, and observability.
- Keep provenance and recoverability: timelines, source pools, citations, artifacts, and rehydration.
- Prototype locally, then move to ECS and other hosted deployments without rewriting the app model.
The main unit in KDCube is a bundle.
A bundle can expose:
- chat behavior through
@on_message - authenticated APIs through
@api(route="operations") - anonymous or externally authenticated APIs through
@api(route="public") - widgets through
@ui_widget(...) - a full custom main UI through
@ui_main - scheduled logic through
@cron(...)
Typical bundle structure:
my.bundle@1-0/
entrypoint.py
orchestrator/
workflow.py
tools_descriptor.py
skills_descriptor.py
tools/
skills/
ui/
ui-src/
resources/
tests/
requirements.txt
backend_bridge/
Python remains the KDCube-native shell. If you need selected backend logic in Node or TypeScript, keep the KDCube surface in Python and place the external backend behind a narrow bridge.
Install the bootstrap CLI and launch the setup wizard:
pipx install kdcube-cli
kdcubeAlternative:
pip install kdcube-cli
kdcubekdcube-setup remains available as a compatibility alias, but kdcube is the canonical command.
Prerequisites:
- Python 3.9+
- Git
- Docker
Start here:
Read these in order:
- Bundle docs index
- Bundle reference:
versatile - Bundle developer guide
- Bundle runtime
- Bundle platform integration
- Bundle props and secrets
Primary reference bundle:
Specialized examples:
kdcube.copilot@2026-04-03-19-05for bundle-definedks:knowledge space and builder copilot behaviorwith-isoruntime@2026-02-16-14-00for direct isolated exec- Node/TS backend bridge reference
KDCube is not limited to one agent shape.
Inside one bundle you can use:
- React v2 for timeline-first orchestration, planning, ANNOUNCE, and tool-driven work
- Claude Code for workspace-scoped coding tasks with persistent session identity
- custom Python agents for domain-specific flows
- isolated exec for generated code and controlled execution
@venv(...)for dependency-heavy Python leaf helpers
Important: React v2 is not based on provider-native tool-calling protocol. The loop is controlled by the platform runtime, not by a model-specific tool-call format. That lets you use non-tool-calling models as the reasoning brain when they can follow the ReAct contract.
Read more:
- SSE / REST / Socket.IO chat transport
- channeled streaming and live widget updates
- bundle-owned widgets and full custom main-view UI
- session-aware relay and fan-out
- custom tools and MCP
- isolated Python execution
- optional Docker and Fargate execution paths
- bundle-scoped cached Python venvs for leaf work
- timeline-first React runtime
- source pools and citations
- attachments and generated artifacts
- artifact rehydration and logical references
- multi-tenant / multi-project isolation
- gateway controls, rate limits, and backpressure
- budgets, economics, and accounting
- metrics and autoscaling support
- role-aware filtering and bundle UI authorization
KDCube’s React v2 agent is timeline-first. Tool calls, artifacts, plans, ANNOUNCE state, and turn history become structured runtime data rather than ephemeral model chatter. That gives the platform:
- stable memory and re-read paths
- cache-aware pruning and
react.hide - plan tracking with
react.plan - source-backed provenance
- collaboration through timeline and ANNOUNCE contributions
Deep dives:
KDCube supports:
- local Docker Compose for development and small deployments
- EC2-style deployments
- ECS-based hosted deployments
The CLI supports:
- guided local setup
- descriptor-driven installs
- latest released builds
- upstream source builds
- local bundle prototyping and bundle reload flow
Read more:
Builder-oriented:
Platform-oriented:
If you want to build AI apps fast but still control runtime, tools, costs, deployment, and provenance, KDCube is aimed at that use case.
Project site:
