Skip to content

Habitat Interfaces

A single Habitat instance can be driven from different UIs. All interfaces share the same work directory, config.json, secrets, tool sets, skills, on-disk sessions, and the ChannelBridge routing layer.

Surfaces

SurfaceCLI CommandCodemise Task
REPL / one-shotumwelten habitatsrc/cli/habitat.tsmise run habitat
Local agentumwelten habitat localsrc/cli/habitat.ts
Telegramumwelten habitat telegramsrc/ui/telegram/TelegramAdapter.tsmise run habitat-telegram
Discordumwelten habitat discordsrc/ui/discord/DiscordAdapter.tsmise run habitat-discord
Web + APIumwelten habitat websrc/habitat/gaia-server.tsmise run habitat-web
TUI (sessions)umwelten sessions tuisrc/ui/tui/file-session.ts

Quick start (with mise)

The repo includes mise tasks that handle environment variables and work directory configuration automatically:

bash
# Set up env
cp examples/jeeves-bot/env.example examples/jeeves-bot/.env
# Edit .env with your API keys

# Run any interface
mise run habitat            # CLI REPL
mise run habitat-web        # Web on :3000
mise run habitat-telegram   # Telegram bot
mise run habitat-discord    # Discord bot

All tasks share one work directory (examples/jeeves-bot/jeeves-bot-data-dir) so config, agents, and tools are consistent.

Quick start (without mise)

bash
# Always use dotenvx to load .env keys
dotenvx run -- pnpm run cli -- habitat -p google -m gemini-3-flash-preview
dotenvx run -- pnpm run cli -- habitat telegram --token $TELEGRAM_BOT_TOKEN
dotenvx run -- pnpm run cli -- habitat discord --token $DISCORD_BOT_TOKEN
dotenvx run -- pnpm run cli -- habitat web --port 3000

ChannelBridge — unified adapter layer

All platform adapters (Telegram, Discord, Web) go through the ChannelBridge, which handles:

  • Interaction caching (one per channel key)
  • Route resolution (channel → agent via routing.json)
  • Transcript resume on restart
  • Transcript persistence on every update
  • Unified slash commands (/switch, /agents, /status, /reset, /help)

See Channel Routing for details on routing configuration and slash commands.

Discord presets (Jeeves)

The Jeeves example is an opinionated preset: JEEVES_* env prefix, bundled stimulus template, and a ready-to-go data directory. You still run the main CLI:

bash
dotenvx run -f examples/jeeves-bot/.env -- pnpm run cli -- habitat discord \
  --token "$DISCORD_BOT_TOKEN" \
  -w examples/jeeves-bot/jeeves-bot-data-dir \
  --env-prefix JEEVES

Agent MCP server management

Agents can run as standalone MCP servers. Manage them from the CLI:

bash
umwelten habitat agent start <agent-id>    # Start an agent's MCP server
umwelten habitat agent stop <agent-id>     # Stop it
umwelten habitat agent status [agent-id]   # Check health (all agents if no ID)

Or from the REPL: /agent-start <id>, /agent-stop <id>, /agent-status [id].

Secrets management

bash
umwelten habitat secrets list              # List stored secret names
umwelten habitat secrets set <name> <val>  # Store a secret
umwelten habitat secrets set <name> --from-op "op://vault/item/key"  # From 1Password
umwelten habitat secrets remove <name>     # Remove a secret

Native session introspection

Habitat sessions on disk are introspected with:

bash
umwelten sessions habitat list --work-dir /path/to/work
umwelten sessions habitat show <session-id-prefix>
umwelten sessions habitat beats <session-id-prefix> [--topic …]
umwelten sessions habitat pull <session-id-prefix> <beat-index> --output beat.json
umwelten sessions habitat replay beat.json

External editor sessions (Claude Code, Cursor) use umwelten sessions list|show|search|… with --project.

See also

Released under the MIT License.