Runtime tool management and loading
Load tools from Python packages, fetch from GitHub, or drop files in ./tools/. No restart needed. Full Python ecosystem access.
Configure which tools load at startup via DEVDUCK_TOOLS environment variable.
# Format: package1:tool1,tool2;package2:tool3,tool4
export DEVDUCK_TOOLS="strands_tools:shell,editor;devduck.tools:system_prompt,websocket"
devduck
# Default tools loaded:
devduck.tools:system_prompt,store_in_kb,websocket,zenoh_peer
strands_tools:retrieve,shell,file_read,file_write,editor,use_agent
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) |
# 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")
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")
# 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
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 loading from ./tools/ directory
export DEVDUCK_LOAD_TOOLS_FROM_DIR=false
Load tools from any installed Python package at runtime.
Download and register tools directly from GitHub URLs.
Drop .py files in ./tools/ for automatic loading.
Add, remove, and reload tools without restart.
Configure startup tools via DEVDUCK_TOOLS variable.
Load tools from MCP servers via MCP_SERVERS variable.
| 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 |