v1.2.0 - Agent Template/Starter Project System π¨
Agent Template/Starter Project System v1.2.0
A comprehensive template system inspired by Langflow, providing 22 ready-to-use agent templates with advanced search, instant instantiation, and full documentation.
π¨ What's New
Core Template System
- TemplateManager - Central hub for template operations with advanced search
- Template - Rich entity with validation, metadata, and multiple serialization formats
- TemplateLoader - Multi-format loading (JSON + PHP) with performance caching
- TemplateInstantiator - Convert templates to live agents with configuration overrides
- TemplateExporter - Export agents as reusable templates in JSON or PHP
22 Ready-to-Use Templates
Basic Agents (5)
- π€ Basic Agent - Simple agent for learning
- π ReAct Agent - Reason-Act-Observe pattern
- π§ Chain-of-Thought Agent - Step-by-step reasoning
- β‘ Reflex Agent - Rule-based responses
- πΊοΈ Model-Based Agent - State-aware decisions
Advanced Agents (5)
- πͺ Reflection Agent - Self-improvement loop
- π Plan-Execute Agent - Multi-step planning
- π³ Tree-of-Thoughts Agent - Exploration and branching
- βοΈ MAKER Agent - Million-step reliable tasks
- π― Adaptive Agent - Intelligent agent selection
Specialized (5)
- π Hierarchical Agent - Master-worker pattern
- π Coordinator Agent - Multi-agent orchestration
- π¬ Dialog Agent - Conversational AI
- π― Intent Classifier - Intent recognition
- π Monitoring Agent - System monitoring
RAG & Knowledge (3)
- π RAG Agent - Document retrieval and QA
- π§ Memory Chatbot - Persistent conversations
- ποΈ Knowledge Manager - Knowledge management
Workflows (2)
- π Sequential Tasks - Multi-step workflows
- π£οΈ Debate System - Multi-agent debate
Production (2)
- π Production Agent - Enterprise-ready
- β‘ Async Batch Processor - Concurrent processing
π Quick Start
use ClaudeAgents\Templates\TemplateManager;
// Search templates
$templates = TemplateManager::search(
query: 'chatbot',
tags: ['conversation']
);
// Instantiate agent
$agent = TemplateManager::instantiate('Dialog Agent', [
'api_key' => getenv('ANTHROPIC_API_KEY')
]);
// Run agent
$result = $agent->run('Hello!');π Features
- π Advanced Search - Find templates by name, tags, category, or difficulty
- π¦ Instant Instantiation - Create agents with one line of code
- πΎ Custom Templates - Export your agents as reusable templates
- π·οΈ Smart Organization - 6 categories, 75 unique tags, 3 difficulty levels
- π Rich Metadata - Use cases, requirements, setup time estimates
- β Full Validation - Template and configuration validation
- β‘ Performance - Caching for fast repeated access
π Documentation
- Template System Guide - Complete usage guide (600+ lines)
- Template Catalog - All templates documented (1,200+ lines)
- Creating Templates - Template creation guide (900+ lines)
π‘ Examples
Production Examples (7 files)
examples/templates/01-basic-usage.php- Loading and listingexamples/templates/02-search-filter.php- Advanced searchexamples/templates/03-instantiate.php- Creating agentsexamples/templates/04-custom-template.php- Exporting templatesexamples/templates/05-categories-tags.php- Browsing catalogexamples/templates/06-template-metadata.php- Metadata usageexamples/templates/07-production-patterns.php- Production patterns
Progressive Tutorial Series (7 files)
examples/tutorials/templates-system/01-discovering-templates.phpexamples/tutorials/templates-system/02-instantiating-agents.phpexamples/tutorials/templates-system/03-template-metadata.phpexamples/tutorials/templates-system/04-advanced-search.phpexamples/tutorials/templates-system/05-creating-templates.phpexamples/tutorials/templates-system/06-template-collections.phpexamples/tutorials/templates-system/07-production-integration.php
π§ͺ Testing
68 Tests, 463 Assertions - 100% Passing β
- 60 Unit Tests - Core functionality
- 8 Feature Tests - Complete workflows
- 8 Integration Tests - Real API validation
All templates tested with live Anthropic API calls.
π¦ Installation
composer require claude-php/agentTemplates are included automatically. No additional setup required.
π Upgrade Path
No breaking changes. The template system is a new feature that doesn't affect existing code.
π Statistics
- New Code: 1,426 lines (core system)
- Templates: 22 JSON files
- Examples: 14 files (~4,800 lines)
- Tests: 68 tests (1,215 lines)
- Documentation: 2,141+ lines
- Total Deliverable: ~10,382 lines
π Acknowledgments
Inspired by Langflow's template and starter project system.
Full Changelog: See CHANGELOG.md for complete details.