PHPackages                             wuhhh/field-agent - 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. wuhhh/field-agent

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

wuhhh/field-agent
=================

An intelligent Craft CMS plugin for AI-powered field generation, modification, and context-aware operations

v1.0.5-alpha(8mo ago)07[9 issues](https://github.com/wuhhh/field-agent/issues)proprietaryPHP

Since Aug 8Pushed 8mo agoCompare

[ Source](https://github.com/wuhhh/field-agent)[ Packagist](https://packagist.org/packages/wuhhh/field-agent)[ RSS](/packages/wuhhh-field-agent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Field Agent Plugin for Craft CMS
================================

[](#field-agent-plugin-for-craft-cms)

⚠️ **ALPHA SOFTWARE - USE WITH CAUTION** ⚠️

This plugin uses AI to generate Craft CMS fields, entry types, and sections from natural language prompts. The plugin supports all native Craft CMS field types (as of Craft 5.8 and including the new Content Block) as well as CKEditor fields.

**WARNING: This is an experimental plugin and you should not use it on production sites. Always backup your database before testing it.**

**Note: Rollback functionality currently only supports CREATE operations - field/entry type/section modifications and deletions cannot be rolled back.**

Alpha Installation
------------------

[](#alpha-installation)

This plugin is not yet available in the Craft Plugin Store. To install for testing:

```
composer require wuhhh/field-agent:v1.0.5-alpha
./craft plugin/install field-agent && ./craft plugin/enable field-agent
```

### Configuration Setup

[](#configuration-setup)

1. **Create config file** - Copy the plugin's config file to your project:

```
cp vendor/wuhhh/field-agent/config/field-agent.php config/field-agent.php
```

2. **Add API key** to `.env` (you only need one):

```
# For Anthropic Claude (default)
ANTHROPIC_API_KEY=sk-ant-your-key-here

# OR for OpenAI (optional)
OPENAI_API_KEY=sk-your-key-here
```

3. **Set default provider** in `config/field-agent.php` if desired:

```
'defaultProvider' => 'anthropic', // or 'openai'
```

Test your setup:

```
./craft field-agent/generator/test-llm
```

Basic Usage
-----------

[](#basic-usage)

The plugin analyzes your existing Craft setup and creates or modifies fields/entry types/sections based on natural language prompts.

**Main command:**

```
./craft field-agent/generator/prompt "your description here"
```

**Examples:**

```
# Create new structures
./craft field-agent/generator/prompt "Create a portfolio section with project fields"

# Modify existing structures
./craft field-agent/generator/prompt "Add author and featured image to blog posts"
```

The system will automatically:

- Analyse existing project structure
- Avoid naming conflicts with reserved Craft handles
- Reuse existing fields when appropriate
- Create fields, then entry types, then sections in proper order

Commands
--------

[](#commands)

### Generation

[](#generation)

```
# Main prompt command (uses your configured default provider)
./craft field-agent/generator/prompt "description" [--debug]

# Override provider for single command
./craft field-agent/generator/prompt "description" openai

# Debug mode (shows full AI request/response)
./craft field-agent/generator/prompt "description" --debug
```

### Operation Management

[](#operation-management)

```
# List all generation operations
./craft field-agent/generator/operations

# Rollback specific operation by ID
./craft field-agent/generator/rollback

# ⚠️ DESTRUCTIVE: Rollback ALL operations
./craft field-agent/generator/rollback-all

# Clean up old data
./craft field-agent/generator/prune-all --confirm=1
```

Troubleshooting
---------------

[](#troubleshooting)

### API Issues

[](#api-issues)

```
# Test your API connection
./craft field-agent/generator/test-llm --debug

# Check environment variables are loaded
./craft field-agent/generator/test-llm
```

### Common Problems

[](#common-problems)

- **401 errors:** Verify your API key is correct and has credits
- **Field conflicts:** System handles automatically, check operation history
- **Operation failures:** Use `--debug` mode to see detailed error information

### Debug Mode

[](#debug-mode)

Add `--debug` to see full AI request/response and operation details:

```
./craft field-agent/generator/prompt "create blog fields" --debug
```

What It Does
------------

[](#what-it-does)

This plugin generates Craft CMS fields, entry types, and sections using AI from natural language descriptions. It analyzes your existing Craft setup to avoid conflicts and reuse appropriate fields.

**Key capabilities:**

- Understands all native Craft fields plus CKEditor
- Modifies existing entry types without breaking content
- Avoids reserved Craft handles and suggests alternatives
- Creates related structures (category groups, tag groups) automatically
- Provides complete rollback of all operations

Alpha Testing Notes
-------------------

[](#alpha-testing-notes)

This is experimental software. It works well but may have edge cases. Please:

- Test on development sites only
- Backup your database before major operations
- Report issues at:
- Use `--debug` mode to understand what's happening

License
-------

[](#license)

Proprietary - Commercial plugin for Craft CMS

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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

Every ~1 days

Total

6

Last Release

269d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19ce4ad4e1209ff16384235e4f79ef5883ed783d2b355ee7d37e10816d79eb42?d=identicon)[wuhhh](/maintainers/wuhhh)

---

Top Contributors

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

---

Tags

aicraft-cmscraft-cms-plugincraft-plugincraftcmsllmaicmsCraftcraftcmscraft-pluginllmfield-agentfield-generation

### Embed Badge

![Health badge](/badges/wuhhh-field-agent/health.svg)

```
[![Health](https://phpackages.com/badges/wuhhh-field-agent/health.svg)](https://phpackages.com/packages/wuhhh-field-agent)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)

PHPackages © 2026

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