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

# Dify

> Use TinyFish Web Agent as a tool in Dify AI workflows and agents

## Overview

The TinyFish Web Agent plugin for [Dify](https://dify.ai) lets you add AI-powered web automation to any Dify workflow or agent. Navigate websites, extract structured data, fill forms, and complete multi-step browser tasks — all using natural language.

## Setup

<Steps>
  <Step title="Install the plugin">
    On the Dify platform, go to the [Plugin Marketplace](https://docs.dify.ai/plugins/quick-start/install-plugins#marketplace) and install the **TinyFish Web Agent** tool.
  </Step>

  <Step title="Get your API key">
    Visit the [TinyFish Dashboard](https://agent.tinyfish.ai/api-keys) and generate an API key.
  </Step>

  <Step title="Authorize the plugin">
    In Dify, go to **Plugins > TinyFish Web Agent > To Authorize** and enter your API key.
  </Step>
</Steps>

## Available Tools

| Tool                       | Description                                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Run Synchronously**      | Execute browser automation and wait for the result in a single response.                              |
| **Run Asynchronously**     | Start browser automation and return a `run_id` immediately. Use with **Get Run** to poll for results. |
| **Run with SSE Streaming** | Execute browser automation with real-time progress updates via Server-Sent Events.                    |
| **List Runs**              | List previous automation runs, with optional status filtering and pagination.                         |
| **Get Run**                | Get detailed information about a specific automation run by its ID.                                   |

## Using in Workflows

1. Add TinyFish Web Agent's **Run Asynchronously** tool to your pipeline.
2. Configure input variables (URL and goal) in the tool's UI.
3. Run the pipeline to extract data from any web page.

## Using with Agents

1. Add all TinyFish Web Agent tools to your Agent app.
2. Prompt the Agent to perform web automations using natural language. The Agent will choose the appropriate tool automatically.

**Example prompts:**

* `"Extract the blog post titles and authors from https://example.com/blog"`
* `"Go to https://example.com/pricing and extract all plan names and prices"`
* `"List my recent automation runs that have completed"`

## API Tool Config (Manual Setup)

If you need to configure TinyFish as a custom API tool in Dify instead of using the plugin, use this endpoint and auth pattern:

```json theme={null}
{
  "url": "https://agent.tinyfish.ai/v1/automation/run",
  "method": "POST",
  "headers": {
    "X-API-Key": "<your_tinyfish_api_key>"
  },
  "body": {
    "url": "{url}",
    "goal": "{goal}"
  }
}
```

In Dify's custom tool configuration, set the authentication type to **API Key** with the header name `X-API-Key`.

## Resources

* [Dify Plugin Marketplace](https://docs.dify.ai/plugins/quick-start/install-plugins#marketplace)
* [TinyFish Web Agent API Docs](/quick-start)
* [GitHub: tinyfish-web-agent-integrations](https://github.com/tinyfish-io/tinyfish-web-agent-integrations)
