🛠️ Tools Reference

Code Puppy agents use tools to interact with your system. Each agent has access to a specific set of tools based on its purpose.

💡 Tip

Use /tools to see what tools are available to the current agent.

📁 File Operations

Tools for reading, writing, and managing files.

list_files(directory=".", recursive=True)

List files and directories with intelligent filtering. Automatically ignores common build artifacts and cache directories.

Parameters:

  • directory - Path to list (default: current directory)
  • recursive - Whether to list subdirectories (default: True)
read_file(file_path, start_line=None, num_lines=None)

Read file contents with optional line-range selection for handling large files.

Parameters:

  • file_path - Path to the file to read
  • start_line - Starting line number (1-based, optional)
  • num_lines - Number of lines to read (optional)
edit_file(payload)

Comprehensive file editing supporting multiple strategies:

  • ContentPayload - Create or overwrite a file with content
  • ReplacementsPayload - Targeted text replacements
  • DeleteSnippetPayload - Remove specific text snippets
delete_file(file_path)

Safely delete a file with automatic diff generation showing what was removed.

grep(search_string, directory=".")

Recursively search for text patterns using ripgrep. Supports regex and various flags.

Parameters:

  • search_string - Pattern to search for (supports rg flags)
  • directory - Root directory for search (default: current)

Detailed file operations guide →

💻 System Operations

Tools for executing commands and interacting with the system.

agent_run_shell_command(command, cwd=None, timeout=60)

Execute a shell command with streaming output, timeout handling, and safety confirmations.

Parameters:

  • command - The shell command to execute
  • cwd - Working directory (optional)
  • timeout - Inactivity timeout in seconds (default: 60)

Returns: success, stdout, stderr, exit_code, execution_time

🤖 Agent Operations

Tools for agent reasoning and sub-agent invocation.

agent_share_your_reasoning(reasoning, next_steps=None)

Share the agent's current thought process and planned actions. Essential for transparency and debugging.

Parameters:

  • reasoning - Current thought process and analysis
  • next_steps - Planned upcoming actions (optional)
list_agents()

List all available agents that can be invoked.

invoke_agent(agent_name, prompt, session_id=None)

Invoke a specific sub-agent with a given prompt. Useful for delegating specialized tasks.

Parameters:

  • agent_name - Name of the agent to invoke
  • prompt - The prompt to send to the agent
  • session_id - Optional session ID for conversation memory

🌐 Browser Automation Tools

Available to the qa-kitten agent for browser automation.

🐱 QA Kitten Only

These tools are only available when using the qa-kitten agent. Switch with /agent qa-kitten.

Browser Control

Navigation

Interactions

Element Location

Visual

Full browser tools reference →

Tools by Agent

Agent Tools
code-puppy All file ops, shell, grep, agent tools
planning-agent File ops, reasoning tools
code-reviewer File ops, grep, reasoning
qa-kitten All above + 30+ browser tools
agent-creator File ops (for creating agent configs)