πŸ”§ Dynamic Tools

Runtime tool management and loading

Package Loading GitHub Fetch Hot Directory
πŸ”§

Extend On The Fly

Load tools from Python packages, fetch from GitHub, or drop files in ./tools/. No restart needed. Full Python ecosystem access.

βš™οΈ Tool Configuration

Configure which tools load at startup via DEVDUCK_TOOLS environment variable.

Format

# Format: package1:tool1,tool2;package2:tool3,tool4
export DEVDUCK_TOOLS="strands_tools:shell,editor;devduck.tools:system_prompt,websocket"

devduck

Default Configuration

# Default tools loaded:
devduck.tools:system_prompt,store_in_kb,websocket,zenoh_peer
strands_tools:retrieve,shell,file_read,file_write,editor,use_agent

πŸ› οΈ manage_tools API

Runtime tool managementβ€”list, add, remove, or reload tools without restarting.

Action Description Parameters
list List all currently loaded tools β€”
add Add tools from package or file package, tool_names, tool_path
remove Remove tools by name tool_names
reload Reload specific tools or all tool_names (optional)

Examples

# List all tools
manage_tools(action="list")

# Add tools from a package
manage_tools(
    action="add",
    package="strands_fun_tools",
    tool_names="clipboard,screen_reader"
)

# Add tool from file
manage_tools(
    action="add",
    tool_path="./my_custom_tool.py"
)

# Remove tools
manage_tools(
    action="remove",
    tool_names="shell,editor"
)

# Reload specific tools
manage_tools(
    action="reload",
    tool_names="shell"
)

# Reload all (restarts agent)
manage_tools(action="reload")

πŸ™ Fetch from GitHub

Download and load tools directly from GitHub repositories.

# Fetch tool from GitHub
fetch_github_tool(
    github_url="https://github.com/cagataycali/devduck/blob/main/devduck/tools/websocket.py",
    tool_name="websocket"  # Optional, auto-detected from filename
)

# Tool is immediately available!
websocket(action="status")

Supported URL Formats

# All these work:
https://github.com/owner/repo/blob/main/tools/my_tool.py
https://github.com/owner/repo/tree/main/tools/my_tool.py  
https://raw.githubusercontent.com/owner/repo/main/tools/my_tool.py

πŸ“¦ Available Tool Packages

devduck.tools
system_prompt, store_in_kb, websocket, zenoh_peer, ipc, tcp, mcp_server, scraper, tray, ambient_mode, speech_to_speech, state_manager
devduck.tools:websocket,zenoh_peer
strands_tools
shell, editor, file_read, file_write, retrieve, use_agent, calculator, environment, mcp_client, speak, slack
strands_tools:shell,editor
strands_fun_tools
listen, cursor, clipboard, screen_reader, bluetooth, yolo_vision
strands_fun_tools:clipboard
strands_google
use_google, google_auth
strands_google:use_google

πŸ“ Tool Directory

Drop .py files in ./tools/ for instant availability.

# Create ./tools/my_tool.py
from strands import tool

@tool
def my_custom_tool(param: str) -> dict:
    """
    My custom tool description.
    
    Args:
        param: Input parameter
        
    Returns:
        Dict with status and content
    """
    return {
        "status": "success",
        "content": [{"text": f"Processed: {param}"}]
    }

# Save β†’ Tool is immediately available via hot-reload!

Disable Auto-Loading

# Disable loading from ./tools/ directory
export DEVDUCK_LOAD_TOOLS_FROM_DIR=false

✨ Features

πŸ“¦

Package Loading

Load tools from any installed Python package at runtime.

πŸ™

GitHub Fetch

Download and register tools directly from GitHub URLs.

πŸ“

Hot Directory

Drop .py files in ./tools/ for automatic loading.

πŸ”„

Runtime Management

Add, remove, and reload tools without restart.

βš™οΈ

Env Configuration

Configure startup tools via DEVDUCK_TOOLS variable.

πŸ”Œ

MCP Integration

Load tools from MCP servers via MCP_SERVERS variable.

πŸ“‹ DevDuck Tools Reference

Tool Description
system_prompt View, update, and sync system prompts
store_in_kb Store content in Bedrock Knowledge Base
websocket WebSocket server for real-time streaming
zenoh_peer P2P networking with auto-discovery
tcp TCP server for agent communication
ipc Unix socket IPC communication
mcp_server Expose DevDuck as MCP server
ambient_mode Control background thinking mode
speech_to_speech Voice interaction capabilities
fetch_github_tool Fetch tools from GitHub URLs