KDCube
← Engineering
KDCube Engineering · Concept

KDCube Use Cases: Problem In, Solution Out

Twenty-two real problems, stated the way practitioners state them — each answered with the concrete KDCube mechanism that solves it.

7 July 2026Engineering13 minConceptDawn MistLiving document
use casesagent runtimenamed servicesdelegated accessisolated exececonomicssceneontologic interface

The format is strict: problem in, solution out. Features appear only when a problem summons them. New problems get appended as we meet them — links to go deeper close every section. And KDCube is an app runtime, not only an agent runtime — it serves agentic apps and non-agentic ones alike, so the problems below span both: scheduled jobs, published sites, and shared workspaces as much as agent turns.

TWENTY-TWO PROBLEMS · MOST DIRECT FIRST 1keep your existing agent 2deploy the app 3an explorable business domain 4credential lifecycles 5mail & Slack, delegated 6isolated exec 7machine-checked agents 8cron vs agent 9scheduler for apps 10disposable tokens 11mid-run answers 12many humans, one app 13per-conversation setup 14provider vs consumer 15lean context 16lineage 17durable memory 18pinboard for findings 19cache costs 20publish to the web 21pages without projects 22real websites PROBLEM IN, SOLUTION OUT · JUMP TO THE NUMBER THAT HURTS
The whole article at a glance — jump to the number that hurts.

01 We already have an agent — rewriting it is not an option

“Our LangGraph, CrewAI, Claude Agent SDK, or custom loop already contains the product logic. We need production services around it, not a replacement for it.”

Keep the decision runtime and connect only the seams the product needs:

USE CASE 01 · WE ALREADY HAVE AN AGENT — REWRITING IS NOT AN OPTIONBUILD IT YOURSELFAND KEEP IT ALIVErewrite into a new frameworkre-test every prompt and toollose the checkpoints that workWITH KDCUBEone execute_core seam; the loop staysstateless between turns — scaled servingREST, chat, MCP, Telegram: same agentported-langgraph-agents is the referenceKeep the agent; add runtime seams independently.
Keep the agent; add runtime seams independently.
  • The existing loop stays responsible for decisions: graphs, prompts, tools, checkpoints, and domain code keep their jobs. One execute_core seam maps bound turn input into the agent and maps its stream and answer back to KDCube.
  • Scaled serving is stateless between turns: a fresh graph instance is built for one user/conversation turn and then discarded. Shared/checkpointed storage carries continuity; only true connections are reused, so another worker can serve the next turn.
  • Serve it through the surface you need: REST, webhook, Telegram, streaming chat, MCP, or a KDCube widget can point to the same hosted agent.
  • The reference is concrete: ported-langgraph-agents@2026-07-13 hosts two LangGraph agents behind one dispatcher, with conversation reload, conversation-scoped capabilities, shared storage, and optional KDCube workspace/ISO-exec tools without turning them into ReAct.

DOCSsettle-your-solutionhosted-agent-conversation

02 Deploy and update an app without rebuilding its product logic

The product logic already works. Now it needs REST, streaming, jobs, widgets, configuration, secrets, storage, accounting, and a repeatable way to deploy updates.

A KDCube app adds those runtime seams without requiring every product to use every KDCube surface:

USE CASE 02 · DEPLOY AND UPDATE WITHOUT REBUILDING PRODUCT LOGICBUILD IT YOURSELFAND KEEP IT ALIVEa web app + queue per productconfig + secrets gluedeploy scripts nobody trustsaccounting bolted on laterWITH KDCUBEdeclare only the surfaces you provideas_consumer keeps dependencies explicitconfig · secrets · storage travel with the appdeploy or update from source/refKeep product logic; add and deploy only the seams the app needs.
Keep product logic; add and deploy only the runtime seams the app needs.
  • Declare only what this app provides: agents, API operations, jobs, MCP, widgets, named services, or a website can be added independently.
  • Keep product dependencies explicit: surfaces.as_consumer connects Python tools, MCP servers, named services, and UI components without publishing them as the app's own surfaces.
  • Configuration, secret references, storage ownership, interfaces, tests, and release metadata travel with the app package and stay synchronized.
  • Deploy or update from source/ref: descriptor-driven loading and app reload preserve the product boundary while the platform supplies ingress, identity, streaming, and accounting.

DOCShow-to-write-an-appdelivery-and-updatedescriptor

03 Our domain has useful data and actions, but the agent cannot discover them

