Skip to content

v1.2.0 - Agent Template/Starter Project System 🎨

Choose a tag to compare

@dalehurley dalehurley released this 04 Feb 00:23
· 14 commits to master since this release

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

πŸ’‘ Examples

Production Examples (7 files)

  • examples/templates/01-basic-usage.php - Loading and listing
  • examples/templates/02-search-filter.php - Advanced search
  • examples/templates/03-instantiate.php - Creating agents
  • examples/templates/04-custom-template.php - Exporting templates
  • examples/templates/05-categories-tags.php - Browsing catalog
  • examples/templates/06-template-metadata.php - Metadata usage
  • examples/templates/07-production-patterns.php - Production patterns

Progressive Tutorial Series (7 files)

  • examples/tutorials/templates-system/01-discovering-templates.php
  • examples/tutorials/templates-system/02-instantiating-agents.php
  • examples/tutorials/templates-system/03-template-metadata.php
  • examples/tutorials/templates-system/04-advanced-search.php
  • examples/tutorials/templates-system/05-creating-templates.php
  • examples/tutorials/templates-system/06-template-collections.php
  • examples/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/agent

Templates 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.