Skip to content

Introducing DevDuck 🦆

Published: December 31, 2024

DevDuck is an extreme minimalist, self-adapting AI agent that lives in your terminal. Think of it as your personal coding companion that never stops learning.

What Makes DevDuck Special?

graph LR
    A[You] -->|Query| B[DevDuck]
    B -->|Hot Reload| C[Self-Healing]
    B -->|Tools| D[Shell/Git/File Ops]
    B -->|MCP Protocol| E[External Tools]
    C -->|Adapts| B
    D -->|Executes| F[Results]
    E -->|Expands| F

Key Features

  • 🔥 Hot Reload: Edit code while running - no restart needed
  • 🧠 Self-Healing: Adapts when things break
  • 🛠️ Dynamic Tools: Load tools on-demand from any Python package
  • 🔌 MCP Integration: Connect to Claude Desktop and other agents
  • 📚 Knowledge Base: Automatic RAG for conversation memory

Architecture

flowchart TD
    User[👤 User] --> CLI[CLI Interface]
    CLI --> Agent[DevDuck Agent]
    Agent --> Tools[Tool Registry]

    Tools --> Shell[Shell Commands]
    Tools --> Files[File Operations]
    Tools --> GitHub[GitHub Integration]
    Tools --> MCP[MCP Servers]

    Agent --> KB[Knowledge Base]
    Agent --> Watcher[File Watcher]
    Watcher -->|Detects Changes| HotReload[Hot Reload]
    HotReload -->|Restarts| Agent

    style Agent fill:#f9f,stroke:#333,stroke-width:4px
    style HotReload fill:#ff9,stroke:#333,stroke-width:2px

How It Works

DevDuck operates in three modes:

$ devduck
🦆 Type your query...
Full REPL with history and auto-complete.

$ devduck "create a React app"
Quick queries from command line.

$ devduck --mcp
Expose as MCP server for Claude Desktop.

Tool Ecosystem

mindmap
  root((DevDuck))
    Core Tools
      system_prompt
      fetch_github_tool
      websocket
      shell
    Strands Tools
      editor
      file_read/write
      calculator
      slack
    Fun Tools
      clipboard
      screen_reader
      yolo_vision
    MCP Integration
      External Servers
      Claude Desktop

Quick Example

# Install DevDuck
$ uv tool install devduck

# Start interactive mode
$ devduck

# Load additional tools dynamically
🦆 load tools from strands-fun-tools

# Use them immediately
🦆 read my clipboard and summarize it

Pro Tip

Set DEVDUCK_KNOWLEDGE_BASE_ID to enable automatic memory across sessions. DevDuck will remember your conversations!

The Self-Healing Loop

sequenceDiagram
    participant U as User
    participant D as DevDuck
    participant W as File Watcher
    participant S as Self

    U->>D: Query
    D->>D: Execute
    Note over D: Error occurs
    D->>S: Read own source
    S->>D: Analyze error
    D->>D: Adapt & Fix
    D->>U: Result

    W->>D: Code change detected
    D->>D: Hot reload
    Note over D: Continues running

Why "Minimalist"?

  • One file architecture: devduck/__init__.py
  • Auto-dependency resolution: Installs what it needs
  • Smart model selection: Works with Bedrock, Anthropic, OpenAI, Gemini, Ollama
  • Zero config: Works out of the box

Self-Aware

DevDuck has access to its own source code. It can read, understand, and even modify itself during runtime. This is both powerful and potentially chaotic - use wisely! 🦆

Get Started

# Install
uv tool install devduck

# Run
devduck

# Ask anything
🦆 create a Python web scraper

DevDuck: Because agents should be simple, adaptive, and a little quacky. 🦆