Concepts

KDCube AI App is a self-hosted, multi-tenant platform and SDK for building AI assistants and agentic applications. The platform has two core services: Ingress (API gateway, auth, SSE emitter) and Processor/Proc (bundle execution, queue worker, integrations API).

System at a Glance

System architecture overview diagram
System Architecture Overview Platform architecture showing Ingress and Processor services with client, bundle, and storage interactions User Browser / App SSE + REST SSE/WS REST /bundles/{t}/{p}/{b}/operations/{op} Ingress Auth & Rate Limit Bundle Routing SSE Emitter Task Enqueueing enqueue Redis Queue Task Buffer dequeue Processor (proc) Bundle Loader LangGraph Exec Communicator (async) Operations API (REST) GET/POST /bundles/{t}/{p}/{b}/operations/{op} invoke chat·steer·ops YOUR BUNDLE Entrypoint Workflow Tools Skills ReAct Agent Widgets / UI Storage · Config · Economics Communicator Firewall Settings spawns ISO Runtime (Docker / Fargate) Supervisor (networked) All bundle tools network · secrets Communicator → Redis Pub/Sub → SSE (same path as proc) ↔ Unix socket Executor (no network) LLM-gen code tool_call() → Unix socket ✗ no network ✗ no secrets SSE stream Communicator (async streaming → client) PostgreSQL Conversations Redis Props / Cache S3 / Local FS Artifacts / Files Platform-managed persistence layer

Key Terms

TermDescription
BundlePython package registered with @agentic_workflow. The unit of AI application deployment — contains agent logic, tools, skills, and UI widgets.
IngressAPI gateway service: auth, SSE streaming, task enqueueing, rate limiting. Handles all inbound traffic before the bundle sees it.
Processor / ProcQueue worker: executes bundles, hosts the Operations REST API. Loads bundle singletons and calls execute_core() per turn.
TimelineRolling cross-conversation context persisted as artifact:conv.timeline.v1. Ordered blocks (oldest → newest) streamed as SSE events. Grows across turns; compacted when context budget is reached. The turn log is the per-turn portion appended each turn.
ReAct AgentAutonomous loop (ReactStateV2, max 15 iterations by default). Plan is a tool — not a separate component. No coordinator needed.
Tenant / ProjectMulti-tenancy units. All data, config, bundles, and budgets are scoped to tenant + project. Each tenant gets an isolated schema in PostgreSQL.

Supported Providers

🔌
Transports: SSE · Socket.IO · REST  |  LLMs: OpenAI · Anthropic · Gemini · OpenRouter  |  Search: Brave · DuckDuckGo  |  Auth: Cognito · SimpleIDP · Delegated