“We have contracts, cases, lab samples, spreadsheets, or another rich domain. The agent either gets a wall of provider-specific tools or must already know our API.”

Wrap the existing functionality once as a named-service realm: a domain that explains its objects, searches, and permitted actions before the agent uses them.

USE CASE 03 · MAKE DOMAIN DATA AND ACTIONS DISCOVERABLE BUILD IT YOURSELF AND TEACH EVERY CLIENT a growing catalog of provider-specific tools object identities hidden in prompt text actions, limits, and permissions explained by hand a new adapter for every agent and UI WITH KDCUBE about + schema: the realm explains itself list + search: small results with stable refs get + bounded actions: progressive work one governed contract for agents, MCP, and UI Teach the domain once; every agent can explore it progressively.
Teach the domain once; every agent can explore it progressively.
  • The realm introduces itself: the agent starts with provider.about and object.schema to learn what the domain contains, how its objects are named, how to find them, and what actions are allowed. This is the ontologic interface: the domain teaches its vocabulary and rules at runtime.
  • The agent explores instead of guessing: list and search return small results with stable object refs; the agent follows a ref to read one object or run a declared, bounded action.
  • Complete data remains reachable: long collections paginate, while large objects and files travel through signed delivery or into an agent's turn workspace instead of flooding every model prompt.
  • One declaration serves every client: a hosted agent uses the generic named-service tools, an external agent such as Claude Code connects through MCP, and apps or widgets resolve the same refs. Caller grants and provider-side permissions still guard every operation.

DOCSbuild-a-named-servicenamed-servicesnamed-services-mcp

04 Agents and the keys to your accounts

“I built credential handling for my agents myself — and every week something breaks.”

Credentials are a lifecycle (consent → refresh → live rejection → explain → upgrade → revoke); homegrown builds cover the happy path. Connection Hub covers the loop while trusted integration code, not the model or generated-code executor, resolves provider credentials:

USE CASE 04 · AGENTS AND THE KEYS TO YOUR ACCOUNTSBUILD IT YOURSELFAND KEEP IT ALIVEtoken vault + storage schemarefresh daemon + expiry mathper-provider adapterserror mapping + reconnect UIrevocation bookkeepingWITH KDCUBEtools declare claims, not secretsbroker resolves account + token401 → refresh once → retry onceevery denial: reason + deep linkexternal agents get separate grantsThe agent asks for a claim; the broker does the rest.
The agent asks for a claim; the broker does the rest.
  • Tools declare claims, not secret handling. The SDK resolves the current user's connected account and provider token inside trusted server-side code. Normal OAuth/OIDC services can be configured from endpoints, connector-app secrets, and claim-to-scope mappings; unusual protocols can still supply a provider-specific adapter.
  • Live 401 → refresh once → retry once → only then mark the account + reconnect card deep-linking it, provider's real error preserved.
  • Every denial is structured: reason, labeled candidates, retry hint, and an absolute Connection Hub deep link that lands on the exact fix — from chat or from an external agent relaying it.
  • External agents get their own grants (mail:read, slack:write), tier-picked by the user at consent time — separate from provider claims, revocable, consent-snapshot-bound.

DOCSconnection-hubdelegate-to-external-clientsecrets-lifecycle

05 Working the company's mail and Slack on delegated trust

The assistant should search my Gmail and post to our Slack. An all-powerful token is out of the question; per-provider plumbing is a quarter of work.

Two authorization gates, one coherent operation:

USE CASE 05 · MAIL AND SLACK ON DELEGATED TRUSTBUILD IT YOURSELFAND KEEP IT ALIVEone god token in an env varper-provider plumbing, a quarter eachsilent account guessingWITH KDCUBEgate 1: delegated namespace grantsgate 2: connected-account claimsconsent raises at the attemptfiles cross as signed URLsDelegated grants at the boundary; account claims inside.
Delegated grants at the KDCube boundary; connected-account claims inside.
  • Two gates, explicit: delegated namespace grants authorize the calling client at the KDCube boundary; connected-account claims authorize trusted KDCube code to call the provider for the current user.
  • Consent is demand-driven — the attempt is the ask. Tools stay available; the one that hits a missing claim returns a structured ask scoped to exactly that tool's claims (never the provider's union) and raises a consent card with two exits — approve, or turn off the tools that need it — while the turn keeps working.
  • Multi-account is explicit: labeled results; actions never pick an account silently.
  • Files cross the boundary through signed download URLs and upload slots — bytes over HTTP, never inside tool calls.

