58 posts traced the architecture from zero-dependency PHP framework to a 19-agent AI platform. But the real product isn't the framework, the agents, or the modules — it's LIMAlife. A self-hosted, encrypted, business-aware personal AI assistant that nobody else has built. This post looks at where it's going: Home Assistant integration, SMS/WhatsApp channels, vector memory, proactive health monitoring, and why self-hosted beats cloud for personal data.
The full security model (path restrictions → dangerous function blocklist → size limits → PHP syntax check → approval gateway → git isolation → --no-ff merge), why agents need more guardrails than humans. TokenBudget with $0.000009/token blended rate, per-model costs. AgentLog VARCHAR PK format for human-readable debugging, status meanings, iteration history reading.
What you give up without LangChain — ecosystem integrations, vector stores, community tools. What you gain — no abstraction tax, full control over message formats, no version drift, debuggable with var_dump. The actual line count of the agent runtime (~2,500 lines across 16 core files + 18 tools, plus the multi-provider AI layer — AIProviderRegistry, TaskRouter, EmbeddingProvider, TranscriptionProvider, TtsProvider, GeminiAdapter). When this approach makes sense and when it doesn't.
How scheduled agent runs differ from on-demand — AgentScheduleManager evaluates cron expressions, ScheduledAgentJob runs with system-level auth (no user context), TokenBudget pre-check before execution, three execution types (direct, healer, vajbcoder), Telegram approval with HITL conversation mode. New scheduled jobs: ArchitectureIndexJob (01:00 daily, rebuilds codebase index) and NightlyReviewJob (02:00 daily, auto code review with PM subtask creation).
How the LIMAi web chat streams agent responses via Server-Sent Events — SSE endpoint setup with 5 event types (thinking, progress, message, error, done), LIMAiAgentChannel implementing AgentChannel, ConversationModel dual-storage (session + DB) with cursor-based pagination (limit+1 trick for has_more), why SSE over WebSocket, and connection drop handling.
Following a single Telegram message through the entire stack — webhook receipt → register_shutdown_function + fastcgi_finish_request for background processing → TelegramCommandProcessor → LIMAEngine → KIK routing → DelegateAgentTool → specialist runs → response chunked back to Telegram via TelegramAgentChannel (4096 char limit). Every latency point mapped.
When BORNA rule-based scoring escalates to BornAgent — score thresholds and event types that trigger AI analysis, what data the agent receives (full request log, IP history, behavioral patterns), the difference between auto-block (BORNA) and AI-analyzed response (BornAgent), and why the agent writes analysis reports instead of patches.
The complete pipeline from N+1 detection to resolved code — LUKAmonitoring severity thresholds trigger events, AgentEventBridge routes to HealerOrchestrator, LukAgent receives detection data + previous failure context, generates patch → PatchValidator 6-step → PatchApplier autofix/ branch → Telegram approval → human merges. Every step with actual class names.
The full chain from subtask completion to pipeline advancement — PMAgentBridge coordinates execution with budget enforcement, cache-based rate limiting, and post-completion PHPStan validation. PipelineManager handles loop-to cycles with conditional stages and per-stage model profiles. Parallel wave execution via curl_multi for independent subtasks. Atomic queue claims prevent duplicate execution. AutoStatusEngine auto-completes projects with retrospectives.