Technical Blog

Insights from building a zero-dependency PHP framework with AI agents

4 views

The Full Picture: Why This Is Just the Beginning

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.

5 views

Security, Token Economics, and Observability in an Agentic System

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.

4 views

Why No LangChain: Building a Multi-Agent Runtime in PHP

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.

2 views

The Git Healer Flow: LUKA Detects, LukAgent Writes, Git Isolates, Human Approves

The complete end-to-end healing flow with every class and method — LukaMiddleware::profile() → LukaManager::fireEvent() → AgentEventBridge::handleEvent() → HealerOrchestrator::handleIssue() (inline pre-checks) → AgentManager::run() → AgentExecutor loop → PatchValidator::validate() → PatchApplier::apply() → AgentNotifier::notifyPatchReady() → AgentCallbackHandler → merge --no-ff.

2 views

"Scheduler → Agent → Approval: Autonomous Runs With Human Checkpoints"

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).

2 views

Web SSE Chat: From Keypress to Streamed Agent Response

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.

2 views

"Telegram → KIK → Specialist: Tracing a Message Through the Entire Stack"

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.

4 views

BORNA → BornAgent Pipeline: Escalating From Rule-Based to AI Analysis

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.

2 views

LUKA → LukAgent Pipeline: Automatic Performance Healing

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.

6 views

PM Auto-Chain: How a Task Update Triggers an AI Code Review

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.