DOCSmailslackhosting

06 Generated code without ambient platform access

The agent writes useful code — and the only way to run it is a shell tool with the agent's hands on it. Security says no, and they are right.

KDCube separates the requester, the materialized workspace, the isolated executor, and trusted tools:

USE CASE 06 · GENERATED CODE WITHOUT AMBIENT PLATFORM ACCESSBUILD IT YOURSELFAND KEEP IT ALIVEa shell tool with the agent’s hands on itthe process inherits every credentialsecurity says no — rightlyWITH KDCUBEthe agent proposes; trusted resolvers decidesparse workspace · split executor, no networktools cross the supervisor socketthe same boundary for ReAct and LangGraphRequester, resolver, workspace, executor, and tools are separate boundaries.
The requester, resolver, sparse workspace, executor, and trusted tools are separate boundaries.
  • The agent proposes; trusted resolvers decide. Logical refs and paths are untrusted locators; the resolver binds the current tenant/project/user/authority before materializing bytes.
  • The executor receives a sparse workspace: in split Docker it has no network, platform or app storage roots, deployment descriptors, provider credentials, or another user's workspace.
  • Trusted tools stay outside: approved calls cross the supervisor socket and execute under the carried request identity, grants, provider claims, and economics context.
  • The contract is reusable: KDCube ReAct and externally authored agents such as LangGraph can use the same pull/workspace/ISO-exec boundary. Declared output files are hosted and delivery is verified rather than assumed.

DOCSexecution-boundariescross-runtime-contextiso-runtime

07 A coding agent inside automation, trusted by machines

A human reviews a coding agent's work with their eyes. A pipeline can't.

The Claude Code harness makes the work machine-checkable:

USE CASE 07 · A CODING AGENT INSIDE AUTOMATION, TRUSTED BY MACHINESBUILD IT YOURSELFAND KEEP IT ALIVEa human eyeballs every difffree-form output nobody can parsesessions that lose their contextWITH KDCUBEdedicated, mapped workspace per sessionframed structured output: declared editsvalidators inspect exactly what was declareddeterministic session binding to user + conversationThe agent declares its work; machines check exactly what was declared.
The agent declares its work; machines check exactly what was declared.
  • Dedicated, mapped workspace per session.
  • Framed structured output: the agent declares what it did, in which files.
  • Validators inspect exactly the declared edits; only validated work is committed.
  • Deterministic session binding to user + conversation — follow-up and steer turns resume the same context. In production inside the news pipeline.

DOCSclaude-codeagent-integration

08 Scheduled pipelines that sometimes need judgement

“Most agent use cases can be done with a cron that calls an LLM. I don’t get the fervor.”

Correct — and KDCube agrees. What decides between a cron and an agent is the trigger:

USE CASE 08 · WHAT DECIDES BETWEEN A CRON AND AN AGENTthe clockknown path, fixed stepsa person asksone open intentan event firesanswer lands mid-worka wall appearsconsent, approval, a humancron calls the pipelinegather · rank · publish — in productionan agent turnplan made mid-turn · events fold in · dialogueSAME APP · SAME BUDGET LINETHE CLOCK CAN TAKE THE FIXED PATH · THE OTHER TRIGGERS CANNOT
The clock can take the fixed path; the other triggers cannot.
  • Clock + known path → cron. The news pipeline (gather, rank, publish daily) is exactly "cron calls LLM", in production.
  • A person asks → agent turn. One open intent, four domains, the plan made mid-turn.
  • An event fires → conversation work. Reactive ingress appends the event to the ordered lane and admits a wake for the app's @on_reactive_event surface. If a turn is already live, eligible events fold into it; only eligible followups add bounded iteration credit.
  • A wall appears → dialogue. Missing consent becomes a one-click question to the user — and dialogue is not schedulable.

Both run in the same app, on the same budget line. A scheduled step that starts needing judgement becomes an agent turn — no rewrite.

DOCSclaude-codebundle-lifecycleconversation-events

09 A timer should schedule any app work, not only agent loops

“I want a nightly job — a report, a sync, a cleanup — but every scheduler I find is bolted to an agent loop or is a separate cron stack to run and watch.”

A schedule is a first-class app trigger; the app declares jobs, the platform runs them:

