vizra/vizra-adk
Vizra ADK brings autonomous AI agents to Laravel: multi-model support (OpenAI/Anthropic/Gemini), tools, persistent memory, sub-agents, workflows, streaming responses, evaluation, and tracing—plus a Livewire dashboard for testing and monitoring.
fix: Streaming broken with Prism 0.99+ — API mismatch and state leak
fix:Return structured output - This pull request introduces support for structured output in agents, allowing them to return structured data when a schema is defined and the response includes structured content. If structured data is not available, agents will fall back to returning plain text, preserving backward compatibility. Comprehensive unit tests have been added to verify these behaviors.
Integration of new documentation
Media Generation Agents
ImageAgent and AudioAgent for generating images and audio directly from your agentsImageAgent::run('prompt')->quality('hd')->go()DelegateToMediaAgentTool allows LLM agents to delegate media tasksToolbox System
ToolboxInterfaceshouldIncludeTool()php artisan vizra:make:toolboxTool Chaining
pipe(), transform(), when(), and tap() methodsChainableToolInterface for tools with built-in chain supportToolChainResultLaravel Boost V2 Support
resources/boost/guidelines/core.blade.phpvizra-agent-creation - Agent patternsvizra-tool-creation - Tool developmentvizra-workflows - Workflow orchestrationvizra-memory - Memory and RAGvizra-evaluation - Testing frameworkAdd LLM usage aggregation and adjust agent output Normalize LLM usage reporting and add aggregation APIs. BaseLlmAgent now extracts promptTokens/completionTokens into input_tokens/output_tokens and computes total_tokens before ending spans. Tracer gained getUsageForSession, getUsageForTrace and getUsageDetails plus helper methods (aggregateUsage, emptyUsageResponse) to query spans, decode outputs and aggregate token counts, with safe handling when tracing is disabled or DB errors occur. Tests updated/added to cover session/trace aggregation, detailed breakdowns, disabled tracing and spans without usage data.
Bump prism to ^0.99.0 and update deps Increase prism-php/prism requirement to ^0.99.0 in composer.json and regenerate composer.lock (dependency bumps and metadata updated). Apply small changes to BaseLlmAgent and AgentManager to remain compatible with the updated dependency behavior/API. This brings bug fixes and compatibility improvements from the newer prism and related packages.
Update Livewire dependency to v4.0 and adjust related documentation
Add Meilisearch deletion to vector memory methods Updated the delete and deleteFromSource methods in VectorMemoryManager to also remove data from Meilisearch when that driver is used. This ensures consistency between the application's storage and the Meilisearch index.
Add macroable support Support Output Schemas on Agents
Add handling for Generator objects in Tracer Update event handling for Prism v0.92+ compatibility
PR #80 (e13b2e7) - Streaming Response Bug Fix
Fixed: Streaming text accumulation issues
PR #81 (126d2d5) - Dependency Update
Updated: Prism-php dependency version alignment
PR #82 (11ea505) - Vector Memory Search Improvements
Fixed: Vector memory search command
PR #69 (eecb5ab) - User ID Type Refactoring & Vector Memory Enhancements
Changed: User ID fields from integer to string/mixed type across the system
Added
Fixed
Changed
Improved
Add multi-tenant MCP config overrides support Implements per-tenant MCP server configuration overrides via AgentContext, enabling dynamic API keys and settings for multi-tenant scenarios. MCPClientManager is now bound as non-singleton for isolation, and context overrides are deep-merged with base config. Adds documentation and comprehensive tests for override logic and multi-tenant behavior.
Add SSE response parsing for HTTP MCP servers Some MCP servers (like Context7) return responses in Server-Sent Events (SSE) format instead of plain JSON. This commit adds support for parsing SSE responses while maintaining backward compatibility.
crease agent_messages.content column size to support large MCP to...
fix: Call afterLlmResponse hook for streaming responses
Add streaming state check in BaseLlmAgent BaseLlmAgent now checks for a 'streaming' state in the context and sets the streaming property accordingly. This allows agents to be configured for streaming behavior based on context state.
END
NED
Add HTTP transport support for MCP clients Introduces MCPHttpClient for HTTP/SSE transport and refactors MCPClientManager to support both STDIO and HTTP transports via MCPTransport enum. MCPClient is now deprecated in favor of MCPStdioClient, and a common MCPClientInterface is added. Configuration and tests are updated to support and verify HTTP transport functionality.
Persist user messages with images and documents Adds user messages, including images and documents, to the context for persistence after message preparation. This ensures that all relevant user input is retained for future reference.
Fixed issue where user ID wasn't assigned to session creation
Add configurable logging and global enable/disable support Introduces a HasLogging trait for unified, configurable logging across the package, with support for log levels and component-specific toggles. Adds a global 'enabled' flag to the config to allow disabling the entire package, and updates all relevant services, providers, and tools to respect these settings. Includes comprehensive tests for package disabling and logging behavior.
Remove duplicate user message addition in BaseLlmAgent Eliminates redundant addition of the user message with attachments in BaseLlmAgent, preventing duplicate user messages during execution. Adds unit tests to verify correct message deduplication and proper handling of conversation history and input.
Add embedder and semanticRatio to Meilisearch driver Introduces 'embedder' and 'semantic_ratio' configuration options for the Meilisearch vector driver. These are now included in search requests as part of the 'hybrid' parameter, and corresponding test coverage has been added.
Make MCPClient timeout configurable and add tests Changed MCPClient to use a dynamic timeout based on configuration, replacing the fixed maxAttempts value. Added unit tests to verify correct timeout handling and calculation for various scenarios.
Make web route prefix configurable Replaces the hardcoded 'vizra' route prefix with a value from the 'vizra-adk.routes.web.prefix' config, defaulting to 'vizra'. This allows customization of the route prefix via configuration.
Add support for OpenAI stateful responses
Update namespace conversion to use DIRECTORY_SEPARATOR for cross-platfor
Support array config for provider tools in BaseLlmAgent
Provider::OpenRouter enum directly in agent class properties caused authentication failures. The getProvider() method now properly handles both Provider enum instances and string values, allowing developers to use either approach.BaseLlmAgent to support both string values (e.g., 'openrouter') and Provider enum instances (e.g., Provider::OpenRouter)🚀 Enhanced Streaming Response Handling
📚 Laravel Boost Integration
🔧 Bug Fixes
Files Modified
Merge vizra-adk providers into prism config Adds logic to merge providers from the vizra-adk configuration into the prism.providers config array if any are present. This ensures that all relevant providers are registered in the prism configuration.
Optimize message persistence in StateManager Refactored StateManager to only insert new messages instead of deleting and reinserting all messages on each save. Added tests to verify message persistence, prevent duplicates, handle long histories, and ensure correct incremental saving across sessions.
Add tests for fileToClassName with Windows and Unix paths
Fix misplaced closing tag in trace-span partial
Enhanced afterLLmResponse Hook
New onToolException Hook
New Event Types
ToolCallFailed Event
Add OpenRouter provider support
encapsulate prims request creation as well as tool creation into their own methods
Bug fix: Refactor VectorMemoryStore command parameter structure
Add HTTP timeout config for LLM API requests Introduces 'http' configuration options in vizra-adk.php for controlling timeout and connection timeout for LLM API calls. BaseLlmAgent now applies these settings to Prism requests to prevent premature timeouts.
Provider Tool Support Added a providerTools property to BaseLlmAgent and a getProviderToolsForPrism() method to convert provider tool types to ProviderTool objects for use with Prism. [1] [2] Updated the agent execution flow to include provider tools in the Prism request if any are configured. Agent Configuration Improvements Made the maximum number of agent steps (maxSteps) configurable via a class property, instead of hardcoding the value. [1] [2] Conversation History Handling Simplified the retrieval of conversation history by always converting collections to arrays, improving reliability. Dependency Updates
dd CLAUDE.md and GitHub star prompt to install command
Added support for pseudo-terminal (PTY) mode and improved environment handling in MCPClient. Updated configuration to allow custom npx path and app directory access. Improved client connection management in MCPClientManager to handle stale clients and added use_pty option to server configs.
Enhances agent tracing to support sub-agent delegation with parent trace context preservation and restoration. Updates the chat interface UI to display sub-agent info, improves typing indicator and send button logic, and adds polling for running traces. Refactors prompt versioning to support Blade templates, and adds feature/browser tests for chat interface behaviors.
Introduces JudgeBuilder to enable fluent, agent-based assertion syntax in evaluations. Updates BaseEvaluation to expose judge() and make recordAssertion public. Adds comprehensive unit tests for JudgeBuilder and its integration with BaseEvaluation. Removes obsolete MCPMakeAgentCommand.
Corrects the logic for determining the 'days' value in AgentTraceCleanupCommand. Now, the command only uses the config default if the 'days' option is not provided, ensuring explicit zero values are respected.
Qdrant and in-memory vector drivers have been removed from configuration, validation, and setup logic. Only 'pgvector' and 'meilisearch' are now supported for vector storage. Also, AgentTraceCommand now includes 'input', 'output', and 'metadata' in span output.
Introduces AgentVectorProxy to simplify agent vector memory operations, making vector and RAG methods public and context-aware. Adds GeminiEmbeddingProvider for Google Gemini embeddings. Updates VectorMemoryManager and related tools/tests to use agent class instead of agent name, streamlining method signatures and usage. Enhances Meilisearch driver with fallback similarity calculation. Updates configuration for vector memory and RAG features.
Updates
Adds granular control over agent conversation history via new context strategy and filtering in BaseLlmAgent. Refactors Livewire ChatInterface to provide separate context state, session, and long-term memory data for improved UI display. Updates JSON viewer and chat interface Blade templates for better layout, scrolling, and modal handling. Renames attachment docs and updates README and example usage to use run() instead of ask()
vizra:install - Package setup and configurationvizra:make:agent - Generate new agent classesvizra:make:tool - Generate new tool classesvizra:make:eval - Generate new evaluation classesvizra:chat - Interactive chat interface with agentsvizra:eval - Run evaluation suitesNote: This project is currently in active development. Version numbers will be assigned once the initial stable release is ready.
How can I help you explore Laravel packages today?