Skip to main content
This page explains the internal architecture of Vizra ADK, helping you understand how the various components interact to power your AI agents.

Package Structure

Core Components

Agent Hierarchy

BaseAgent defines the core contract - every agent must have a name, description, and implement execute(). BaseLlmAgent extends this with LLM-specific features: system prompts, tool registration, model selection, and conversation handling. BaseWorkflowAgent provides orchestration capabilities without LLM overhead - pure PHP logic for complex multi-agent coordination.

Service Container Bindings

Vizra ADK registers these singletons in Laravel’s service container: Access via dependency injection or the Agent facade:

Request Lifecycle

When you run an agent, here’s what happens:

AgentContext

AgentContext is the carrier object that flows through the entire execution:
It provides:
  • Session tracking - Links conversations across requests
  • State storage - Key-value store for execution data
  • Conversation history - Full message history for context
Tools receive the context and can read/write state:

Tool Execution Flow

When an LLM decides to call a tool:

Event System

Vizra ADK fires Laravel events at key points: Listen to these events for logging, analytics, or custom behavior:

Database Schema

Vizra ADK creates these tables:

LLM Integration

Vizra ADK uses Prism PHP for LLM communication:
Configure providers in config/vizra-adk.php:

Extending the Architecture

Custom Service Providers

Register custom services that integrate with Vizra ADK:

Custom Base Agents

Create your own base agent with shared behavior:

Next Steps