USE CASE 09 · SCHEDULE ANY APP WORK, NOT ONLY AGENT LOOPS BUILD IT YOURSELFAND KEEP IT ALIVE cron host + worker fleet retries, backoff, dedupe, locking per-tenant scoping + identity run history + alerting a separate stack from your app WITH KDCUBE declare scheduled jobs in the app any operation, not only agent turns runs under app identity + accounting ordered lane + long-run protection same guard rails as a person's access A timer is a first-class app trigger - no agent required.
A timer is a first-class app trigger — no agent required.
  • Declare scheduled jobs in the app package — any operation, not only an agent turn: a report build, a sync, a publish, a cleanup.
  • Runs under the app's identity and accounting — the same tenant/project/user scoping and per-run spend attribution as an interactive request; no side stack to reconcile.
  • The ordered lane and long-run protection apply — a scheduled run enters the same lane, with the runtime's guard against a run that overstays its window.
  • The same guard rails as a person's access — a scheduled step that needs a provider token resolves it through Connection Hub, per run, exactly like a human turn.

DOCSscheduled-jobsconversation-schedulerlongrun-protection

10 Machine access that is born disposable

A script needs to file tasks every night. Nobody wants it holding a person's session.

Automation access is its own credential type:

USE CASE 10 · MACHINE ACCESS THAT IS BORN DISPOSABLEBUILD IT YOURSELFAND KEEP IT ALIVEa person’s API key in cronlong-lived secrets nobody rotatesrevocation = redeployWITH KDCUBEtoken bound to resources + grants + expirycreated and revoked in Connection Hubrevocation is immediatesame guard rails as human accessA credential born to be thrown away.
A credential born to be thrown away.
  • A token bound to declared resources and grants, with an expiry.
  • Created and revoked in Connection Hub → Delegated by KDCube: the Granted access list shows every grant — manual tokens and OAuth-connected apps alike — each with its own Revoke.
  • Revocation is immediate: record deleted, bound session logged out, next call rejected.
  • Same guard rails as human access, on a credential meant to be thrown away.

DOCSautomation-access

11 The answer arrives while the agent is still working

“The agent asks for something — an approval, a callback, a human — and the answer shows up mid-run. Most stacks make it fail now and start over later.”

Every conversation carries an ordered event lane; systems the agent triggers answer back into it, and the answers feed the input loop:

USE CASE 11 · THE ANSWER ARRIVES WHILE THE AGENT IS STILL WORKINGBUILD IT YOURSELFAND KEEP IT ALIVEfail now, restart laterpolling loops and nudgesapprovals that die with the runWITH KDCUBEan ordered event lane per conversationeligible events fold into the live turnwakeup and meaning are separatefolding is total — nothing wedgesThe grant lands as an event, folds into the live turn, and the agent finishes.
The grant lands as an event, folds into the live turn, and the agent finishes — no nudge, no restart.
  • The consent flow is the worked story: a tool attempt raises the ask; the user approves in Connection Hub in parallel; the grant lands in the lane as a conversation event, folds into the live turn — and the agent circles back and finishes.
  • Any system can answer back: approvals, callbacks, and alerts publish into a lane scoped by tenant/project/user/conversation/agent; a live turn folds eligible events in lane order.
  • Wakeup and meaning are separate: reactive ingress atomically stores the event and admits a bodyless wake. A retained task_payload decides whether unconsumed work can start a continuation; passive events wait for a live or future turn.
  • Folding is total: every consumed event advances the turn's bookkeeping, even one that renders nothing — an unreadable event can never wedge a completion.

DOCSconversation-eventsbundle-eventsconnection-hub

12 One workspace, many humans

Ten colleagues use the same app and workers. Each request still needs the right conversations, data, integrations, capabilities, and budget.

One deployment is bound to one tenant/project and may serve many users concurrently. The runtime carries the authenticated user and authority through request and cross-runtime boundaries.

USE CASE 12 · ONE WORKSPACE, MANY HUMANSBUILD IT YOURSELFAND KEEP IT ALIVEuser columns in every tablescoping by hand in every queryper-user budget spreadsheetssession plumbing per surfaceWITH KDCUBEidentity carried across boundariesscoped stores + trusted resolversper-conversation tuning in a ceilingper-user economics from day oneSharing the room shares nothing else.
Sharing the room shares nothing else.
  • Scoped stores and resolvers: user-owned conversations, memories, connected accounts, settings, and budgets are resolved through the current request identity — not a model-supplied user id.
  • Per-conversation tuning inside an admin grant: users can save a model and capability set for one conversation; nothing widens beyond the app inventory (section 13 is the deep dive).
  • The scene is the shared room: summonable widgets, auth-gated chips, cross-widget drag under the dragging user's identity.
  • Per-user economics from day one.

