Skip to main content

Using Gigi In Discord

Discord usage is active in a narrow foundation slice. The current codebase has a disabled-by-default Discord gateway adapter, a /ping slash-command handler, opt-in command sync, DM routing, guild-mention routing, admin-gated /permissions capability grants, /llm guild provider/model/routing controls, /plugins catalog controls, deterministic external app dry-run matching, policy-gated semantic routing, guild mention chat fallback through a configured chat model, guild memory count/search scaffolding, cited context-pack metadata for agent routing, durable agent run records, aggregate agent stats, an opt-in reply latency footer setting, gateway memory-delete tombstones, and limited consented public external app dispatch. Rich DM chat, reasoning chat, task actions, relay actions, and restricted external app dispatch are not live yet. For exact command syntax, required capabilities, responses, and failure cases, use Bot Commands as the canonical command guide. Guild mentions are the conversational surface. After narrow documented transition gates, Gigi should route @Gigi text through LLM planning, registered tools, policy checks, and answer composition. They should not become a broad heuristic command parser. Use exact slash commands when behavior needs deterministic syntax or explicit admin semantics.

Current Discord Behavior

  • /ping replies pong.
  • /permissions role create|assign|unassign|grant|revoke|grant-preset|revoke-preset manages role-first capability access when the requester has capability.manage or Discord administrator override.
  • /permissions user grant|revoke manages direct user capability exceptions.
  • DM ping replies pong.
  • Guild message <@Gigi> ping replies pong.
  • Guild mention text first checks enabled external app manifest prefix triggers. Dry-run manifests return the planned command. Public manifests with dispatch: "send_message" send the planned command as Gigi only when the approved version has stored public-dispatch consent.
  • Exact current-channel memory count questions can use the documented memory-count pre-handler; flexible memory questions should route through the planner when tool routing is enabled.
  • If deterministic matching fails and /llm routing is dry-run or enabled, a configured routing model can propose validated native memory or manifest-grounded plans.
  • If plugin routing fails, a configured chat model can answer the guild mention.
  • /agent stats guild reply-latency:on enables the optional reply latency footer for future guild replies; /agent stats guild reply-latency:off disables it. The setting requires agent.reply_latency.manage. The footer shows only response elapsed wall time, not token counts, provider usage, raw prompts, snippets, or per-user details. /llm usage guild remains the aggregate token/provider usage command.
  • Other DM text replies that rich chat needs a server LLM profile first; rich DM chat is not live.
  • Ordinary guild messages without a Gigi mention are ignored.
  • Bot-authored messages are ignored.

Planned Command Direction

Future slices should support:
  • native Discord slash commands for structured admin flows
  • message-triggered commands when an approved installed external app manifest declares a prefix trigger
  • external app manifests that declare triggers, surfaces, permissions, exact Discord identity, and attribution
  • durable jobs for work that outlives one Discord interaction
  • fail-closed permissions for private, admin, and sensitive actions
  • rich DM chat after policy and profile support exists

Permission Flow

For normal access, create a Discord role with a preset, then assign that role to users:
/permissions role create name:Gigi Plugin Managers preset:plugin-manager
/permissions role assign role:@Gigi Plugin Managers user:@person
Before using role create, role assign, or role unassign, give Gigi’s Discord bot role Manage Roles in server settings. Put Gigi’s bot role above roles it must assign or manage. Channel membership does not matter for this; Discord checks the bot’s server role permissions and hierarchy. Use direct user grants only when one person needs an exception without a Discord role.

Plugin Status

Approved external app manifest validation, safe import, stored public-dispatch consent, enable, disable, dry-run matching, semantic dry-run routing, and limited public send_message dispatch are started through /plugins plus guild mention routing. Discovery is exact-match only by Discord application ID or bot user ID, or by an explicitly approved HTTPS manifest URL or uploaded JSON manifest. Gigi does not scrape external app docs, guess behavior from names, or dispatch restricted external app commands yet. External apps may ignore bot-authored messages.

LLM Provider Setup

Guild LLM behavior is live only after all of these exist:
  • GIGI_LLM_SECRET_KEY_BASE64 configured as standard base64 for exactly 32 bytes
  • guild provider credential added through /llm provider add
  • active model profile selected through /llm model set for chat or routing
Provider API keys are entered through Discord modals and sealed in guild-scoped storage. Do not set provider keys as OPENAI_API_KEY; that environment variable is reserved and unused for provider calls.

Current Verification

Use Discord plus HTTP probes:
curl http://127.0.0.1:8080/healthz
curl http://127.0.0.1:8080/readyz