---
title: "Aamer Mehaisi (@mehaisi) | Hashnode"
description: "Making AI accessible, ethical, and culturally aware. Read the latest articles by Aamer Mehaisi on Hashnode."
url: "https://hashnode.com/@mehaisi"
---

@mehaisi

# Aamer Mehaisi

@mehaisi · Doha, Qatar · Joined March 2026

Making AI accessible, ethical, and culturally aware

[Website](https://www.mehaisi.com/)

## Comments

[This is a solid practical guide. One thing that often gets missed in Bedrock discussions: the model selection decision has architectural implications that compound over time. When you start with Titan for chatbots and Claude for code generation, you're not just choosing models—you're choosing pricing tiers, latency profiles, and context window constraints that affect downstream architecture. The Lambda + API Gateway pattern here is clean for getting started, but in production I've seen teams hit three scaling walls: Cold starts + streaming: Lambda works well for InvokeModel, but InvokeModelWithResponseStream requires connection pooling that Lambda's execution model fights against. Cost attribution: Bedrock doesn't surface per-request token costs directly. You need CloudWatch custom metrics to track inputTokenCount and outputTokenCount per invocation if you want actual unit economics. Model drift monitoring: Foundation models update quietly. A prompt that works with Titan v1 might behave differently with v2. Version pinning via model ARN isn't always documented clearly. The best practices section covers security well, but I'd add: treat your prompt templates like schema contracts. When you send prompt templates into Titan, you're implicitly trusting that input structure. In production, prompt templates should be versioned and validated like API schemas. For anyone scaling beyond the MVP here: ECS Fargate with connection pooling to Bedrock gives you streaming responses without Lambda cold start latency—and better observability into model behavior over time. Thanks for the practical walkthrough with actual code samples. The IAM policy snippet and SDK examples save a lot of ramp-up time.](https://hashnode.com/posts/amazon-bedrock-a-practical-guide-for-developers-and-devops-engineers/67e172db7e8e429374a7dd26/comment/69cc2c00b9c92932a716f981)

Comment · Article · Mar 31 · [Amazon Bedrock: A Practical Guide for Developers and DevOps Engineers](https://hashnode.com/posts/amazon-bedrock-a-practical-guide-for-developers-and-devops-engineers/67e172db7e8e429374a7dd26)

[This framing hits the core insight: source map leaks aren't the exploit—they're the context amplifier. The three-layer mental model (Exposure → Authorization → Execution) maps directly to how production agent systems fail in practice: Exposure layer: MCP endpoints and tool schemas are the new .env files—everyone commits them somewhere. Authorization layer: The "which agent can call which tool" question becomes unmanageable when agents can spawn subagents or call MCP servers indirectly. Execution monitoring: Most teams have HTTP metrics but zero visibility into agent task chains. What I keep seeing: teams instrument the middle box (identity, roles, approvals) and ignore the top and bottom. That's where incidents compound. The agent-audit approach is smart—scan for exposure before deploy rather than hoping monitoring catches it in production. The blast radius question is underrated: a leaked API key is bad, but a leaked API key plus a tool schema that shows exactly what that key can do is an order of magnitude worse. One gap worth addressing: auditability in under 10 minutes is table stakes for incident response, but most agent frameworks make this harder than it should be. The execution logs exist somewhere (API traces, MCP server logs, model provider dashboards)—the work is correlating them back to a single task ID. Would be curious how you handle recursive agent chains in monitoring. If agent A spawns agent B which calls tool C—do you trace the full lineage, or just the immediate invocation?](https://hashnode.com/posts/source-map-leaks-exposed-claude-codehow-to-monitor-agent-vulnerabilities/69cc1fe168fd044a148b9b12/comment/69cc2194e62027e6439b848a)

Comment · Article · Mar 31 · [Source Map Leaks Exposed Claude Code—How to Monitor Agent Vulnerabilities](https://hashnode.com/posts/source-map-leaks-exposed-claude-codehow-to-monitor-agent-vulnerabilities/69cc1fe168fd044a148b9b12)

[The insight here is spot-on: frameworks solve problems you don't have yet. But here's the nuance I'd add — what you built is a framework. It's just a transparent one. MEMORY.md, SOUL.md, skills/ — these are the same patterns as configuration-as-code, just exposed as files instead of hidden in abstractions. I've written about this from the other angle: agent behavior living in .claude/ or SKILL.md files. The pattern isn't "no framework" — it's "framework as readable code." The real win isn't avoiding frameworks entirely. It's keeping the framework inspectable. When your agent makes a decision, you can trace it back to MEMORY.md or 2026-03-31.md. That's the feature. The line I'd draw: start simple, add complexity only when you hit the actual wall. Not because you read a blog post about RAG pipelines. Great piece.](https://hashnode.com/posts/i-built-3-agent-systems-all-of-them-use-flat-files-heres-why-your-vector-db-is-overkill/69cbfb745c6d2e5121a65134/comment/69cc16dcfa5a6375ab2346d4)

Comment · Article · Mar 31 · [I Built 3 Agent Systems. All of Them Use Flat Files. Here's Why Your Vector DB Is Overkill.](https://hashnode.com/posts/i-built-3-agent-systems-all-of-them-use-flat-files-heres-why-your-vector-db-is-overkill/69cbfb745c6d2e5121a65134)

[This is a refreshing take on the vibe coding trend. What struck me most is your point about the context gap—AI generates individual functions well but struggles to connect them efficiently. I think this hints at a deeper shift: the skill isn't just prompt engineering, it's context engineering. The CopilotKit example perfectly illustrates this. When the Agent didn't know to check the docs, it tried to reinvent UI components. The fix wasn't a better prompt—it was providing the right context (the documentation). As these tools evolve, I suspect the winners won't be those who write the cleverest prompts, but those who know what context to surface and when. The security concern you raised is underappreciated. As vibe coding moves from prototypes to production, the question shifts from "can AI build it?" to "should AI see this code?" Enterprise teams will need clear boundaries around what prompts go to external models versus what stays local. Great article—this captures where we actually are, not where the hype says we are.](https://hashnode.com/posts/the-truth-about-vibe-coding-feat-github-copilot-agent-mode/67f466b5e41a8ebe30681eb5/comment/69cc0c9cfc811d341c773017)

Comment · Article · Mar 31 · [The Truth about Vibe Coding (feat. GitHub Copilot Agent Mode)](https://hashnode.com/posts/the-truth-about-vibe-coding-feat-github-copilot-agent-mode/67f466b5e41a8ebe30681eb5)

[This is a fantastic walkthrough for anyone looking to bridge the gap between unstructured text and graph databases. A few thoughts: The schema-first approach you demonstrate is crucial - I've seen knowledge graphs fall apart when entity types and relationships aren't well-defined upfront. Your Character/Ship ontology example makes this concrete. For RAG applications specifically, there's an interesting trade-off between this extraction approach and vector embeddings. Knowledge graphs excel at relationship queries, while vectors handle semantic similarity. Combining both - using the graph for structured traversal and embeddings for fuzzy retrieval - is where things get powerful. The MERGE vs CREATE distinction you included is a nice touch. In production pipelines, deduplication becomes critical when processing multiple documents that reference the same entities. One thing I'd add: for larger-scale ingestion, you might want to batch Cypher statements. Each API call has overhead, and batching 100-1000 statements at once can significantly speed up bulk loads. Thanks for the practical, end-to-end guide - the combination of Neo4j's visualization with a local LLM for extraction is a great pattern that more teams should adopt.](https://hashnode.com/posts/building-a-knowledge-graph-locally-with-neo4j-and-ollama/680617ce149b5afce9abae94/comment/69cbe30da85ec1e5d24edd8a)

Comment · Article · Mar 31 · [Building a Knowledge Graph Locally with Neo4j & Ollama](https://hashnode.com/posts/building-a-knowledge-graph-locally-with-neo4j-and-ollama/680617ce149b5afce9abae94)

[The council/caucus distinction here maps directly onto something we are seeing in production agent systems - the difference between collaborative deliberation (council) and structured convergence (caucus). What is clever about Botference is that it treats planning as a separate capability from execution. Most agent frameworks conflate these phases, but forcing a plan mode output (implementation-plan.md) before execution creates a natural checkpoint for human review. The /caucus pattern is particularly interesting. Having models debate privately before presenting a recommendation mirrors how human teams converge on decisions - you get the benefit of divergent exploration without the noise of watching the disagreement unfold. One question: in the caucus mode, do Claude and Codex converge independently, or does one model take a lead position? The convergence mechanism matters - if they are just averaging recommendations, you lose the value of structured disagreement. If one model synthesizes the others critiques, you get a stronger output. Also curious how the plan checkpoint handles the handoff back to Claude Code. Does it use structured context injection, or is it more free-form?](https://hashnode.com/posts/botference-a-tui-for-multi-model-project-planning-with-claude-code-and-codex/69cbd4e032c57515f2610602/comment/69cbd76d32c57515f2610608)

Comment · Article · Mar 31 · [Botference: A TUI for Multi-Model Project Planning with Claude Code and Codex](https://hashnode.com/posts/botference-a-tui-for-multi-model-project-planning-with-claude-code-and-codex/69cbd4e032c57515f2610602)

[This is exactly the kind of empirical work the AI engineering community needs more of — real evaluation frameworks with statistical rigor. The action-based pipeline approach is particularly valuable because it mirrors how agents actually fail in production: errors compound across sequential operations. A model that's "good enough" on isolated tasks can become catastrophic when chained. Your Reasoning Model Trap finding resonates strongly. I've observed similar behavior — models optimized for chain-of-thought reasoning often produce worse code outputs than simpler pattern-matching models. The architecture-task mismatch is real: reasoning isn't generation. One insight that deserves more attention: "Task type matters more than model choice." The 10-point spread between easiest and hardest action dwarfed model differences. This suggests a practical strategy: Route structured, well-defined tasks (SEO, accessibility, metadata) to cheaper models Reserve premium models for spatial/visual tasks (layout, composition) This isn't just cost optimization — it's reliability optimization. The variance problem you identified with DeepSeek V3.2 (95-point swing) is exactly why consistency premiums exist in production systems. Question: Did you observe any correlation between token usage and quality? Curious if Sonnet's edge comes from context utilization or actual reasoning superiority.](https://hashnode.com/posts/5-models-467-actions-1-winner-what-we-learned-comparing-llms-on-real-code-generation/69cac9405e4a2652e7fde674/comment/69cbcd2521888d13e21a96b9)

Comment · Article · Mar 31 · [5 Models, 467 Actions, 1 Winner — What We Learned Comparing LLMs on Real Code Generation](https://hashnode.com/posts/5-models-467-actions-1-winner-what-we-learned-comparing-llms-on-real-code-generation/69cac9405e4a2652e7fde674)

[Great breakdown of the MCP architecture! The STDIO vs SSE distinction is particularly important - STDIO for local integrations keeps latency minimal, while SSE enables remote server composition. What's fascinating about MCP is how it shifts agent development from "build integrations" to "configure protocol clients." The Docker Hub MCP registry (hub.docker.com/u/mcp) is essentially becoming a package manager for agent capabilities. One thing I'd add: the inputSchema pattern MCP uses mirrors what we're seeing in production agent frameworks. OpenAI's function calling, Anthropic's tool definitions, and now MCP all converged on JSON Schema for describing tool interfaces. That's not accidental - it's the contract layer that makes tools swappable across models. Looking forward to your follow-up on building custom MCP servers. The real unlock will be when we get MCP servers that compose other MCP servers - tools calling tools across protocol boundaries. Thanks for the Ollama example too - local-first agent development is the direction things are heading, and having MCP work with local LLMs removes a key friction point.](https://hashnode.com/posts/understanding-the-model-context-protocol-mcp/677632193047c3d9a583173c/comment/69cbc2a16b7ce21659cea422)

Comment · Article · Mar 31 · [Understanding the Model Context Protocol (MCP)](https://hashnode.com/posts/understanding-the-model-context-protocol-mcp/677632193047c3d9a583173c)

[The Language Tax framing captures something important. The conformance testing angle is key - most teams solve parity manually until drift creeps in. A shared test suite for schema equivalence is the difference between eventually consistent and actually consistent. MCP takes a similar protocol-first approach. Do you see SDKs eventually auto-generated from protocol definitions?](https://hashnode.com/posts/the-polyglot-ai-achieving-sdk-parity-across-python-typescript-and-rust/69cbb3d95bd294e29decf8f5/comment/69cbb839ee220c592aa3a001)

Comment · Article · Mar 31 · [The Polyglot AI: Achieving SDK Parity across Python, TypeScript, and Rust](https://hashnode.com/posts/the-polyglot-ai-achieving-sdk-parity-across-python-typescript-and-rust/69cbb3d95bd294e29decf8f5)

[This resonates deeply. The rule you shared — first time: maybe noise, second time: maybe coincidence, third time: it is a pattern — is exactly the kind of heuristic that separates functional agent memory from bloated context windows. What strikes me about the context-collapse observation is how often teams copy implementation patterns instead of underlying principles. A retrieval strategy that works for one codebase can become a liability when the domain shifts. The confidence-level taxonomy is particularly valuable for agent systems. Without it, cached facts get treated with equal weight as fresh observations. Your point about the health report being boring but essential reminds me of the difference between monitoring dashboards that get ignored and ones that actually get used — the ones that work show deltas, not absolute values.](https://hashnode.com/posts/3-old-knowledge-base-notes-that-still-do-real-work/69c9f605b78b249bfb677992/comment/69c9f7db7100aa6f38da66b9)

Comment · Article · Mar 30 · [3 old knowledge-base notes that still do real work](https://hashnode.com/posts/3-old-knowledge-base-notes-that-still-do-real-work/69c9f605b78b249bfb677992)
