Skip to content

System Boundaries and Working Conventions

This page answers two practical questions for each architectural system:

  1. What is the load-bearing core, and what is auxiliary or transitional?
  2. Which pattern should new code and examples copy?

“Core” means the supported ownership path, not necessarily a low-level package. “Auxiliary” means useful adapters, tooling, or research around that path. “Transitional” means a compatibility seam that should not seed new designs.

Boundary map

SystemCoreAuxiliaryTransitional / avoid for new workWorking conventionCanonical exampleExample gap
1. Cognition and InteractionStimulus, Interaction, model runners/providers in @umwelten/corecost tables, compaction, provider diagnosticsold static helpers and historical Interaction.chat() snippetsKeep provider details behind runners; keep the perceptual contract in Stimulus; use one continuing Interaction per model contextexamples/simple-agent, examples/provider-comparisonA minimal tested package-consumer example
2. Habitat runtimeHabitat.create(), ChannelBridge, runtime runners, unified container serverchannel adapters, work-directory discovery, artifactslegacy Discord routing and non-Habitat REPLConstruct through Habitat; route interfaces through ChannelBridge; expose network surfaces through startContainerServer()examples/habitat-minimal, examples/umwelten-web-demoOne tested lifecycle example covering sessions, tools, and shutdown
3. Gaia orchestrationGaia.start(), registry/vault, canonical startHabitatContainer() lifecyclefleet UI, wake/reap policies, Docker diagnosticsREST start/rebuild's duplicated start sequenceEvery interface must call the same lifecycle service; Gaia adds fleet capabilities to a normal Habitat rather than defining another agent runtimeGaia implementation in packages/habitatNo canonical provision → wake → interact → reap example
4. Habitats SaaS boundaryJWT/JWKS, registry announcement, room history, storage-token, A2A and Shell integration contractslocal mocks and deployment wiringshared Habitat API keyKeep SaaS records (Run, identity, rooms) external and correlate them with local Task/session IDs; do not recreate the SaaS domain in this repoWeb demo exercises part of the boundaryNo contract-test fixture showing SaaS ↔ Gaia ↔ Habitat
5. Substrate, Shell, Components@umwelten/substrate lifecycle, Services, Components, Shell, UI Resourcesloaders, authored work-directory components, Foreign componentsstatic Gaia UI and specialized registries pretending to be ComponentsComponents own reversible registration/teardown; dependencies are named Services; Shell stays a minimal hostShell assemblies in Habitat/MycelNo small authored Component tutorial or Foreign-component security example
6. A2A and MCP@umwelten/protocols clients/servers plus Habitat projectionsOAuth deployment adapters and hosted MCP exampleshand-rolled MCPClient; duplicate local server assemblyKeep protocol DTOs and transport here; adapt them to Habitat domain records at the boundaryexamples/agent-browser, examples/oura-mcpNo single local example exposing and consuming both A2A and MCP
7. Sessions, Explorations, Reflection, knowledgeSource Session adapters/records in core; browse/digest commands in sessions; Reflection/promotion primitivesTUI browse/search views and import adapterssession-first UI DTOs; sessions ↔ ui dependency cyclePreserve Interaction, Source Session, Exploration, Task, and Run as distinct correlated records; dependencies point from UI to application services, never backexamples/context-explorer, examples/dialogue-debateNo end-to-end source session → exploration → reflection → promoted knowledge example
8. Evaluation and reportingeval run for ad-hoc comparisons; EvalSuite; standard runFullEval; ranking; combine/report APIslocal-provider harness, Dagger/container experiments, one-off benchmark scriptsremoved EvaluationRunner, MatrixEvaluation, BatchEvaluation, and old report/combine CLI docsUse CLI for exploration; put repeatable methodology in executable suites; prefer deterministic verification; generate reports from scriptsexamples/evals, examples/model-showdownrunFullEval has contract tests but no provider-backed CI fixture
9. Mycel / Supplier ExchangeExchange dispatch/metering/balances in @umwelten/mycel; discovery/probe/publish/serve in @umwelten/supplierdiagnostics and deployment adaptersimporting Exchange internals into Umwelten domain packagesCross the bounded-context boundary over OpenAI-compatible HTTP; meter only observable traffic; keep offers and application demand explicitexamples/supplier-agent, examples/mycel-metering, examples/mycel-e2eExisting examples are strongest here; deployment failure-mode coverage remains limited

Cross-system rules

These rules make ownership visible even before package exports are tightened:

  1. Import from package roots for supported APIs. A deep import identifies an internal or experimental dependency and needs a reason.
  2. One composition root per process. CLI, Habitat container, Gaia, and Mycel may assemble systems; domain packages should not assemble applications.
  3. One lifecycle path per resource. HTTP, tools, and scheduled operations call the same start/stop implementation.
  4. Keep records distinct and correlated. Do not solve navigation by merging Interaction, Source Session, Exploration, Task, and Run.
  5. Examples are executable contracts. Each core system should have one minimal example, one realistic composition, and at least a typecheck or smoke test.
  6. Research is labeled, not hidden. Experimental harnesses can live beside supported code when their README names assumptions and they are not exported as the default API.

Cleanup sequence

  1. Fix correctness boundaries: unified Gaia lifecycle and Foreign-component origin enforcement.
  2. Break the sessions ↔ ui cycle and narrow wildcard package exports.
  3. Finish the evaluation documentation/API cleanup and gate its canonical examples.
  4. Add the missing lifecycle examples above, beginning with Habitat/Gaia and session-to-knowledge flow.
  5. Only then consolidate extension registries behind Component adapters; do not rename distinct Skill, Tool, Runtime, and Component concepts into one.

See the current system map for detailed evidence and the examples index for support levels.

Released under the MIT License.