Rubber Duck is a configurable Discord bot platform for AI-assisted learning workflows. It supports multiple "duck" behaviors (Socratic tutoring, stats/code execution, registration, assignment feedback, and conversation review), all selected through config.
- Routes Discord messages into workflow-based conversations
- Runs OpenAI Responses API agents with optional tool calling
- Supports containerized Python execution tools for stats/code workflows
- Tracks messages, usage, and feedback metrics in SQL
- Provides admin channel commands for status, reports, logs, and metrics export
- Supports local and S3-backed configuration with composable
$includedirectives
src/main.py: app entrypoint and system wiringsrc/bot/: Discord client integrationsrc/rubber_duck_app.py: channel/admin message routingsrc/duck_orchestrator.py: thread creation + duck dispatchsrc/conversation/: conversation implementationssrc/workflows/: registration and assignment feedback workflowssrc/gen_ai/: OpenAI client orchestration + agent executionsrc/armory/: tool registration, Python tool execution, and cachingsrc/storage/+src/metrics/: SQL persistence and reportingprompts/: prompt assets used by configured ducks/agentsarchive/prompts/: legacy and unreferenced prompt assets kept for historical referencerubrics/: grading rubrics for assignment feedback workflowsrubrics/examples/: non-runtime rubric examples and demosdatasets/: local datasets staged into container toolsdocs/: getting started and deployment docsscripts/: developer utility scripts (including metadata generation)archive/: non-runtime historical and scratch artifacts kept for reference
- Python 3.11
- Poetry
- Docker (required if you enable container tools such as code execution)
- Discord bot token
- OpenAI API key
Configured ducks are built by duck_type.
agent_led_conversation: one-shot or agent-led interactionuser_led_conversation: chat flow where user messages drive turnsconversation_review: TA/reviewer scoring workflowregistration: NetID/email verification + role assignment workflowassignment_feedback: rubric-based grading workflow for markdown reports
Commands are processed in the configured admin channel.
!help: list commands!status: health check!metrics: export messages/usage/feedback tables as zip files!report: generate preconfigured report outputs!log: export log files!active [full]: show active workflow summary/details
Configuration supports both local files and S3 URIs, in JSON or YAML.
Primary examples:
local-config-example.yamlproduction-config.yaml
CI/CD is defined in .github/workflows/ci-cd.yml.
- Getting Started
- Deployment Guide
- Archived legacy docs:
docs/old/
./cdx: helper launcher script for local developer workflows.scripts/generate_metadata.py: generates dataset metadata artifacts.
MIT. See LICENSE.