feat: wire demo concierge to Discord for end-to-end onboarding testing #3

Merged
sscoble merged 1 commit from feat/concierge-discord-integration into main 2026-05-15 04:12:11 +00:00
Owner

Summary

Wires the demo concierge agent (kubeclaw-agent-demo-concierge in cust-demo) to Discord for end-to-end onboarding testing.

Changes

Config files added

  • 02-channel-discord-demo.yaml — Channel CR for Discord (discord-demo)
  • 06-agent-demo-concierge.yaml — Agent CR sample with Discord env vars
  • agent-pod-demo-concierge.yaml — Working pod manifest with DISCORD_BOT_TOKEN from secret and GATEWAY_ALLOW_ALL_USERS=true

Applied to cluster

  • Secret channel-tokens created in cust-demo (with placeholder token)
  • Channel discord-demo CR applied
  • Pod recreated — now picks up DISCORD_BOT_TOKEN env var

Known Issue: Missing discord.py in container image

The Hermes Discord adapter (gateway/platforms/discord.py) exists in the image but fails at runtime because discord.py is not installed. The hermes-speckl/sme:latest image needs discord.py added to its Python dependencies.

Verification

kubectl logs -n cust-demo kubeclaw-agent-demo-concierge --tail=5
WARNING gateway.run: Discord: discord.py not installed
WARNING gateway.run: No adapter available for discord

The old "No messaging platforms enabled" warning is gone.

What is needed next

  1. Rebuild image with discord.py
  2. Replace placeholder token in channel-tokens Secret
  3. Fix agent_controller.go buildEnv() to pass through spec.env vars

Closes #2

## Summary Wires the demo concierge agent (kubeclaw-agent-demo-concierge in cust-demo) to Discord for end-to-end onboarding testing. ## Changes ### Config files added - **02-channel-discord-demo.yaml** — Channel CR for Discord (discord-demo) - **06-agent-demo-concierge.yaml** — Agent CR sample with Discord env vars - **agent-pod-demo-concierge.yaml** — Working pod manifest with `DISCORD_BOT_TOKEN` from secret and `GATEWAY_ALLOW_ALL_USERS=true` ### Applied to cluster - Secret `channel-tokens` created in `cust-demo` (with placeholder token) - Channel `discord-demo` CR applied - Pod recreated — now picks up `DISCORD_BOT_TOKEN` env var ## Known Issue: Missing discord.py in container image The Hermes Discord adapter (`gateway/platforms/discord.py`) exists in the image but fails at runtime because `discord.py` is not installed. The `hermes-speckl/sme:latest` image needs `discord.py` added to its Python dependencies. ## Verification ``` kubectl logs -n cust-demo kubeclaw-agent-demo-concierge --tail=5 WARNING gateway.run: Discord: discord.py not installed WARNING gateway.run: No adapter available for discord ``` The old "No messaging platforms enabled" warning is gone. ## What is needed next 1. Rebuild image with discord.py 2. Replace placeholder token in channel-tokens Secret 3. Fix agent_controller.go buildEnv() to pass through spec.env vars Closes #2
sscoble added 1 commit 2026-05-14 23:02:33 +00:00
## Changes
- Add Channel CR for Discord (discord-demo) in cust-demo namespace
- Add Agent CR sample with Discord env vars (demo-concierge)
- Add manual pod manifest with DISCORD_BOT_TOKEN and GATEWAY_ALLOW_ALL_USERS
- Pod references channel-tokens Secret for the bot token

## Applied to cluster
- Secret channel-tokens created in cust-demo (token placeholder)
- Channel discord-demo CR applied
- Pod kubeclaw-agent-demo-concierge recreated with Discord env vars
- Pod logs show: Discord platform recognized, adapter loading attempted

## Known issue
The hermes-speckl/sme:latest image is missing discord.py Python package.
The Hermes Discord adapter () exists in the image
but fails at runtime because  raises ImportError.

Log shows: 'WARNING gateway.run: Discord: discord.py not installed'

To fully enable Discord messaging, the container image needs discord.py added
to its Python dependencies. This is an image build issue, not a config issue.

