Release Notes - v1.18.0
Major Changes
Capability-Based Agent Architecture
Overhaul of the Agent system with a modular, capability-based design:UseBash- Execute shell commands with configurable policiesUseFileTools- Read, write, edit, search, and list filesUseSkills- Manage reusable skill librariesUseTaskPlanning- Multi-step task management with TodoWriteToolUseMetadataTools- Agent scratchpad for inter-tool data sharingUseStructuredOutputs- LLM-powered structured data extractionUseSubagents- Recursive agent spawning with AgentRegistryUseSelfCritique- Self-evaluation of agent work
HTTP Client Resilience Framework
New middleware for robust HTTP communication:- Exponential backoff with configurable jitter strategies
- Respects
Retry-Afterheaders - Circuit breaker pattern (closed → open → half-open → closed)
- Per-host circuit tracking
- Idempotency keys for safe retries
Inference Retry
Smart retry logic for LLM inference requests:- Automatic retry on rate limits and transient errors
- Length limit recovery (retry with “Continue.” prompt or increased max_tokens)
- Provider-specific error classification with typed exceptions
Driver Capabilities System
Explicit capability declarations for all LLM providers:- Output modes (JSON Schema, Tools, MdJson, Text)
- Streaming
- Tool/function calling
- Native JSON schema mode
New Features
Agent Registry & Specifications
Declarative agent definitions with registry-based discovery:Agent State Serialization
Efficient state persistence for distributed/resumable agents:Deterministic Agent Testing
Test agents without LLM calls:Real-time Agent Event Broadcasting
Broadcast agent events via Laravel Reverb/Pusher:Message Collection Classes
New collection abstractions for messages:Centralized Input Handling
Unified factories for content and message creation:Provider Error Classification
Typed exceptions for better error handling:MockSandbox for Testing
Mock command execution in tests:Improvements
Agent System
- Sophisticated continuation logic with priority-based resolution
- Enhanced error handling with granular
ErrorPolicyconfiguration - State processors integrated into capability installation
- Tools can access agent state via
CanAccessAgentStatecontract - Improved
ToolCallingDriverwith better parallelization
Messages Package
Content,Messages,Sections,Sectionnow implementCountableandIteratorAggregateMessageStoreuses standardMetadataclass instead of custom parameters- Cleaner API with
partsList()andmessageList()methods
Polyglot Package
- Response adapters simplified (tool calls handled separately from content)
- Better handling of empty content parts
AnthropicBodyFormatupdated for new message structure
Evals Package
- Driver capability filtering for test cases
- Dependency injection support for test mocking
Instructor Package
- Simplified
MessageStoreoperations using new merge/cleanup methods - Enhanced array return handling respects
defaultToStdClass()config
Breaking Changes
Agent Namespace Reorganization
Core classes moved fromAgent/ to Agent/Core/:
Agent/Data/AgentState→Agent/Core/Data/AgentStateAgent/Collections/→Agent/Core/Collections/Agent/Contracts/→Agent/Core/Contracts/
Agent Construction
OldAgentFactory removed. Use AgentBuilder:
Messages API Deprecations
Content::parts()→ useContent::partsList()Messages::head()→ useMessages::headList()Messages::tail()→ useMessages::tailList()Messages::all()→ useMessages::messageList()
MessageStore Parameters
MessageStoreParameters class removed. Use Metadata instead:
Driver Capabilities Interface
Drivers must implement newcapabilities() method:
Provider Exceptions
HTTP errors now throw typedProviderException subclasses instead of generic exceptions.
Bug Fixes
- Fixed variadic parameter type handling in
StructureFactoryfor mixed/null types - Fixed PHP 8.5 compatibility issues with reflection API
- Fixed Gemini response adapter content concatenation
- Fixed contentParts() returning collection instead of array in templates
- Updated Symfony Console API calls (
add()→addCommand())