> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Tools to Recipes

> Step-by-step guide to adding and configuring tools in recipes

## How to Add Built-in Tools

<Steps>
  <Step title="List Available Tools">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai tools list
    ```
  </Step>

  <Step title="Add Tools to agents.yaml">
    ```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    # agents.yaml
    framework: praisonai
    topic: "{{task}}"

    roles:
      researcher:
        role: Research Agent
        goal: Research topics thoroughly
        tools:
          - internet_search
          - shell_tool
          - file_read_tool
        tasks:
          search_task:
            description: "Search for {{topic}}"
    ```
  </Step>

  <Step title="Run Recipe">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe run ./my-recipe --var topic="AI agents"
    ```
  </Step>
</Steps>

## How to Add Custom Tools via tools.py

<Steps>
  <Step title="Create tools.py in Recipe Directory">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    # tools.py
    def my_custom_tool(query: str) -> str:
        """Custom tool that processes a query.
        
        Args:
            query: The input query to process
            
        Returns:
            Processed result as string
        """
        return f"Processed: {query}"

    def another_tool(data: str) -> dict:
        """Another custom tool.
        
        Args:
            data: Input data
            
        Returns:
            Dictionary with results
        """
        return {"result": data, "status": "success"}
    ```
  </Step>

  <Step title="Reference in agents.yaml">
    ```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    roles:
      processor:
        role: Data Processor
        tools:
          - my_custom_tool
          - another_tool
        tasks:
          process_task:
            description: "Process the data"
    ```
  </Step>

  <Step title="Run Recipe">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe run ./my-recipe
    ```
  </Step>
</Steps>

## Tool Resolution Order

| Priority | Source     | Description                    |
| -------- | ---------- | ------------------------------ |
| 1        | `tools.py` | Recipe-local tools.py          |
| 2        | Built-in   | praisonaiagents built-in tools |
| 3        | Package    | `praisonai_tools` package      |
