Reading tracker active
0 / 7 read
0%
← Home
Architecture Notes

Technical Writing

Notes on distributed systems, AI infrastructure, databases, and observability. Written for engineers who want depth, not surface-level takes.

ANATOMY OF A PROMPT · REQUEST TO RESPONSECLIENT REQUESTUser PromptPROMPT ENGINEERINGScope + RulesTOKENIZATIONTokensRAG RETRIEVALVector Searchembed · rank · contextcontextPLANNERDecomposeREACT AGENTReAct LoopactsMCP TOOL CALLClient→Servertool resultLOOP GUARDbounded recursionRESPONSEGrounded AnswerGROUNDED INretrieved context · tool resultsaryan.devai-infrastructure
NEW
ai-infrastructure

Building AI Systems: What Actually Happens When You Send a Prompt

A walkthrough of what actually happens between a prompt going in and an answer coming out — prompt engineering, tokenization, RAG retrieval, planning, ReAct agents, tools, and MCP — drawn from building a vulnerability scanner and an autonomous red-teaming orchestrator.

Jul 26, 2026·10 min read
AI AGENT OBSERVABILITY · SIX AGENTS, ONE NORMALIZED EVENTAGENTClaudeBORROWAGENTCursorTRUSTAGENTCopilotINVENTAGENTCodexINVENTAGENTGeminiINVENTAGENTLangChainINVENTPER-TENANT BUFFERAggregatorflush · 5s or 100 eventsMESSAGE QUEUEKafkapartitioned by tenantASYNC WRITERSConsumersSEARCH INDEXElasticsearchone document per spanRESULT6 agents → 3 identity strategies → 1 shapearyan.devai-infrastructure · observability
NEW
ai-infrastructureobservability

Building an Observability Dashboard for AI Agents at Scale

How we turned six AI coding agents' disconnected request logs into searchable, navigable conversations — identity resolution across Claude, Cursor, Copilot, Codex, Gemini and LangChain, Kafka-backed ingestion at scale, and session reconstruction at query time in Elasticsearch.

Jul 12, 2026·5 min read
RED TEAM ORCHESTRATOR · AI AGENT SECURITY TESTINGORCHESTRATORRed TeamANALYSE + ENHANCEA&E AgentREQUEST BUILDERReq BuilderTARGETAI Agent/ MCP ServerresponseRESP PARSERParserVALIDATIONValidatorREMEDIATIONRemediatenext turnBUDGET GUARDper-run mutexDASHBOARDFindingsHIGH CONFIDENCE ONLYmulti-turn · adaptivearyan.devsecurity · ai-infrastructure
securityai-infrastructure

I Built a Red Team Orchestrator for AI Agents. Here's What Actually Made It Hard.

How I built a multi-agent orchestration pipeline to automatically red-team any AI agent or MCP server — and what surprised me along the way.

Jun 10, 2026·8 min read
AI CODE ANALYSIS · STATIC + SEMANTIC + LLM HYBRIDSTATIC ANALYSISStructuralcall-graph · taint · CPGSEMANTIC SEARCHRetrievalvector embeddings · similarityLLM REASONINGInferenceevidence → judgementEXECUTION PATH · EVIDENCE COLLECTORExec Path BuilderstructuralretrievalinferenceVULNERABILITY ANALYSISVuln Analysis Agentre-planRESULT70% more findings · 0 false positivesaryan.devsecurity · ai-infrastructure
securityai-infrastructure

Building an AI Security Engineer Before Coding Agents Could Do It

How I built a hybrid static-analysis + semantic-search + LLM pipeline to automatically find vulnerabilities in source code — and why none of it was really a model problem.

Oct 20, 2025·7 min read
OPENAPI DEPENDENCY GRAPH · WORKFLOW EXECUTIONOPENAPI SPECSwaggerROOT APIPOST /usersDEPENDS ONGET /users/{id}DEPENDENTPOST /projectsPARAM CACHEuserId, id...SUCCESSResolvedAI-ASSISTED RECOVERY FOR EDGE CASESWhen deterministic logic reaches limitsCOVERAGE10% → 60% successful API executionaryan.devapi-design · ai-infrastructure
securityai-infrastructure

Swagger Knows the Endpoints. It Doesn't Know the Workflow.

How I turned a static OpenAPI specification into realistic, stateful API traffic — building a dependency graph across hundreds of endpoints so a security-testing pipeline could replay requests that actually pass validation.

Sep 15, 2025·11 min read