Files

1 line
109 KiB
JSON

{"repo": "alidaaer/laravel-ai-agent", "files": {"src/Drivers/DeepSeekDriver.php": {"1d7b32f961c0e5ccc47efa345ffcd9e9b967d5f7": {"t": 1785746141.4317598, "n": 842, "h": "588651d69492871a", "c": "<?php\n\nnamespace LaravelAIAgent\\Drivers;\n\n/**\n * DeepSeek Driver\n * \n * DeepSeek API is fully OpenAI-compatible, so we extend OpenAIDriver\n * and only override the constructor and name.\n * \n * Supports: deepseek-chat, deepseek-reasoner (R1)\n */\nclass DeepSeekDriver extends OpenAIDriver\n{\n public function __construct()\n {\n $config = config('ai-agent.drivers.deepseek');\n \n $this->apiKey = $config['api_key'] ?? '';\n $this->model = $config['model'] ?? 'deepseek-chat';\n $this->baseUrl = $config['base_url'] ?? 'https://api.deepseek.com/v1';\n $this->timeout = $config['timeout'] ?? 60;\n $this->maxRetries = $config['retry']['times'] ?? 3;\n $this->retryDelay = $config['retry']['sleep'] ?? 1000;\n }\n\n public function getName(): string\n {\n return 'deepseek';\n }\n}\n"}, "5051dea87cd2bee92c8badd00b17718ae0f62824": {"t": 1785760126.2879167, "n": 842, "h": "588651d69492871a", "c": "<?php\n\nnamespace LaravelAIAgent\\Drivers;\n\n/**\n * DeepSeek Driver\n * \n * DeepSeek API is fully OpenAI-compatible, so we extend OpenAIDriver\n * and only override the constructor and name.\n * \n * Supports: deepseek-chat, deepseek-reasoner (R1)\n */\nclass DeepSeekDriver extends OpenAIDriver\n{\n public function __construct()\n {\n $config = config('ai-agent.drivers.deepseek');\n \n $this->apiKey = $config['api_key'] ?? '';\n $this->model = $config['model'] ?? 'deepseek-chat';\n $this->baseUrl = $config['base_url'] ?? 'https://api.deepseek.com/v1';\n $this->timeout = $config['timeout'] ?? 60;\n $this->maxRetries = $config['retry']['times'] ?? 3;\n $this->retryDelay = $config['retry']['sleep'] ?? 1000;\n }\n\n public function getName(): string\n {\n return 'deepseek';\n }\n}\n"}}, "config/ai-agent.php": {"1d7b32f961c0e5ccc47efa345ffcd9e9b967d5f7": {"t": 1785746144.7704527, "n": 9504, "h": "c92c0ada09c9a02a", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DRIVER', 'openai'),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', true),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENAI_MODEL', env('AI_AGENT_MODEL','gpt-4o-mini')),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('ANTHROPIC_MODEL', env('AI_AGENT_MODEL','claude-3-5-sonnet-20241022')),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('GEMINI_MODEL', env('AI_AGENT_MODEL','gemini-2.5-flash')),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('DEEPSEEK_MODEL', env('AI_AGENT_MODEL','deepseek-chat')),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENROUTER_MODEL', env('AI_AGENT_MODEL','openai/gpt-4o-mini')),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // Register class-based agents here. Each agent gets its own routes automatically.\n // All configuration (instructions, tools, middleware, widget) lives in the class itself.\n //\n // \\App\\AI\\Agents\\ShopAgent::class,\n // \\App\\AI\\Agents\\AdminAgent::class,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n //you can use like app_path('Services') to scope discovery to a specific folder,\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'database'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 20,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'lang' => 'en', // 'en' | 'ar' | 'fr' | 'es' | 'zh'\n 'rtl' => false,\n 'primary_color' => '#2d81ff',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => 'Hello, I am your AI assistant.',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => 'You are a helpful assistant.',\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 10,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Performance Configuration\n |--------------------------------------------------------------------------\n |\n | Settings to tune the performance of the AI agent.\n |\n */\n 'performance' => [\n // Delay between loop iterations in milliseconds (0 = no delay)\n // Set to 300 for Gemini or other rate-limited APIs\n 'loop_delay_ms' => env('AI_AGENT_LOOP_DELAY', 0),\n ],\n];\n\n"}, "9bf2d99197e2e4f61e14b471b4a2e115b2db9ae5": {"t": 1785760126.0691738, "n": 9504, "h": "c92c0ada09c9a02a", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DRIVER', 'openai'),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', true),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENAI_MODEL', env('AI_AGENT_MODEL','gpt-4o-mini')),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('ANTHROPIC_MODEL', env('AI_AGENT_MODEL','claude-3-5-sonnet-20241022')),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('GEMINI_MODEL', env('AI_AGENT_MODEL','gemini-2.5-flash')),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('DEEPSEEK_MODEL', env('AI_AGENT_MODEL','deepseek-chat')),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENROUTER_MODEL', env('AI_AGENT_MODEL','openai/gpt-4o-mini')),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // Register class-based agents here. Each agent gets its own routes automatically.\n // All configuration (instructions, tools, middleware, widget) lives in the class itself.\n //\n // \\App\\AI\\Agents\\ShopAgent::class,\n // \\App\\AI\\Agents\\AdminAgent::class,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n //you can use like app_path('Services') to scope discovery to a specific folder,\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'database'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 20,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'lang' => 'en', // 'en' | 'ar' | 'fr' | 'es' | 'zh'\n 'rtl' => false,\n 'primary_color' => '#2d81ff',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => 'Hello, I am your AI assistant.',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => 'You are a helpful assistant.',\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 10,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Performance Configuration\n |--------------------------------------------------------------------------\n |\n | Settings to tune the performance of the AI agent.\n |\n */\n 'performance' => [\n // Delay between loop iterations in milliseconds (0 = no delay)\n // Set to 300 for Gemini or other rate-limited APIs\n 'loop_delay_ms' => env('AI_AGENT_LOOP_DELAY', 0),\n ],\n];\n\n"}, "d8a802068559d042f13ce1e8c8dcf75d313ea428": {"t": 1785760127.4655683, "n": 9690, "h": "65cc48962206d9e0", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DRIVER', 'openai'),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENAI_MODEL', env('AI_AGENT_MODEL','gpt-4o-mini')),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('ANTHROPIC_MODEL', env('AI_AGENT_MODEL','claude-3-5-sonnet-20241022')),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', env('AI_AGENT_MODEL','llama3')),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('GEMINI_MODEL', env('AI_AGENT_MODEL','gemini-2.5-flash')),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('DEEPSEEK_MODEL', env('AI_AGENT_MODEL','deepseek-chat')),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY',env('AI_AGENT_API_KEY')),\n 'model' => env('OPENROUTER_MODEL', env('AI_AGENT_MODEL','openai/gpt-4o-mini')),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // Register class-based agents here. Each agent gets its own routes automatically.\n // All configuration (instructions, tools, middleware, widget) lives in the class itself.\n //\n // \\App\\AI\\Agents\\ShopAgent::class,\n // \\App\\AI\\Agents\\AdminAgent::class,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n //you can use like app_path('Services') to scope discovery to a specific folder,\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'database'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 20,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'lang' => 'en', // 'en' | 'ar' | 'fr' | 'es' | 'zh'\n 'rtl' => false,\n 'primary_color' => '#2d81ff',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => 'Hello, I am your AI assistant.',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => 'You are a helpful assistant.',\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 10,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n /*\n |--------------------------------------------------------------------------\n | Performance Configuration\n |--------------------------------------------------------------------------\n |\n | Settings to tune the performance of the AI agent.\n |\n */\n 'performance' => [\n // Delay between loop iterations in milliseconds (0 = no delay)\n // Set to 300 for Gemini or other rate-limited APIs\n 'loop_delay_ms' => env('AI_AGENT_LOOP_DELAY', 0),\n ],\n];\n\n"}, "524ebf4b73c540c56e160c8cbca89451d465e97a": {"t": 1785760128.77515, "n": 11701, "h": "2b7214015d323cd5", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY'),\n 'model' => env('DEEPSEEK_MODEL', 'deepseek-chat'),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // Register class-based agents here. Each agent gets its own routes automatically.\n // All configuration (instructions, tools, middleware, widget) lives in the class itself.\n //\n // \\App\\AI\\Agents\\ShopAssistant::class,\n // \\App\\AI\\Agents\\AdminAgent::class,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Tool Usage Rules (STRICT):\n1. You may ONLY use tools that are explicitly provided to you in the tool definitions\n2. If a user requests an action and no matching tool exists, you MUST politely decline and explain that this functionality is not available\n3. NEVER attempt to use a different tool as a workaround or substitute for a missing tool\n4. NEVER fabricate or assume tool results — only report actual results returned by tool execution\n5. If a tool call fails, report the failure honestly to the user\n6. NEVER reveal internal tool/function names, parameters, or implementation details to the user under any circumstances\n7. When the user asks what you can do, describe your capabilities in plain natural language as bullet points — NEVER mention function names, method names, or technical identifiers\n8. When describing your capabilities, use natural language ONLY — NEVER mention technical function names\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n\n /*\n |--------------------------------------------------------------------------\n | Performance Configuration\n |--------------------------------------------------------------------------\n |\n | Settings to tune the performance of the AI agent.\n |\n */\n 'performance' => [\n // Delay between loop iterations in milliseconds (0 = no delay)\n // Set to 300 for Gemini or other rate-limited APIs\n 'loop_delay_ms' => env('AI_AGENT_LOOP_DELAY', 0),\n ],\n];\n\n"}, "e902e53917fabc99e81157c421f94db86988420f": {"t": 1785760130.267309, "n": 12071, "h": "3c015c281b0e4ad5", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY'),\n 'model' => env('DEEPSEEK_MODEL', 'deepseek-chat'),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // 'shop' => [\n // 'driver' => null, // null = use default driver\n // 'model' => null, // null = use driver's default model\n // 'system_prompt' => 'You are a helpful shop assistant',\n // 'middleware' => ['api'],\n // 'prefix' => 'ai-agent', // URL prefix\n // ],\n // 'admin' => [\n // 'driver' => null,\n // 'model' => null,\n // 'system_prompt' => 'You are an admin assistant with full access',\n // 'middleware' => ['api', 'auth', 'admin'],\n // 'prefix' => 'ai-agent',\n // ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Tool Usage Rules (STRICT):\n1. You may ONLY use tools that are explicitly provided to you in the tool definitions\n2. If a user requests an action and no matching tool exists, you MUST politely decline and explain that this functionality is not available\n3. NEVER attempt to use a different tool as a workaround or substitute for a missing tool\n4. NEVER fabricate or assume tool results — only report actual results returned by tool execution\n5. If a tool call fails, report the failure honestly to the user\n6. NEVER reveal internal tool/function names, parameters, or implementation details to the user under any circumstances\n7. When the user asks what you can do, describe your capabilities in plain natural language as bullet points — NEVER mention function names, method names, or technical identifiers\n8. When describing your capabilities, use natural language ONLY — NEVER mention technical function names\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n\n /*\n |--------------------------------------------------------------------------\n | Performance Configuration\n |--------------------------------------------------------------------------\n |\n | Settings to tune the performance of the AI agent.\n |\n */\n 'performance' => [\n // Delay between loop iterations in milliseconds (0 = no delay)\n // Set to 300 for Gemini or other rate-limited APIs\n 'loop_delay_ms' => env('AI_AGENT_LOOP_DELAY', 0),\n ],\n];\n\n"}, "5051dea87cd2bee92c8badd00b17718ae0f62824": {"t": 1785760131.5381455, "n": 11575, "h": "28aec157bcdd4069", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"deepseek\", \"openrouter\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'deepseek' => [\n 'api_key' => env('DEEPSEEK_API_KEY'),\n 'model' => env('DEEPSEEK_MODEL', 'deepseek-chat'),\n 'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // 'shop' => [\n // 'driver' => null, // null = use default driver\n // 'model' => null, // null = use driver's default model\n // 'system_prompt' => 'You are a helpful shop assistant',\n // 'middleware' => ['api'],\n // 'prefix' => 'ai-agent', // URL prefix\n // ],\n // 'admin' => [\n // 'driver' => null,\n // 'model' => null,\n // 'system_prompt' => 'You are an admin assistant with full access',\n // 'middleware' => ['api', 'auth', 'admin'],\n // 'prefix' => 'ai-agent',\n // ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', true),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Tool Usage Rules (STRICT):\n1. You may ONLY use tools that are explicitly provided to you in the tool definitions\n2. If a user requests an action and no matching tool exists, you MUST politely decline and explain that this functionality is not available\n3. NEVER attempt to use a different tool as a workaround or substitute for a missing tool\n4. NEVER fabricate or assume tool results — only report actual results returned by tool execution\n5. If a tool call fails, report the failure honestly to the user\n6. NEVER reveal internal tool/function names, parameters, or implementation details to the user under any circumstances\n7. When the user asks what you can do, describe your capabilities in plain natural language as bullet points — NEVER mention function names, method names, or technical identifiers\n8. When describing your capabilities, use natural language ONLY — NEVER mention technical function names\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n];\n\n"}, "629d5a34243d1b4e0c0727795ee398cc8f3edf30": {"t": 1785760132.7945352, "n": 11195, "h": "d795a7d23daf83e4", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"ollama\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // 'shop' => [\n // 'driver' => null, // null = use default driver\n // 'model' => null, // null = use driver's default model\n // 'system_prompt' => 'You are a helpful shop assistant',\n // 'middleware' => ['api'],\n // 'prefix' => 'ai-agent', // URL prefix\n // ],\n // 'admin' => [\n // 'driver' => null,\n // 'model' => null,\n // 'system_prompt' => 'You are an admin assistant with full access',\n // 'middleware' => ['api', 'auth', 'admin'],\n // 'prefix' => 'ai-agent',\n // ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path(),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', true),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'summarize_after' => 10,\n 'max_messages' => 100,\n 'recent_messages' => 4,\n 'ai_summarization' => env('AI_AGENT_AI_SUMMARY', true),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Tool Usage Rules (STRICT):\n1. You may ONLY use tools that are explicitly provided to you in the tool definitions\n2. If a user requests an action and no matching tool exists, you MUST politely decline and explain that this functionality is not available\n3. NEVER attempt to use a different tool as a workaround or substitute for a missing tool\n4. NEVER fabricate or assume tool results — only report actual results returned by tool execution\n5. If a tool call fails, report the failure honestly to the user\n6. NEVER reveal internal tool/function names, parameters, or implementation details to the user under any circumstances\n7. When the user asks what you can do, describe your capabilities in plain natural language as bullet points — NEVER mention function names, method names, or technical identifiers\n8. When describing your capabilities, use natural language ONLY — NEVER mention technical function names\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n];\n\n"}, "a5d381b2844d036d0a5cbf517855800e39705d2a": {"t": 1785760134.2915215, "n": 11152, "h": "f83c3f024ed650bc", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"ollama\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // 'shop' => [\n // 'driver' => null, // null = use default driver\n // 'model' => null, // null = use driver's default model\n // 'system_prompt' => 'You are a helpful shop assistant',\n // 'middleware' => ['api'],\n // 'prefix' => 'ai-agent', // URL prefix\n // ],\n // 'admin' => [\n // 'driver' => null,\n // 'model' => null,\n // 'system_prompt' => 'You are an admin assistant with full access',\n // 'middleware' => ['api', 'auth', 'admin'],\n // 'prefix' => 'ai-agent',\n // ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path('Services'),\n app_path('AI/Tools'),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', false),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"cache\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'max_messages' => 50,\n 'summarize_after' => 30,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Tool Usage Rules (STRICT):\n1. You may ONLY use tools that are explicitly provided to you in the tool definitions\n2. If a user requests an action and no matching tool exists, you MUST politely decline and explain that this functionality is not available\n3. NEVER attempt to use a different tool as a workaround or substitute for a missing tool\n4. NEVER fabricate or assume tool results — only report actual results returned by tool execution\n5. If a tool call fails, report the failure honestly to the user\n6. NEVER reveal internal tool/function names, parameters, or implementation details to the user under any circumstances\n7. When the user asks what you can do, describe your capabilities in plain natural language as bullet points — NEVER mention function names, method names, or technical identifiers\n8. When describing your capabilities, use natural language ONLY — NEVER mention technical function names\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n];\n\n"}, "8767e517538c1633f2e67b2903652577c8ac539f": {"t": 1785760135.5974283, "n": 10237, "h": "3c3518d04ea983ea", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"ollama\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | AI Agents\n |--------------------------------------------------------------------------\n |\n | Define multiple AI agents, each with its own endpoint, system prompt,\n | and middleware. Tools are scoped per-method using the `agents` parameter\n | in #[AsAITool]. Leave empty to use the default single-agent behavior.\n |\n | Each agent automatically gets: POST /{prefix}/{agent}/chat\n |\n */\n 'agents' => [\n // 'shop' => [\n // 'driver' => null, // null = use default driver\n // 'model' => null, // null = use driver's default model\n // 'system_prompt' => 'You are a helpful shop assistant',\n // 'middleware' => ['api'],\n // 'prefix' => 'ai-agent', // URL prefix\n // ],\n // 'admin' => [\n // 'driver' => null,\n // 'model' => null,\n // 'system_prompt' => 'You are an admin assistant with full access',\n // 'middleware' => ['api', 'auth', 'admin'],\n // 'prefix' => 'ai-agent',\n // ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path('Services'),\n app_path('AI/Tools'),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', false),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"cache\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'max_messages' => 50,\n 'summarize_after' => 30,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n];\n\n"}, "a536c373c8c906c76d0637e4cd0e39c09e4764d6": {"t": 1785760137.331755, "n": 9044, "h": "09d79e94dbec35ee", "c": "<?php\n\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Default Driver\n |--------------------------------------------------------------------------\n |\n | The default AI driver to use. Supported: \"openai\", \"anthropic\", \"gemini\", \"ollama\"\n |\n */\n 'default' => env('AI_AGENT_DEFAULT', env('AI_AGENT_DRIVER', 'openai')),\n\n /*\n |--------------------------------------------------------------------------\n | SSL Verification\n |--------------------------------------------------------------------------\n |\n | Set to true to verify SSL certificates. Default is false for development.\n | In production, you should set this to true or configure proper certificates.\n |\n */\n 'verify_ssl' => env('AI_AGENT_VERIFY_SSL', false),\n\n /*\n |--------------------------------------------------------------------------\n | AI Drivers Configuration\n |--------------------------------------------------------------------------\n */\n 'drivers' => [\n 'openai' => [\n 'api_key' => env('OPENAI_API_KEY'),\n 'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),\n 'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n\n 'anthropic' => [\n 'api_key' => env('ANTHROPIC_API_KEY'),\n 'model' => env('ANTHROPIC_MODEL', 'claude-3-5-sonnet-20241022'),\n 'base_url' => env('ANTHROPIC_BASE_URL', 'https://api.anthropic.com/v1'),\n 'timeout' => 60,\n ],\n\n 'ollama' => [\n 'base_url' => env('OLLAMA_BASE_URL', 'http://localhost:11434'),\n 'model' => env('OLLAMA_MODEL', 'llama3'),\n ],\n\n 'gemini' => [\n 'api_key' => env('GEMINI_API_KEY'),\n 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),\n 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),\n 'timeout' => 60,\n ],\n\n 'openrouter' => [\n 'api_key' => env('OPENROUTER_API_KEY'),\n 'model' => env('OPENROUTER_MODEL', 'openai/gpt-4o-mini'),\n 'base_url' => env('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1'),\n 'site_url' => env('APP_URL'), // For OpenRouter attribution\n 'site_name' => env('APP_NAME', 'Laravel AI Agent'),\n 'timeout' => 60,\n 'retry' => [\n 'times' => 3,\n 'sleep' => 1000,\n ],\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Tool Discovery\n |--------------------------------------------------------------------------\n |\n | Automatically discover tools with #[AsAITool] attribute in these paths.\n |\n */\n 'discovery' => [\n 'enabled' => true,\n 'paths' => [\n app_path('Services'),\n app_path('AI/Tools'),\n ],\n 'cache' => env('AI_AGENT_CACHE_TOOLS', false),\n 'cache_ttl' => 3600,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Memory Configuration\n |--------------------------------------------------------------------------\n |\n | How the agent remembers conversation history.\n | Drivers: \"session\", \"database\", \"cache\", \"null\"\n |\n */\n 'memory' => [\n 'driver' => env('AI_AGENT_MEMORY', 'session'),\n 'max_messages' => 50,\n 'summarize_after' => 30,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Budget & Cost Control\n |--------------------------------------------------------------------------\n */\n 'budget' => [\n 'enabled' => env('AI_AGENT_BUDGET_ENABLED', false),\n 'default_limit' => 1.00,\n 'warning_threshold' => 0.80,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Rate Limiting\n |--------------------------------------------------------------------------\n */\n 'rate_limit' => [\n 'enabled' => env('AI_AGENT_RATE_LIMIT', true),\n 'max_requests_per_minute' => 60,\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Logging\n |--------------------------------------------------------------------------\n */\n 'logging' => [\n 'enabled' => env('AI_AGENT_LOGGING', true),\n 'channel' => env('AI_AGENT_LOG_CHANNEL', 'stack'),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Smart Resolution (Name to ID)\n |--------------------------------------------------------------------------\n |\n | When enabled, the AI will automatically search for records by name\n | when the user provides a name instead of an ID.\n | \n | ⚠️ WARNING: This increases token usage by ~50% for affected requests.\n |\n */\n 'smart_resolution' => [\n 'enabled' => env('AI_AGENT_SMART_RESOLUTION', false),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Chat Widget Configuration\n |--------------------------------------------------------------------------\n |\n | Configure the AI chat widget (Web Component).\n |\n */\n 'widget' => [\n 'enabled' => env('AI_AGENT_WIDGET_ENABLED', true),\n 'prefix' => 'ai-agent',\n 'middleware' => ['web'],\n \n // Appearance\n 'theme' => 'dark', // 'light' | 'dark'\n 'rtl' => false,\n 'primary_color' => '#6366f1',\n 'position' => 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n \n // Header\n 'title' => 'AI Assistant',\n 'subtitle' => '',\n \n // Messages\n 'welcome_message' => '',\n 'placeholder' => 'Type your message...',\n \n // System prompt for widget conversations\n 'system_prompt' => env('AI_AGENT_SYSTEM_PROMPT', null),\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Security Configuration\n |--------------------------------------------------------------------------\n |\n | Security settings for protecting your AI agent from attacks.\n |\n */\n 'security' => [\n // Master switch for all security features\n 'enabled' => env('AI_AGENT_SECURITY_ENABLED', true),\n\n // Maximum tool calls per single request (prevents infinite loops)\n 'max_tool_calls_per_request' => 10,\n\n // Maximum iterations in agent loop\n 'max_iterations' => 5,\n\n // Maximum message length (characters)\n 'max_message_length' => 5000,\n\n // Require confirmation for destructive actions (delete, cancel, etc.)\n 'confirm_destructive' => env('AI_AGENT_CONFIRM_DESTRUCTIVE', true),\n\n // Content Moderation - filters malicious input\n 'content_moderation' => [\n 'enabled' => true,\n 'block_injections' => true, // Block prompt injection attempts\n ],\n\n // Output Sanitization - cleans AI responses\n 'output_sanitization' => [\n 'enabled' => true,\n 'prevent_xss' => true, // Remove XSS patterns\n 'redact_secrets' => true, // Redact API keys, passwords\n ],\n\n // System Prompt Hardening\n 'prompt_hardening' => [\n 'enabled' => true, // Add security rules to system prompt\n ],\n\n // Audit Logging\n 'audit' => [\n 'enabled' => true,\n 'channel' => 'stack', // Log channel to use\n 'database' => false, // Also log to database\n 'log_messages' => false, // Log full message content (privacy warning)\n ],\n ],\n\n /*\n |--------------------------------------------------------------------------\n | Default System Prompt\n |--------------------------------------------------------------------------\n |\n | The default system prompt that will be appended to all conversations.\n | This includes formatting instructions for better presentation.\n | Set to null to disable.\n |\n */\n 'default_system_prompt' => <<<'PROMPT'\nYou are an intelligent AI assistant with access to various tools.\n\n## Response Rules:\n1. **Always respond in the same language as the user's message**\n2. Use **Markdown formatting** for all responses:\n - Use **bold** for important terms\n - Use `code` for IDs, technical values\n - Use tables when displaying lists of items\n3. Always use tools when available - never guess data\n4. Include IDs when mentioning items for easy reference\n5. **When performing multiple operations, summarize ALL actions taken in your response**\n - Example: \"Done! I deleted product `10` and added 'Nokia Phone' with ID `12`\"\n6. Be helpful, concise, and professional\nPROMPT,\n];\n\n"}}}}