DOCSsceneeconomics-integration

13 One conversation, one saved agent setup

“The same user wants a research setup in one conversation and a cheaper, narrower setup in another. I cannot let one picker change every thread.”

The app config grants the ceiling; each conversation stores its own full selection:

USE CASE 13 · ONE CONVERSATION, ONE SAVED AGENT SETUPBUILD IT YOURSELFAND KEEP IT ALIVEone global settings pagea picker that changes every threadsilent capability driftWITH KDCUBEconfig grants the inventory ceilingeach conversation saves its own selectionedits are a draft until Saveoptional baseline for new conversationsThe app grants the ceiling; each conversation saves its own narrower choice.
The app grants the ceiling; each conversation saves its own narrower choice.
  • Config grants the inventory: surfaces.as_consumer.agents.<id> and supported_models define what the app allows; the user can only narrow it.
  • Each conversation owns a saved selection: model, tools, skills, MCP tools, named-service operations, and helper-agent choice do not leak into another conversation.
  • Edits are a local draft: only Save changes persists them. Sending a message does not silently save capabilities; switching conversations discards unsaved edits.
  • A future-conversation baseline is optional: a new conversation materializes it once, or starts from app configuration when no baseline exists. Later baseline edits do not rewrite old conversations.

DOCSconstruct-react-agentuser-settingschat-with-react-agent

14 One app needs to provide services and consume others

“Our workspace exposes chat and APIs, calls an MCP server, uses mail and tasks, and mounts a widget from another app. One flat integrations list cannot express that safely.”

KDCube makes the direction part of the app contract:

USE CASE 14 · PROVIDE SERVICES AND CONSUME OTHERS, SAFELYBUILD IT YOURSELFAND KEEP IT ALIVEone flat integrations listexposure and usage tangledevery agent sees everythingWITH KDCUBEas_provider: what this app exposesas_consumer: what this app may calleach agent gets its own inventorythe directions do not leakWhat the app exposes and what it may call are two different declarations.
What the app exposes and what it may call are two different declarations.
  • surfaces.as_provider says what this app exposes: API, widget, MCP, app visibility, managed auth, and default-chat intent.
  • surfaces.as_consumer says what this app uses: Python tools, MCP service connections, named-service namespaces, UI resolvers, and Scene components.
  • Each agent gets its own inventory: two agents in one app can consume different tools and service operations without changing the app's public surfaces.
  • The directions do not leak: consuming another app's MCP server does not republish it; exposing an API does not automatically make it callable by the app's agents.

DOCSdescriptormcpagent-integration

15 Context that stays lean as capability grows

The context fills with tool definitions, stale history, and copied payloads — quality drops before the window overflows.

One principle: context carries bounded representations and refs; owning services hold bytes.

USE CASE 15 · CONTEXT THAT STAYS LEAN AS CAPABILITY GROWSBUILD IT YOURSELFAND KEEP IT ALIVEprompt-pruning scriptspayloads pasted into messagesa tool list that keeps growinghistory replayed every turnWITH KDCUBEfixed named-service grammarlean hits: ref + title + snippethistory searchable, never replayedcached instructions + ANNOUNCE tailContext holds handles; the platform holds bytes.
Context holds handles; the platform holds bytes.
  • Tools: a fixed named-service grammar replaces a growing set of near-synonym integration verbs; each realm self-describes its nouns, filters, operations, and action payloads.
  • Payloads: lean hits carry ref, title, and snippet; bytes are fetched or hosted outside model context through workspace materialization, signed downloads, or staged uploads.
  • History: searchable (conv:), never replayed; working summaries compress each turn.
  • Cache: durable instructions cached; a per-turn ANNOUNCE tail carries only what changed.

DOCSnamed-services-mcpcontext-cachinghosting

16 Knowing where the context came from

When an answer is wrong, the lineage of what the agent saw is the first thing you need — and usually the first thing lost.

Lineage survives when context enters as addressable objects instead of anonymous pasted text.

