Skip to content
Blog

Technical Guide

AI Agents in Production

Architecture, testing, tool use, MCP and hallucination mitigation for agents that do real work.

agentes IA produccióntesting agentes IAMCP tool usemulti-agent orchestration

Why your vault index matters more than your note count

Hoarding notes doesn't scale with AI. How an _INDEX.md became the vital contract to stop my agents from breaking the blog.

AIAgents PKMObsidianCotocha

Why sub-agents work better as reviewers than concurrent writers

Throwing 5 agents to write code in parallel is a disaster. Why we inverted the pattern: 1 writer and 5 blind adversarial reviewers.

AIAgentsArchitectureOpenCode

My B2B tech stack: How I use NotebookLM and Obsidian to close healthcare deals

Selling clinical software requires processing hours of meetings and dense PDFs. Here is the AI workflow I use to turn raw documents into lethal proposals.

AIAutomation ObsidianB2BDigital Health

Clinical AI Fails Because of Data, Not the Model

A clinical model can sound correct and still fail if it receives PDFs, free text and lab results without traceability. The problem starts before the prompt.

AI Digital HealthFHIRInteroperability

Interoperability does not start by connecting everything

Why FHIR/Core-CL pilots should start with one bounded flow, synthetic data and evidence before touching production.

Architecture ExamyaInteroperabilityFHIR

Law 21.719 in clinical software: consent and real ARCO-P

How I turned privacy into architecture for Examya: consent ledger, ARCO-P, reporting and self-service before December 2026.

Architecture ExamyaDigital HealthCompliance

Human-in-the-loop is not enough: designing real oversight for medical AI

Medical AI oversight is not a doctor watching a screen. It requires authority, traceability, escalation, drift monitoring, and auditable evidence.

AIArchitecture Digital HealthComplianceHealthcare

AI does not fix broken processes: it accelerates them

Before automating with AI, teams need to map decisions, data, traceability and rules. If we automate chaos, we only get faster chaos.

AIAutomationArchitecture Healthcare

NEW, REVIEW, DUPLICATE: the guard that stops a content agent from writing the same post ten times

How I designed a deterministic three-state guard to prevent my content agent from repeating topics on the blog

AgentsAutomationTestingArchitecture

Fhirex by Examya: FHIR pilots without touching production

Why we launched fhirex.examya.cl: FHIR/Core-CL pilots with synthetic data, technical evidence, and IT review before production.

Architecture ExamyaInteroperabilityFHIR

Forensic Code Cleanup: deleting code with discipline

How I deleted 12 zombie files in Shuri with forensic cleanup, ripgrep, tests, and adversarial review as the final guardrail.

AgentsTestingArchitectureProduction DevelopmentTypeScript

The clinical lab as a digital health API

A clinical lab already receives orders, processes samples, and returns results. The missing layer is treating it as a clinical API.

Architecture Digital HealthInteroperabilityFHIR

Compliance is not a feature: it's evidence

In digital health, a working feature is not enough. Without auditable traceability, it does not exist for the regulator.

ArchitectureProduction Digital HealthExamyaCompliance

100% Compliant: How we closed all 36 MINSAL verifiers in record time

Closing MINSAL accreditation (Law 21.541) isn't just about coding. Here's how we jumped from 33% to 100% compliance in a single weekend.

Architecture Digital HealthExamyaCompliance

Democratizing FONASA MLE Access: Open Data and an MCP Server

How we transformed the FONASA medical exam catalog into an AI-ready tool with an MCP server and 7-digit normalized data.

AIMCP Digital HealthFONASA

Prisma Schema Migration: How to Survive Local Hell in a Health Monorepo

Field lessons on the pitfalls of schema migrations in a medical monorepo with multiple databases and development environments.

AI PostgreSQLPrismaDevelopment

Unit Testing and TDD in AI Agents: Lessons from the Examya Battlefield

How I implemented unit testing and TDD in my medical AI agent, the challenges encountered, and the solutions that actually work in production.

TestingAgentsAIProduction ExamyaDevelopment

Field Engineering: How We Built a Portable Molecular Lab in Patagonia

The technical details behind BioHealth: How we packed RNA extraction, microfluidics, and 4G connectivity into a toolbox to operate in Torres del Paine.

Architecture InfrastructureMedicalBiohealth

The mistaken OpenAI email that forced us to migrate 45,000 embeddings

We migrated 45,678 medical vectors due to a false deprecation notice. How an OpenAI mistake improved our clinical precision by 37%.

AIArchitecture ExamyaPostgreSQL

OCR Routing Architecture in Examya: How a Photo Decides the Entire Flow

Deep dive into Examya's OCR routing architecture: how a medical photo decides between quotation and lab result interpretation.

AIArchitecture ExamyaWhatsAppOCR

Hallucinating Sub-Agents: Detection and Mitigation Protocol in Production

How to detect and mitigate when AI sub-agents report incorrect information: a real case with gemini-flash and the 4-command protocol.

AIAgentsTestingProductionOpenCode Examya