## What's needed next
1. Rebuild hermes-speckl/sme image with discord.py (or nix equivalent)
2. Update kubeclaw operator to pass through spec.env to pod (currently only
   KUBECLAW_* env vars are set - user env vars from spec are ignored)
3. Replace placeholder token with real Discord bot token

Closes #2
First-time contributor

I've completed the Discord integration wiring for the demo concierge agent. Here's the full status:

What was done

Configuration applied to cluster (cust-demo namespace)

  • Secret channel-tokens created with placeholder Discord bot token
  • Channel CR discord-demo — references the token secret, guild and channel IDs match the main agent's Discord config
  • Agent CR demo-concierge updated with channelRefs, env (DISCORD_BOT_TOKEN, GATEWAY_ALLOW_ALL_USERS=true, HERMES_LOG_LEVEL=debug), and allowedDestinations: [stdout, discord]
  • Manual pod manifest added as config/samples/agent-pod-demo-concierge.yaml (the controller doesn't pass through spec.env yet)

Log verification

Before: WARNING gateway.run: No messaging platforms enabled.
After: WARNING gateway.run: Discord: discord.py not installed

The pod now:

  • Discovers the DISCORD_BOT_TOKEN env var
  • Recognizes Discord as a configured platform
  • Attempts to load the Discord adapter

Known limitation: missing discord.py in container image

The Hermes Discord adapter (gateway/platforms/discord.py) is part of the Hermes codebase and exists in the image. But at runtime, import discord fails because the discord.py Python package isn't installed. The image needs to be rebuilt with this dependency.

Other issues found

  1. kubeclaw controller buildEnv() doesn't pass through user env vars — agent.Spec.Env, Volumes, and VolumeMounts are defined in the kubectl annotations but not consumed by the Go controller's reconcile loop. This means even with an Agent CR, user-defined env vars are ignored during pod creation.
  2. Pod deletion not handled — when the concierge pod was deleted, the controller logged "pod up to date" instead of recreating it.

Next steps

  1. Rebuild hermes-speckl/sme image with discord.py Python package
  2. Replace the placeholder token in channel-tokens Secret with the real Discord bot token
  3. Fix agent_controller.go to pass through user-specified env vars from the Agent spec
I've completed the Discord integration wiring for the demo concierge agent. Here's the full status: ## What was done ### Configuration applied to cluster (cust-demo namespace) - **Secret `channel-tokens`** created with placeholder Discord bot token - **Channel CR `discord-demo`** — references the token secret, guild and channel IDs match the main agent's Discord config - **Agent CR `demo-concierge`** updated with `channelRefs`, `env` (DISCORD_BOT_TOKEN, GATEWAY_ALLOW_ALL_USERS=true, HERMES_LOG_LEVEL=debug), and `allowedDestinations: [stdout, discord]` - **Manual pod manifest** added as `config/samples/agent-pod-demo-concierge.yaml` (the controller doesn't pass through spec.env yet) ### Log verification Before: `WARNING gateway.run: No messaging platforms enabled.` After: `WARNING gateway.run: Discord: discord.py not installed` The pod now: - Discovers the DISCORD_BOT_TOKEN env var - Recognizes Discord as a configured platform - Attempts to load the Discord adapter ### Known limitation: missing `discord.py` in container image The Hermes Discord adapter (`gateway/platforms/discord.py`) is part of the Hermes codebase and exists in the image. But at runtime, `import discord` fails because the `discord.py` Python package isn't installed. The image needs to be rebuilt with this dependency. ### Other issues found 1. **kubeclaw controller `buildEnv()` doesn't pass through user env vars** — `agent.Spec.Env`, `Volumes`, and `VolumeMounts` are defined in the kubectl annotations but not consumed by the Go controller's reconcile loop. This means even with an Agent CR, user-defined env vars are ignored during pod creation. 2. **Pod deletion not handled** — when the concierge pod was deleted, the controller logged "pod up to date" instead of recreating it. ## Next steps 1. Rebuild `hermes-speckl/sme` image with `discord.py` Python package 2. Replace the placeholder token in `channel-tokens` Secret with the real Discord bot token 3. Fix `agent_controller.go` to pass through user-specified env vars from the Agent spec
sscoble merged commit d7d05ff316 into main 2026-05-15 04:12:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sscoble/kubeclaw#3
No description provided.