USE CASE 16 · KNOWING WHERE THE CONTEXT CAME FROMBUILD IT YOURSELFAND KEEP IT ALIVEgrep the logs after the factanonymous pasted textguess which version it sawWITH KDCUBEcontext enters as addressable objectshits carry paths to turn + eventboard pins keep provenancethe per-turn timeline is the ledger“What was it looking at” becomes a query.
“What was it looking at” becomes a query.
  • Context objects retain canonical refs (conv:fi:…, mem:…, cnv:…, provider-owned refs); the owning resolver decides what the current requester may read.
  • Search hits carry their paths back to the turn and event they came from.
  • Board pins keep provenance; sharing a board shares it.
  • The per-turn timeline is the ledger — "what was it looking at" is a query.

DOCScanvasconversation-search

17 Memory that survives the session

Every session starts from zero. The agent asked my stack yesterday and asks again today.

Two kinds of remembering, separated because they decay differently:

USE CASE 17 · MEMORY THAT SURVIVES THE SESSIONBUILD IT YOURSELFAND KEEP IT ALIVEone vector store for everythingsummaries that overwrite each otheridentity glue scriptsWITH KDCUBEepisodic recall: conv: searchdurable knowledge: mem: typed notesreconciler merges; user editslinked identities via explicit edgesTwo kinds of remembering, separated because they decay differently.
Two kinds of remembering, separated because they decay differently.
  • Episodic recall (conv:): the temporal record — every turn indexed with its production context. "What did we decide in May" is one search.
  • Durable knowledge (mem:): co-managed typed notes — the agent proposes, a reconciler merges, the user edits in the memory widget.
  • Linked identities can resolve to one platform subject through explicit connection edges and authority projection; raw external identity does not silently become platform authority.
  • Both feed the turn as retrieved, cited context under the lean-hits discipline.

DOCSmemories-reconciliationconversation-search

18 Findings scatter across conversations

“I collect useful things — a message, a file, a search hit, a decision — across many chats, and then I can never find or reuse them. Copy-paste loses where they came from.”

Collect each finding as a pin: a URI a named service resolves, with its provenance kept:

USE CASE 18 · FINDINGS SCATTER ACROSS CONVERSATIONS BUILD IT YOURSELFAND KEEP IT ALIVE a notes store + a UI links back to each source re-resolve a link when asked share + permissions collect across conversations WITH KDCUBE a pin is a URI, resolved on demand named services resolve it anywhere provenance kept per pin the board is a summonable widget share a board, share its pins Collect a memo as a URI; the named service resolves it anywhere.
Collect a memo as a URI; the named service resolves it anywhere.
  • A pin is a reference, not a copy — a mem: / conv: / provider-owned URI that the owning named service resolves on demand, so a pin stays live and permission-checked.
  • Provenance travels with the pin — which turn, which source, which event it came from; a board is a provenance-keeping desk, not a bag of dead text.
  • The board is a summonable widget — pinboard mounts on the scene and in chat; drop a result onto it, open a pin back to its source.
  • Share a board, share its pins — resolution runs under the reader's identity, so a shared board never leaks what the reader may not see.

DOCSpinboardpin-operationspin-integration

19 Prompt-cache costs nobody can attribute

“Long conversations got expensive, and cache rebuilds are invisible — nobody can say which action caused what spend.”

KDCube places context by lifecycle, marks every cold turn, and hands the rebuild decision to the person who pays:

USE CASE 19 · PROMPT-CACHE COSTS NOBODY CAN ATTRIBUTEBUILD IT YOURSELFAND KEEP IT ALIVEinvisible rebuilds on the billnobody knows which action cost whatcache thrash from every toggleWITH KDCUBEplacement by lifecycle: cached vs ANNOUNCE[CACHE] marker + cache_cold_turn accountingthe payer holds the rebuild policyboth switches named, neither silentThe user pays for the cache, so the user decides when to rebuild it.
The user pays for the cache, so the user decides when to rebuild it.
  • Placement by lifecycle: durable teaching in the cached instructions; turn-local state in the uncached ANNOUNCE tail — the volatile costs nothing.
  • Every deliberate invalidation is marked: the [CACHE] cold-turn marker and cache_cold_turn accounting metadata join the rebuild premium to the causing action — one identifiable component within the turn's spend sum.
  • The user holds the policy: accept · confirm · defer-cold · defer-conversation (admin default + bounds); under confirm the composer turns a costly switch into an inline choice.
  • Both switches are named, neither silent: a model pick rebuilds in a per-model cache namespace; a capability toggle colds one turn, then caching resumes.

DOCScontext-cachingconstruct-react-agentuser-settings

