Download the PHP package hakam/ai-log-inspector-agent without Composer
On this page you can find all versions of the php package hakam/ai-log-inspector-agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hakam/ai-log-inspector-agent
More information about hakam/ai-log-inspector-agent
Files in hakam/ai-log-inspector-agent
Package ai-log-inspector-agent
Short Description AI-powered log inspector agent for PHP
License MIT
Homepage https://github.com/RamyHakam/ai-log-inspector-agent
Informations about the package ai-log-inspector-agent
๐ค AI Log Inspector Agent
๐ Traditional vs โก AI-Powered
| ### ๐ Traditional Way - Open **Kibana/ElasticSearch** dashboards - Write complex **Datadog queries** - Manual `grep` through log files - Filter thousands of log entries - Correlate timestamps & request IDs by hand - Spend hours finding root causes **Result:** Hours of manual work ๐ฉ | ### โก AI Agent Way **Result:** Instant intelligent answers ๐ง |
๐ Docs & Examples
Live docs: ramyhakam.github.io/ai-log-inspector-agent
๐ Playground To Validate with your own logs and AI platform.
Playground: ramyhakam.github.io/ai-log-inspector-agent
๐ฌ Real Examples - Ask Anything!
โ ๏ธ Note - Built on Symfony AI (experimental). The package itself is NOT production-ready; platform maturity depends on your provider and deployment setup.
โจ What Makes It Special
๐ Semantic Search - Understands context, not just keywords
๐ง AI Analysis - Explains what happened and why
โก Lightning Fast - Get answers in seconds, not hours
๐ ๏ธ Tool-Based - Extensible architecture with Symfony AI
๐ Vector Powered - Smart similarity matching
๐ Fallback Ready - Works even when AI is unavailable
๐ Multi-Platform - OpenAI, Anthropic, and Ollama support
๐งฉ Multi-Tool - log_search + request_context for request tracing
๐ File Upload Indexing - Upload logs and index via LogFileIndexer
๐ฌ Session Chat - Persisted chat history for multi-turn investigations
๐งช Production Demo - Check Playground Demo
๐ Quick Start
Requirements
- PHP 8.4+
- Composer 2+
Install
Setup & Use
Advanced Questions
Response Structure
LogInspectorAgent::ask() returns a ResultInterface (use getContent() for the AI response). The structured array above is the tool-level output used internally and by the playground API.
โ๏ธ Configuration
AI Platform Options
Vector Store Options
Custom System Prompts
๐งฐ Tools & Capabilities
LogSearchTool (log_search)
- Semantic or keyword search over indexed logs
- Returns structured results with evidence logs and AI analysis
RequestContextTool (request_context)
- Trace a request, session, or trace ID across distributed logs
- Returns chronological log context for end-to-end debugging
Multi-tool agent example
- See
examples/multi-tool-agent-example.phpfor intelligent tool selection
๐ฌ Conversational Debugging
๐งช Playground API
Run the multi-platform playground API:
Key endpoints:
GET /healthPOST /init(preload sample logs and cache vectors)POST /upload(upload log file, index withLogFileIndexer)GET /logsGET /init-statusPOST /chatPOST /reset
Features:
- Separate brain and embedding models per request
- OpenAI, Anthropic, or Ollama per request
- Session-based chat history
- Cached vector store per session
Environment variables:
OLLAMA_URL(default:http://localhost:11434)OLLAMA_MODEL(default:llama3.1:8b)CHROMA_URL(default:http://localhost:8000)CHROMA_COLLECTION(default:log-inspector)REDIS_URL(default:redis://localhost:6379)ALLOWED_ORIGINS(default:*)
๐ Local Docs
The documentation site content is in website/docs.
Live docs: ramyhakam.github.io/ai-log-inspector-agent
๐งช Testing & Validation - REAL WORKING PACKAGE
๐ฏ PROOF IT WORKS: Comprehensive end-to-end tests with real Ollama integration.
โ Full Functional Test Suite
13/13 tests PASSING with real Ollama (llama3.2:1b):
- ๐ณ Payment system analysis - Real e-commerce error investigation
- ๐ก๏ธ Security incident detection - Brute force & auth failure analysis
- ๐พ Database performance issues - Connection timeouts & query problems
- ๐ Application error analysis - Exception handling & memory issues
- โก Performance monitoring - API response time analysis
- ๐ 50+ realistic PHP logs from actual applications
๐โโ๏ธ Run Tests Yourself
Results: 104 successful assertions, 2-10s response times, multi-platform support proven.
๐ Extend Testing
Want to test with YOUR logs? Add more realistic log examples:
-
Expand
test/fixtures/logs/with logs from:- โ Laravel applications - Real Laravel/Eloquent errors (included)
- โ Kubernetes pods - OOMKilled, CrashLoopBackOff, resource issues (included)
- โ Microservices - Circuit breakers, service mesh, distributed tracing (included)
- Symfony applications
- API gateways
- Docker containers
-
Test real scenarios:
- "What caused the 3 AM outage?"
- "Show me memory leaks in user service"
- "Find all failed credit card transactions"
- "Analyze API rate limiting errors"
- Validate with your AI platform:
- OpenAI (full semantic search)
- Anthropic (full semantic search)
- Ollama (intelligent keyword fallback)
This package works with REAL data and REAL AI models - test it yourself!
๐ค Contributing
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
All versions of ai-log-inspector-agent with dependencies
symfony/ai-agent Version ^0.3.0
symfony/ai-platform Version ^0.3.0
symfony/ai-store Version ^0.3.0
symfony/ai-ollama-platform Version ^0.3.0
symfony/ai-open-ai-platform Version ^0.3.0
symfony/ai-anthropic-platform Version ^0.3.0
psr/log Version ^3.0
symfony/ai-chat Version ^0.3.0
symfony/cache Version ^8.0
symfony/ai-cache-store Version ^0.3.0