Skip to content
Kamran Code

Notes on building software and AI systems

Long-form, practical writing from real engineering work — architecture, AI, business systems and the stack behind them.

  • AI Engineering20 min read

    AG-UI explained: what it is and how it differs from MCP

    AG-UI is an open event protocol for streaming an AI agent to a frontend. What it is, how a run looks on the wire, how it differs from MCP, and when to skip it.

    • #ag-ui
    • #ai-agents
    • #agent-protocols
    • #sse
  • DevOps13 min read

    npm 12 Blocks Install Scripts. Your Node Doesn't Ship It.

    npm 12 blocks dependency install scripts by default, but Node 22, 24 and 26 still bundle npm 10 or 11. My test output, ignore-scripts and the tensorlake case.

    • #npm
    • #npm-12
    • #install-scripts
    • #supply-chain-security
  • AI Engineering18 min read

    Capping AI Spend per User: Denial of Wallet and a Practical Design

    A bot check decides who gets in, not how much they spend. A source-checked look at denial of wallet, what OpenAI and Anthropic do and do not cap, and a per-user budget design with a reserve and settle sketch.

    • #denial-of-wallet
    • #llm-cost-control
    • #rate-limiting
    • #owasp
  • AI Agents12 min read

    AGENTS.md, Skills or MCP: What Each One Is Actually For

    AGENTS.md, Agent Skills and MCP are not rival layers. They differ by when they load, what they cost in context and whether anything enforces them. A source-checked decision table and a worked example.

    • #agents-md
    • #agent-skills
    • #mcp
    • #claude-code
  • AI Agents12 min read

    Harness Engineering, Explained: What It Adds to Prompts and Context

    Prompt, context and harness engineering are three scopes of one job. A dated, source-checked timeline of who said what, where the sources disagree, and a way to decide which fix an agent mistake needs.

    • #harness-engineering
    • #context-engineering
    • #prompt-engineering
    • #ai-agents
  • AI Agents5 min read

    AI Scored 42/42 at the IMO. Who Marked It?

    Several AI systems report perfect IMO 2026 scores. Which were marked by the organisers, which by AI agents, and how one setting moved a score by 14 marks.

    • #imo-2026
    • #ai-benchmarks
    • #ai-evaluation
    • #claude
  • AI Agents7 min read

    MCP Went Stateless: What Changed in the 2026-07-28 Spec

    The 2026-07-28 MCP spec removes sessions and the handshake. What changed, what breaks, what is deprecated, and how to migrate, checked against the changelog.

    • #mcp
    • #model-context-protocol
    • #ai-agents
    • #protocol
  • Software Architecture7 min read

    What Happens When You Press Upload on YouTube

    A viral post sketched YouTube's backend with no sources. I checked each part against primary documents: what's documented and what's only a guess.

    • #system-design
    • #youtube
    • #video-processing
    • #vitess
  • AI Engineering12 min read

    What Is Jev? TypeSafe AI's Decision Model, Explained

    Jev from TypeSafe AI answers questions you define with typed choices and probabilities instead of text. How it works, what it costs and where it breaks.

    • #jev
    • #jev-ai
    • #typesafe-ai
    • #system-one
  • AI Agents8 min read

    What Is a Harness Engineer? Agent = Model + Harness

    A harness is everything in an AI agent except the model. Here is what a harness engineer actually builds (tools, context, memory, permissions, budgets, evals) and how to do it well.

    • #harness-engineering
    • #ai-agents
    • #tool-calling
    • #llm
  • LLM Applications7 min read

    How to Integrate AI Into an Existing Web Application

    You do not need a rewrite to add AI to a Laravel or Next.js application. A step-by-step approach: find the right feature, isolate the model behind a service, validate outputs, handle cost and failure, and ship behind a flag.

    • #ai-integration
    • #laravel
    • #nextjs
    • #llm
  • SaaS7 min read

    How to Design a Scalable SaaS Architecture

    Tenancy, billing, background work, environments and the boundaries that let a SaaS product grow without a rewrite. A practical architecture for a first version that is built to last, with Next.js, Laravel and PostgreSQL as the reference stack.

    • #saas
    • #architecture
    • #multi-tenancy
    • #nextjs
  • CRM8 min read

    How to Build a Custom CRM

    When a generic CRM stops fitting, a custom one is often smaller than people expect. The data model, pipeline design, integrations and reporting that make a custom CRM worth building, and the signs that you should not.

    • #crm
    • #business-systems
    • #laravel
    • #data-modelling
  • AI Agents7 min read

    How AI Agents Actually Work

    Underneath the hype, an AI agent is a loop: a model chooses a tool, the tool runs, the result goes back in. Here is that loop in detail, the engineering that makes it safe, and how to decide whether you need an agent at all.

    • #ai-agents
    • #tool-calling
    • #llm
    • #automation
  • RAG8 min read

    How RAG Systems Work for Business Knowledge Bases

    Retrieval-augmented generation explained from the engineering side: ingestion, chunking, embeddings, hybrid search, reranking, permissions and citations, and the decisions that determine whether a knowledge base actually answers questions correctly.

    • #rag
    • #embeddings
    • #vector-search
    • #knowledge-base
  • AI Engineering8 min read

    How to Build an AI-Powered Business Application

    A practical architecture for AI applications that do real work inside a business: where the model sits, how it reaches your data and tools, and what has to be true before it goes to production.

    • #ai-applications
    • #llm
    • #architecture
    • #rag

Not sure where to start?

A short conversation is usually enough to work out whether the idea needs a prototype, a product or a different approach entirely.