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

# Neuron AI

> Search the web and read pages as Markdown from Neuron AI agents in PHP

<Note>
  **Official Neuron AI docs:** [docs.neuron-ai.dev/agent/tools](https://docs.neuron-ai.dev/agent/tools)

  Give PHP agents web search and page reading through Firecrawl
</Note>

## Overview

[Neuron AI](https://neuron-ai.dev) is an agentic framework for PHP. It ships a Firecrawl toolkit, so a Neuron agent can search the web and read any page as clean Markdown during a run.

## Quick start

1. Install Neuron AI 4.1.3 or later:

```bash theme={null}
composer require neuron-core/neuron-ai:^4.1.3
```

2. Get an API key from your [Firecrawl dashboard](https://www.firecrawl.dev/app/api-keys) and set it as `FIRECRAWL_API_KEY`
3. Add the toolkit to your agent:

```php theme={null}
namespace App\Neuron;

use NeuronAI\Agent\Agent;
use NeuronAI\Tools\Toolkits\Firecrawl\FirecrawlToolkit;

class ResearchAgent extends Agent
{
    ...

    protected function tools(): array
    {
        return [
            FirecrawlToolkit::make(
                key: getenv('FIRECRAWL_API_KEY')
            ),
        ];
    }
}
```

## Tools

| Tool | Name the agent sees | What it does |
| - | - | - |
| `FirecrawlSearchTool` | `web_search` | Searches the web, or news when the agent asks for it, with an optional time range |
| `FirecrawlScrapeTool` | `url_reader` | Returns the main content of a page as Markdown |

You can also add either tool on its own, for example `FirecrawlSearchTool::make(key: getenv('FIRECRAWL_API_KEY'))`.

## Get page content with each search result

By default a search returns the title, URL and description of each result. Pass `scrapeOptions` and each result also carries the full page as Markdown, so the agent does not need a second call to read it:

```php theme={null}
use NeuronAI\Tools\Toolkits\Firecrawl\FirecrawlSearchTool;

FirecrawlSearchTool::make(key: getenv('FIRECRAWL_API_KEY'))->withOptions([
    'limit' => 5,
    'scrapeOptions' => [
        'formats' => ['markdown'],
        'onlyMainContent' => true,
    ],
]);
```

`withOptions()` replaces the defaults and accepts any [search parameter](/api-reference/endpoint/search). The search query always comes from the agent.

## Resources

* [Neuron AI tools and toolkits](https://docs.neuron-ai.dev/agent/tools)
* [Firecrawl search docs](/features/search)
* [Firecrawl scrape docs](/features/scrape)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.