Skip to content

Examples ​

The repository examples have different support levels. “Present under examples/” does not mean “canonical” or “CI-gated.” Start with a canonical example, then use a supported specialized example when its architecture fits.

Run commands from the repository root after pnpm install; use dotenvx run -- for examples that need provider credentials.

Canonical starting points ​

ExampleUse it forAutomated check
habitat-minimalSmallest Habitat work-directory layoutManual
umwelten-web-demoReference useChat frontend, Habitat HTTP API, tool cards, generative UIOwn Vite build
model-showdownMulti-dimension EvalSuite, cached aggregation, structured and narrative reportsReport/config typechecked
supplier-agentSupplier discover → probe → publish → serve workflowRoot lint + typecheck
mycel-metering / mycel-e2eExchange metering and end-to-end dispatchRoot lint + typecheck
bash
# Minimal evaluation scripts
dotenvx run -- pnpm tsx examples/evals/car-wash.ts
dotenvx run -- pnpm tsx examples/evals/instruction.ts
dotenvx run -- pnpm tsx examples/evals/reasoning.ts

# Web reference
mise run web-demo
mise run web-demo-client

# Combined evaluation report from cached results
pnpm tsx examples/model-showdown/generate-report.ts --format md \
  --output output/model-showdown-results.md

Use umwelten eval run for ad-hoc prompt comparisons. Evaluation suites and reports remain script-driven so scoring and methodology stay explicit.

Coverage by architectural system ​

The examples directory does not yet mirror the architecture evenly:

SystemCurrent coverageMissing canonical coverage
Cognition / Interactionsimple-agent, provider-comparisontested minimal consumer
Habitathabitat-minimal, umwelten-web-demo, channel examplesfull lifecycle smoke test
Gaialegacy gaia-ui; implementation examples onlyprovision → wake → interact → reap
Habitats SaaS boundarypartial web and runtime clientscontract fixture for SaaS/Gaia/Habitat
Substrate / Componentspackage-level implementationsauthored Component and Foreign-component tutorial
A2A / MCPagent-browser, OAuth MCP examplesone local producer-and-consumer example
Sessions / knowledgecontext and dialogue examplesSource Session → Exploration → Reflection → knowledge
Evaluation / reportingevals, model-showdown, local-providersprovider-independent composition smoke test
Mycel / Suppliersupplier-agent, mycel-metering, mycel-e2emostly covered

New examples should fill a missing row rather than adding another variation of an already covered happy path. See the system boundary map for the API and lifecycle convention each example should demonstrate.

Supported specialized examples ​

AreaExamples
Habitat configuration and channelsbasic-agent, help-habitat, jeeves-bot, pi-coder, twitter-habitat
Direct Interaction/toolkit usesimple-agent, bare-bones-memory, provider-comparison
Reflection and multi-agent workcontext-explorer, dialogue-debate, connection-quiz, dialogue-web
Protocol discovery and remote agentsagent-browser
Hosted OAuth MCP serversoura-mcp, twitter-mcp

These examples represent useful current patterns, but most are not included in the root examples/tsconfig.json gate. Read their README and expect credentials or external services where noted.

Experimental and research workflows ​

ExampleScope
local-providersLocal runtime benchmarking, eviction, watchdogs, quality matrices, and debug scripts
memorizationConversion → fine-tuning → inference → evaluation research pipeline
mcp-chatTezLab/Rivian OAuth MCP application and ranking experiment

These are valuable research harnesses, not stable templates. Pin assumptions before copying them into production code.

Prototypes and fixtures ​

  • gaia-ui is a static legacy/prototype UI, not the canonical Gaia/Shell implementation. Current Gaia composition lives in packages/habitat.
  • habitat-runtime-test is test fixture infrastructure rather than a tutorial.
  • schemas contains structured-output fixtures, not a runnable application.
  • docs/examples/interaction-interface-examples.md is explicitly historical and does not use the current API.

Known maintenance gaps ​

  • The root examples gate now covers the minimal eval suites and the canonical model-showdown/local-provider report entry points, but not their full provider-backed execution.
  • Several older narrative docs still describe options from the retired, larger evaluation CLI; only eval run is restored.
  • local-providers mixes maintained harnesses and one-off debug scripts.
  • Oura and Twitter MCP examples intentionally repeat deployment/OAuth scaffolding; a shared template has not yet been extracted.

The next maintenance step is to add canonical examples to typecheck and smoke gates one at a time, fixing each example before opting it in. Do not switch the gate to examples/**/*.ts and normalize existing failures by weakening checks.

Released under the MIT License.