How I Built Patagonia's First Private COVID PCR Lab (And Why I Ended Up Building AI)

In March 2021, I hoisted 300 kg of biosafety cabinet by crane to a second floor during lockdown. By May we were running the first private COVID PCR tests in Chilean Patagonia. The nights that followed became the real origin of Examya.

AI ExamyaHealthcarePatagonia

Multi-Agent Orchestration vs Single Agent: Lessons from the Trenches

My journey building Cotocha: why multi-agent orchestration beats single agents in real-world projects.

AIAgentsArchitecture CotochaOpenClaw

When your sub-agent lies: 3 failing tests that gemini-flash swore were passing

gemini-flash reported 'all tests passing': 3 tests were failing, 353 lines of stray package-lock.json included. The 4-command protocol I built to audit sub-agents in Examya.

AITestingAgentsOpenCode Examya

From 0 to WhatsApp Payments: Mercado Pago + Stripe from a Single Conversation

How I built a payment system embedded in WhatsApp that processes medical orders and charges automatically with Mercado Pago and Stripe.

Architecture WhatsAppPaymentsMercado Pago

Clinical labs: the missing piece for healthcare interoperability in Chile

We mapped 245 clinical labs from Arica to Punta Arenas. Four out of ten lack a functional digital presence. Law 21.668 will force them to interoperate in 2026. Here are the ground-level data.

Automation Digital HealthClinical LabsInteroperability

PostgreSQL + Drizzle ORM: My Favorite Stack for AI Projects

How Drizzle ORM transformed my backend development in AI projects with TypeScript type safety and production performance.

AI PostgreSQLDrizzle ORMTypeScript

Chile now requires clinical record interoperability: why this changes everything for digital health

Law 21.668 mandates all healthcare providers in Chile to make clinical records interoperable. I analyze what this means technically, which standards are coming (FHIR, SNOMED CT, AIToF), and how Examya is preparing for this newly mandatory market.

AI Digital HealthInteroperabilityFHIR

Crowdsourcing medical prices: how Examya builds cost transparency layer by layer

The real architecture behind Examya's 3-layer pricing intelligence: FONASA data, user crowdsourcing, and order generation from WhatsApp. With code, design decisions, and real bugs.

AIAgents ExamyaCrowdsourcingFONASA

Medical OCR on WhatsApp: how my agent reads exam orders and lab results

The real architecture behind Examya's OCR pipeline: how an AI agent classifies WhatsApp photos, decides if they're medical orders or lab results, and automatically generates FONASA quotes. With real bugs and design decisions explained.

AIAgentsArchitecture OCRWhatsAppExamya

DeepEval: how I measure the quality of my medical agent with objective metrics

How I built an evaluation layer with DeepEval to measure the quality of Shuri, Examya's medical agent. With real data: from 20% to 70% on E2E, custom metrics for Chile's FONASA system, and why gpt-5-nano doesn't work for structured output.

AIEvaluationTestingAgentsProduction DeepEvalExamyaLLM

Bidirectional Mac-VPS Sync with Engram: the brain that never sleeps

A technical tutorial on building a bidirectional sync pipeline between a Mac, a VPS in Germany, Engram, Obsidian, and the Karpathy knowledge management method. Using Python scripts, git, and cron jobs.

AIAutomation ObsidianEngramVPS

pgvector + Embeddings in Production: The Foundation of Medical Reasoning in Examya

Architecture for semantic search and text similarity in production with pgvector, pg_trgm, and real MINSAL data.

AIProduction PostgreSQLpgvectorExamya

My Digital Brain: How I Connected Memory, Knowledge, and Automatic Publishing

How I built a system that extracts AI memories from a VPS, organizes them in Obsidian Karpathy-style, and publishes articles automatically to a blog, X.com, and LinkedIn.

AIAutomationAgents ObsidianEngramPKM

MCP / Tool Use: The Future of Real Tool Integration

How Model Context Protocols are revolutionizing the way AI agents interact with external tools to execute complex tasks.

AIAgentsMCPAutomation Integration

One Week of Building: 82 Decisions That Shaped an AI Product

What Engram's memories reveal about a real week of development: bugs caught, architecture hardened, and the invisible decisions that make a medical agent work.

AIAgents DevelopmentExamyaOpenClaw

Examya: how I built a medical WhatsApp agent that processes exam orders

Technical details of implementing the Shuri agent in Examya, a system for processing medical orders via WhatsApp with FONASA integration.

AIAgents WhatsAppExamyaFONASA

From Equipment on the Street in Full Lockdown to Building AI Agents in Patagonia

I'm not the developer who learned to code on YouTube. Twelve years solving real problems in healthcare, management and business before writing a single line of code. This is the story.

AI StoryPatagoniaBiohealth

Cotocha: the agent orchestrator that runs my life from a VPS

How I built an AI agent system that handles infrastructure, alerts, databases, and blogging from a server in Germany. No middlemen, no fancy dashboards.

AIAgentsAutomation OpenClawPatagonia