PHPackages                             datashaman/laravel-agent-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. datashaman/laravel-agent-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

datashaman/laravel-agent-tools
==============================

Claude Code-equivalent tools for laravel/ai agents. Filesystem, shell, task management, and tool discovery.

v0.1.0(3mo ago)10MITPHPPHP ^8.3

Since Mar 25Pushed 3mo agoCompare

[ Source](https://github.com/datashaman/laravel-agent-tools)[ Packagist](https://packagist.org/packages/datashaman/laravel-agent-tools)[ RSS](/packages/datashaman-laravel-agent-tools/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

Laravel Agent Tools
===================

[](#laravel-agent-tools)

Claude Code-equivalent tools for [laravel/ai](https://github.com/laravel/ai) agents. Filesystem, shell, task management, and tool discovery.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12+ or 13+
- `laravel/ai` ^0.3

Installation
------------

[](#installation)

```
composer require datashaman/laravel-agent-tools
```

The service provider is auto-discovered. To publish the config:

```
php artisan vendor:publish --tag=laravel-agent-config
```

For the database task store, publish and run the migration:

```
php artisan vendor:publish --tag=laravel-agent-migrations
php artisan migrate
```

Tools
-----

[](#tools)

### Filesystem

[](#filesystem)

ToolDescription`ReadFile`Read file contents with line numbers, offset/limit, binary detection`WriteFile`Create or overwrite files with automatic parent directory creation`EditFile`Exact string replacement with uniqueness validation and fuzzy-match error suggestions`GlobFiles`Find files by glob pattern, sorted by modification time`GrepFiles`Search file contents with regex, multiple output modes, context lines, filtering### Execution

[](#execution)

ToolDescription`RunCommand`Execute shell commands with sync, async, or queued modes. Supports timeout, idle timeout, and command allow/deny lists### Task Management

[](#task-management)

ToolDescription`TaskCreate`Create a new task`TaskGet`Retrieve task details by ID`TaskList`List tasks with optional status filtering`TaskOutput`Get output from a background task`TaskStop`Kill a running background task`TaskUpdate`Update task properties or delete a task`TodoWrite`Batch-manage the full task list (sugar over individual task tools)### Meta

[](#meta)

ToolDescription`ToolSearch`Discover and load deferred tools from a `ToolRegistry`Usage
-----

[](#usage)

All tools implement `Laravel\Ai\Contracts\Tool` and work with any `laravel/ai` agent:

```
use DataShaman\LaravelAgent\Tools\Filesystem\ReadFile;
use DataShaman\LaravelAgent\Tools\Filesystem\WriteFile;
use DataShaman\LaravelAgent\Tools\Filesystem\EditFile;
use DataShaman\LaravelAgent\Tools\Filesystem\GlobFiles;
use DataShaman\LaravelAgent\Tools\Filesystem\GrepFiles;
use DataShaman\LaravelAgent\Tools\Execution\RunCommand;
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Contracts\HasTools;
use Laravel\Ai\Promptable;

class CodeAssistant implements Agent, HasTools
{
    use Promptable;

    public function __construct(
        private string $projectPath,
    ) {}

    public function instructions(): string
    {
        return 'You are a code assistant with full filesystem and shell access.';
    }

    public function tools(): iterable
    {
        return [
            new ReadFile(basePath: $this->projectPath),
            new WriteFile(basePath: $this->projectPath),
            new EditFile(basePath: $this->projectPath),
            new GlobFiles(basePath: $this->projectPath),
            new GrepFiles(basePath: $this->projectPath),
            new RunCommand(
                basePath: $this->projectPath,
                timeout: 30,
                allow: ['git *', 'composer *', 'php *'],
                deny: ['rm -rf *', 'sudo *'],
            ),
        ];
    }
}
```

### Task Management

[](#task-management-1)

```
use DataShaman\LaravelAgent\Support\InMemoryTaskStore;
use DataShaman\LaravelAgent\Tools\Tasks\TaskCreate;
use DataShaman\LaravelAgent\Tools\Tasks\TaskList;
use DataShaman\LaravelAgent\Tools\Tasks\TaskUpdate;

$store = new InMemoryTaskStore;

$tools = [
    new TaskCreate($store),
    new TaskList($store),
    new TaskUpdate($store),
    // ... other tools
];
```

### Tool Discovery

[](#tool-discovery)

Start with a minimal tool set and let the agent discover more at runtime:

```
use DataShaman\LaravelAgent\Support\ToolRegistry;
use DataShaman\LaravelAgent\Tools\Meta\ToolSearch;

$registry = new ToolRegistry([
    new ReadFile(basePath: $path),
    new WriteFile(basePath: $path),
    new EditFile(basePath: $path),
    new GlobFiles(basePath: $path),
    new GrepFiles(basePath: $path),
    new RunCommand(basePath: $path),
]);

// Agent starts with just ReadFile, GlobFiles, and ToolSearch
$tools = [
    new ReadFile(basePath: $path),
    new GlobFiles(basePath: $path),
    new ToolSearch($registry),
];
```

### Background Commands

[](#background-commands)

```
use DataShaman\LaravelAgent\Support\InMemoryTaskStore;
use DataShaman\LaravelAgent\Support\ProcessManager;
use DataShaman\LaravelAgent\Tools\Execution\RunCommand;

$store = new InMemoryTaskStore;
$processManager = new ProcessManager($store);

// Async: background process via Laravel Process::start()
$tool = new RunCommand(
    basePath: $path,
    executor: 'async',
    taskStore: $store,
    processManager: $processManager,
);

// Queued: dispatched as a Laravel job
$tool = new RunCommand(
    basePath: $path,
    executor: 'queued',
    taskStore: $store,
);
```

Configuration
-------------

[](#configuration)

All tools are configured via constructor parameters. No global config required.

The `config/laravel-agent.php` file provides defaults for the service provider bindings:

KeyDefaultDescription`task_store``memory`Task store driver: `memory`, `cache`, `database``executor``async`RunCommand background executor: `sync`, `async`, `queued``cache.store``null`Cache store for CacheTaskStore`cache.prefix``laravel-agent:tasks:`Cache key prefix`cache.ttl``3600`Cache TTL in seconds`database.connection``null`Database connection for DatabaseTaskStore`database.table``agent_tasks`Table name for DatabaseTaskStoreSandboxing
----------

[](#sandboxing)

All filesystem and execution tools accept a `basePath` parameter that restricts operations to that directory. Paths outside `basePath` are rejected.

RunCommand additionally supports `allow` and `deny` glob patterns for command filtering. Deny takes precedence over allow.

Custom Descriptions
-------------------

[](#custom-descriptions)

Every tool ships with Claude Code-quality descriptions that guide LLM behavior. Override them per-instance:

```
new EditFile(
    basePath: $path,
    description: 'Edit files. No restrictions.',
)
```

Testing
-------

[](#testing)

```
composer test
```

Or directly:

```
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance82

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48372fbab9c5059c6d5773bb3d42dff0382443ceb65d008fc219ad38a383eafd?d=identicon)[datashaman](/maintainers/datashaman)

---

Top Contributors

[![datashaman](https://avatars.githubusercontent.com/u/59514?v=4)](https://github.com/datashaman "datashaman (7 commits)")

---

Tags

agentaiclaudelaravellaravel-packagellmphptoolslaravelaiAgenttoolsclaude

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/datashaman-laravel-agent-tools/health.svg)

```
[![Health](https://phpackages.com/badges/datashaman-laravel-agent-tools/health.svg)](https://phpackages.com/packages/datashaman-laravel-agent-tools)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

9782.1M161](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[illuminate/session

The Illuminate Session package.

9938.5M821](/packages/illuminate-session)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40140.4k2](/packages/erlandmuchasaj-laravel-gzip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
