Skip to contents

Agent

Core agent class for agentic AI workflows

Agent
Agent R6 Class
AgentResult
Agent Result R6 Class
AgentEvent()
Create an agent event

Tools

Built-in tools and tool bundles

tool_ask_user()
AskUserQuestion tool
tool_list_files()
List files in a directory
tool_read_csv()
Read a CSV file
tool_read_file()
Read file contents
tool_run_bash()
Execute bash commands
tool_run_r_code()
Execute R code
tool_web_fetch()
Fetch web page content
tool_web_search()
Search the web
tool_write_file()
Write content to a file
tools_all()
All built-in tools
tools_code()
Code execution tools
tools_data()
Data reading tools
tools_file()
File operation tools
tools_interactive()
Tools for interactive workflows
tools_mcp()
Get tools from MCP servers
tools_preset()
Get a tool preset by name
tools_web()
Web tools
ToolPresets
Available tool preset names
list_presets()
List available tool presets
set_ask_user_callback()
Set callback for non-interactive user input

MCP Integration

Model Context Protocol server support

mcp_available()
Check if MCP support is available
mcp_servers()
List available MCP servers

Permissions

Control what agents can do

Permissions
Permissions R6 Class
PermissionMode
Permission modes for agent tool access
PermissionResultAllow()
Create an allow permission result
PermissionResultDeny()
Create a deny permission result
permissions_full()
Create a full access permission policy
permissions_readonly()
Create a read-only permission policy
permissions_standard()
Create a standard permission policy

Hooks

Intercept and customize agent behavior

HookMatcher
HookMatcher R6 Class
HookRegistry
HookRegistry R6 Class
HookEvent
Hook events supported by deputy
HookResultPostToolUse()
Create a PostToolUse hook result
HookResultPreCompact()
Create a PreCompact hook result
HookResultPreToolUse()
Create a PreToolUse hook result
HookResultSessionEnd()
Create a SessionEnd hook result
HookResultSessionStart()
Create a SessionStart hook result
HookResultStop()
Create a Stop hook result
HookResultSubagentStop()
Create a SubagentStop hook result
hook_block_dangerous_bash()
Create a hook that blocks dangerous bash commands
hook_limit_file_writes()
Create a hook that limits file writes to a directory
hook_log_tools()
Create a hook that logs all tool calls

Skills

Extend agents with specialized capabilities

Skill
Skill R6 Class
skill_load()
Load a skill from a directory
skill_create()
Create a skill programmatically
skills_list()
List available skills in a directory

Multi-Agent

Coordinate multiple specialized agents

LeadAgent
LeadAgent R6 Class
agent_definition()
Create an Agent Definition
agent_with_delegation()
Create a simple delegation agent

Errors

Error classes and constructors

deputy-errors DeputyError
Deputy Error Classes
is_deputy_error()
Check if an object is a deputy error
abort_budget_exceeded()
Abort with a budget exceeded error
abort_deputy()
Abort with a structured deputy error
abort_hook()
Abort with a hook error
abort_permission_denied()
Abort with a permission denied error
abort_provider()
Abort with a provider error
abort_session_load()
Abort with a session load error
abort_session_save()
Abort with a session save error
abort_tool_execution()
Abort with a tool execution error
abort_turn_limit()
Abort with a turn limit error