Principal Software Architect · AI Systems & Security Researcher · Systems Engineer
17+ years architecting deterministic AI agent runtimes, sub-millisecond prompt-injection firewalls, memory-safe graphics engines in Rust, and resilient distributed platforms across Python, Go, TypeScript, Kotlin, and PHP/Laravel.
| Engineering Domain | Focus Areas & Capabilities | Production Implementations |
|---|---|---|
| AI Safety & Agent Security | Sub-millisecond runtime firewalls, Indirect Prompt Injection (IPI) defense, tool-calling validation, Model Context Protocol (MCP) policy enforcement, red teaming. | LightGuard-Agent, ai-agent-security-scanner, prompt-injection-detector-action |
| Systems & Native Graphics | Memory-safe extreme canvas rendering (.atn, .psd), SIMD acceleration, native WebKitGTK desktop browsers. |
PhotoCraft Engine (Rust), Valorex Browser (Rust) |
| Clinical Decision Support (CDS) | Regulatory-aligned AI ecosystems (IEC 62304 Class A/B/C), zero-token deterministic clinical calculators, multi-dialect clinical negation benchmarks. | MedOrqis (24 Medical AI Skills) |
| Distributed Cloud & Messaging | High-concurrency WhatsApp multi-device REST engines, unified multi-tenant webhooks, distributed sliding-window rate limiters, zero-downtime replication. | GOWA (Go), unified-whatsapp-webhook-gateway, distributed-rate-limiter-node |
| Data & Vector Infrastructure | PostgreSQL pgvector indexing (HNSW), AST-level SQL query auditing, read-only transaction sandboxing, hybrid dense + BM25 retrieval. |
mcp-postgres-guard, laravel-pgvector-eloquent, pgvector-hybrid-rag-starter |
| Interface Engineering & BiDi | Compiler-grade design system governance, WCAG 2.2 AAA APCA contrast, W3C DTCG tokens, CSS Logical BiDi/RTL symmetry, finite-state UI. | Orthotect, Kashef Scam Shield (Kotlin Compose) |
- Deterministic Over Stochastic: Safety, authorization, and clinical calculators must never rely on probabilistic model inferences. Runtime security firewalls and clinical engines must execute deterministically with sub-millisecond guarantees.
- Zero-Knowledge by Default: On-device edge heuristics (such as Kashef on Android) must analyze untrusted streams with zero cloud telemetry and strictly scoped local permissions.
- Memory Safety & Extreme Scale: Systems code written in Rust must remain resilient against extreme-scale allocation boundaries (such as billion-pixel raster canvases) without unexpected panics or dangling references.
- Verification Before Assertion: Every performance, mitigation, or compliance claim must be grounded in executable test suites, public benchmarks, or permanent scientific artifacts (DOI).
- Epistemic Provenance & Formal Constraints: Regulated architectures (clinical informatics, multi-tenant databases) require strict audit trails, boundary enforcement, and formal error containment.
LightGuard-Agent: A Lightweight Defense Architecture Against Indirect Prompt Injection in Tool-Calling AI Agents
- Threat Model: Autonomous AI agents executing tool calls via the Model Context Protocol (MCP) and external APIs are critically exposed to Indirect Prompt Injection (IPI), homoglyph evasion, and multi-turn crescendo jailbreaks embedded in untrusted external data streams.
- Defense Architecture: A sub-millisecond (
< 0.1 ms) three-tier security pipeline combining deterministic syntactic isolation, semantic intent heuristics, and a least-privilege execution policy firewall. - Empirical Verification: Achieved a 100.0% mitigation rate across adversarial benchmark suites with zero false positives on benign clinical, financial, and developer workflows.
- Permanent Artifacts: DOI
10.5281/zenodo.22731104· PyPI Package · Interactive Playground · Paper Manuscript · CI/CD GitHub Action
- Challenge: LLM tool loops executing MCP calls are vulnerable to malicious payload injections. Traditional LLM-as-a-judge defenses add 500ms+ latency per turn, increase token costs exponentially, and are themselves susceptible to indirect prompt injection.
- Architecture: Engineered an ultra-lightweight, 3-tier hybrid evaluation engine in Python combining zero-latency syntactic sanitization, unicode homoglyph normalization, semantic intent heuristic classification, and strict tool-call schema boundary validation.
-
Impact: Decreased evaluation latency to under
$0.1\text{ ms}$ (less than 1% of a model inference frame) while reaching a 100.0% adversarial mitigation rate without external LLM dependencies. Published under DOI10.5281/zenodo.22731104.
-
Challenge: High-performance raster and vector graphics operations on ultra-dense canvases exceeding
$2^{30}$ pixels (1+ billion render points) experienced out-of-memory panics during trimming and multi-layer duplications in PhotoCraft. -
Architecture: Hardened canvas memory allocation buffers using tile-based chunked processing, validated bounding geometry, architected a deterministic binary
.atn(Photoshop Actions) parser and recording engine that eliminates dangling identifiers, and engineered dynamic brush-diameter blur sigma scaling. - Impact: Completely eliminated memory exhaustion crashes on extreme surfaces; achieved mathematically uniform stroke feathering and cross-platform desktop UI synchronization across Linux, macOS, and Windows.
- Challenge: Generative AI models deployed in clinical workflows hallucinate dosages, fail on dialectal negations, and cannot be certified under medical device risk management standards (ISO 14971 / IEC 62304).
- Architecture: Designed MedOrqis as a modular clinical informatics ecosystem consisting of 24 risk-stratified skills (Class A/B/C) and 12 zero-token deterministic clinical calculators (ESC 2024 CHA₂DS₂-VA, CKD-EPI 2021, Bedside Schwartz, NEWS2, HAS-BLED, DDI Engine), coupled with strict epistemic provenance locks.
- Impact: 36/36 verification suites passed; 100% accuracy on a 126-case multilingual clinical negation benchmark with full compatibility across Claude Code, Cursor, Codex, and Google Antigravity.
| Repository | Description & Highlights | Stack | Links |
|---|---|---|---|
| LightGuard-Agent | Sub-millisecond AI agent security firewall protecting LLM tool-calling loops and MCP runtimes against IPI attacks. | Python MCP PyPI |
Docs · Playground · DOI |
| ai-agent-security-scanner | Security auditor and benchmark suite for autonomous AI agents, prompt injection defense, and tool verification. | Python Security |
Source |
| agentic-rag-faithfulness | Sub-millisecond evaluation library measuring RAG groundedness and detecting LLM hallucinations in Arabic and English. | Python RAG NLP |
Source |
| MedOrqis | Evidence-grounded medical AI ecosystem: 24 clinical skills (IEC 62304 Class A/B/C) & 12 deterministic calculators. | Python Clinical npm |
Catalog · npm · Tests |
| prompt-injection-detector-action | GitHub Action security gate that audits system prompts, SKILL.md manifests, and MCP schemas on pull requests. |
GitHub Actions CI/CD |
Source |
| Repository | Description & Highlights | Stack | Links |
|---|---|---|---|
| Valorex | Ultra-fast, privacy-first native desktop web browser with WebKitGTK, Brave Adblock, and native Arabic RTL support. | Rust WebKitGTK Linux |
Source |
| PhotoCraft Engine | Core contributor to pure Rust creative studio engine: memory safety on 1B+ canvases, .atn parser, and compositing math. |
Rust SIMD Graphics |
Upstream Repo |
| distributed-rate-limiter-node | High-concurrency sliding-window distributed rate limiter middleware for Express and NestJS backends powered by Redis. | TypeScript Redis NestJS |
Source |
| Hcnsec-AI-Assistant | AI coding assistant VS Code extension with dedicated sidebar chat and context-aware code explanations. | TypeScript VS Code API |
Source |
| Repository | Description & Highlights | Stack | Links |
|---|---|---|---|
| mcp-postgres-guard | Secure Model Context Protocol server for PostgreSQL: query auditing, slow-query EXPLAIN, and AST injection defense. |
Python MCP PostgreSQL |
Source |
| mcp-arabic-toolkit | High-performance MCP server providing Arabic NLP, morphological analysis, diacritization, and dialect classification. | Python MCP Arabic NLP |
Source |
| laravel-pgvector-eloquent | Native PostgreSQL pgvector integration for Laravel Eloquent with cosine/L2 distance scopes and automated HNSW indexing. |
PHP 8.3 Laravel pgvector |
Source |
| pgvector-hybrid-rag-starter | Enterprise starter template for hybrid dense vector + BM25 keyword retrieval using PostgreSQL pgvector and RRF. |
Python PostgreSQL RAG |
Source |
| laravel-llm-router | Multi-provider LLM routing engine with budget enforcement, circuit-breaker failover, and semantic response caching. | PHP 8.3 Laravel 11 AI |
Source |
| Repository | Description & Highlights | Stack | Links |
|---|---|---|---|
| gowa | High-throughput Go WhatsApp Web multi-device REST API engine with webhook callbacks and persistent session storage. | Go REST API WebSocket |
Source |
| unified-whatsapp-webhook-gateway | High-concurrency webhook orchestrator bridging Evolution API and WAHA with multi-tenant CRMs and n8n workflows. | JavaScript Node.js WAHA |
Source |
| docker-traefik-ha-cluster | Production edge reverse proxy with automated SSL/TLS load balancing using Traefik v3 and Docker Swarm. | Docker Swarm Traefik v3 |
Source |
| zero-downtime-db-sync | Resilient streaming database migration and replication CLI tool for MySQL, PostgreSQL, and SQLite. | Python Database CLI |
Source |
| Repository | Description & Highlights | Stack | Links |
|---|---|---|---|
| Kashef (كاشف) | On-device zero-knowledge fraud prevention and phishing heuristic engine for Android built with Jetpack Compose. | Kotlin Jetpack Compose M3 |
Source |
| Orthotect | Compiler-grade design system governance and static analysis gates: WCAG 2.2 AAA APCA contrast, W3C DTCG tokens, CSS Logical BiDi. | Python Design Systems CLI |
Source |
| arabic-web-dev-tools | Client-side web utilities for Arabic web developers: RTL CSS converter, Tashkeel stripper, and typography testing. | HTML5 CSS Logical JS |
Source |
| arabic-whisper-preprocessor | Pre-processing and quality telemetry tools for audio recordings in Arabic dialects to optimize word error rate (WER). | Python Audio Whisper |
Source |
| server-hardening-toolkit | Production hardening scripts for Linux servers: SSH, firewall rules, kernel sysctl parameters, and process isolation. | Shell Linux DevSecOps |
Source |
Direct installation commands for production tools:
# 1. Install Sub-Millisecond AI Agent Security Firewall (PyPI)
pip install lightguard-agent
# 2. Add Medical AI Clinical Informatics CDS Skills
npx skills add seotarek/medorqis
# Or install via npm
npm install medorqis
# 3. Add Deterministic Interface Governance Gates (WCAG 2.2 AAA / DTCG Tokens)
npx skills add seotarek/orthotectLive Demos & Portals:
- LightGuard-Agent Interactive Playground — Test real-time prompt-injection defense heuristics
- MedOrqis Live Clinical Catalog — Explore all 24 medical skills and deterministic calculators
- LightGuard-Agent Documentation Portal — Full API and architectural reference
I partner with engineering organizations, healthcare innovators, and technology leaders on:
- Securing Autonomous AI Agents & MCP Ecosystems: Designing deterministic runtime gates, custom MCP servers, and sub-millisecond prompt-injection firewalls.
- High-Performance Systems & Distributed Platforms: Architecting Rust engines, multi-tenant cloud backends (Go / Python / TypeScript / PHP), and zero-downtime infrastructure.
- Specialized Domain AI: Building verified, regulatory-aware AI systems for clinical informatics (IEC 62304 / ISO 14971), Arabic NLP, and RTL-first enterprise products.