20 Agent output the web can actually find

The agent produces excellent reports and articles — and they live in chat, where no search engine, shared link, or newsletter will ever reach them.

A KDCube app publishes selected artifacts as first-class public web content:

USE CASE 20 · AGENT OUTPUT THE WEB CAN ACTUALLY FINDBUILD IT YOURSELFAND KEEP IT ALIVEreports trapped in chathand-copied static pagesstale copies in every indexWITH KDCUBE@public_content provider: crawlable HTMLregistry sitemaps · retracted → 410publish_many: one operation, batchedCDN fronts stable public URLsPublish is an app operation; the web presence is the platform’s job.
Publish is an app operation; the web presence is the platform’s job.
  • The app declares a public-content provider (@public_content): which items, under which public alias — the platform renders crawlable HTML with JSON-LD, canonical and OG tags at stable URLs.
  • Sitemaps come from the registry: publish and retract update the per-alias sitemap; a retracted item serves 410, so stale copies fall out of indexes.
  • Publishing is an operation — batched (publish_many: one lock, one generation bump), so a nightly pipeline and a Publish button are the same code path.
  • A CDN fronts the origin through rewrite mapping (public URLs stay stable); the app remains the single source of truth.

DOCSpublic-contentpublic-content-providerpublish-discoverable

21 Every new internal tool is a new frontend project

Every team needs its workspace page — chat here, tasks there, usage somewhere — and each one becomes its own web app to build, wire, and upgrade.

A scene is config + content over a shared host; the widgets come from the apps that own them:

USE CASE 21 · EVERY NEW INTERNAL TOOL IS A NEW FRONTEND PROJECTBUILD IT YOURSELFAND KEEP IT ALIVEa web app per team pagewiring rebuilt for each widgetupgrades multiplied by N sitesWITH KDCUBEwidgets served by their owning appsbehavior is configurationcross-surface drag + surface commandsone reusable scene hostA new alias in config mounts another app’s widget.
A new alias in config mounts another app’s widget — shipping the page is editing configuration.
  • Components are served widgets iframed from their owning apps — pinboard, chat, memories, usage — declared in surfaces.as_consumer.ui.scene.components (bundle_id + widget_alias).
  • Behavior is config: placement: docked|floating, rail, gated auth, drop patterns routed to a target_surface.
  • Context moves across surfaces: cross-surface drag, provider-resolved open actions, and surface commands — one widget summons and directs another through a declared contract — are built into the host.
  • The reusable host is @kdcube/components-react/scene — a new alias mounts any deployed app's widget.

DOCSscene-configscenesurface-commands

22 The app needs a real website, not only a control-plane view

“The main view is already a complete site. We need clean public paths, several app sites in one deployment, SPA routes, and CDN caching — without hardcoding apps into the proxy.”

Declare the built main view as an application-hosted website:

USE CASE 22 · A REAL WEBSITE, NOT ONLY A CONTROL-PLANE VIEWBUILD IT YOURSELFAND KEEP IT ALIVEapps hardcoded into the proxyone-off nginx rules per sitecache rules nobody ownsWITH KDCUBEalias + hosts declared in bundles.yamlvalidated catalog · hot in-memory routingSPA + multipage paths built inCDN forwards, caches, rewritesDescriptor to validated catalog to routed, CDN-served app files.
Descriptor to validated catalog to in-memory routing to CDN-served app files.
  • The declaration stays with the app: alias, hosts, and default status live in bundles.yaml, beside the main-view build they expose.
  • Routing is validated and hot: an immutable ApplicationSiteCatalog carries the resolved app target; Redis distributes ordered generations and each proc routes from memory.
  • Multipage and SPA paths work: direct files, directory indexes, and root index.html fallback share the standard app UI storage lifecycle.
  • The CDN forwards and caches: it preserves the viewer host and rewrites to site-root; it does not own the registry. @public_content remains the separate indexed-record mechanism.

DOCSapplication-siteswebsitedescriptor

· The pattern behind the answers

Five moves keep solving different problems: identity and authority survive every boundary · untrusted requesters ask trusted resolvers · provider and consumer directions stay separate · domains describe themselves behind a fixed grammar · every denial explains its own fix.

THE PATTERN

Most difficult agent problems are product-runtime problems — and builders should not have to rebuild that runtime around every agent.

· See these mechanisms at work

KDCube Engineering
№ 2026-07-07 · kdcube.tech · living document