Hey, I'm Marcos
Senior Full-Stack Software Engineer · AI Agents, LLM & MCP Systems

Full-stack engineer with 17 years in tech, from Linux game servers under DDoS to an agent platform that automates US mortgage-loan processing. I ship the whole product, from the React front end to the cloud infra, plus the parts that make LLMs safe in production: confidence gates, evals, cost controls, tracing and MCP tooling.

Building agent platforms at House NumbersFlorianópolis, Brazil · working remotely with US teams
Marcos Kuchak
Fig. 1Marcos Kuchak Filho, Florianópolis, Brazil
Fig. 02How my agents decide

Every workflow runs the same five steps.

Each dot is an event. Most never reach the model. The ones that do act alone only when confidence is high, and the rest wait for a person to approve.

  1. 01Event5 SQS queues + scheduled heartbeat
  2. 02Deterministic checksPre-filters and risk fingerprint skip calls when nothing changed
  3. 03LLM handlerMulti-provider slots, fallback Anthropic → OpenAI → Google
  4. 04Confidence gateHigh confidence acts alone, the rest waits for a human
  5. 05Action + audit log14 action types, double-execution-safe approvals
agent-service · pipelinesimulated
Fig. 2Simulated events moving through the real pipeline.
years in tech
since 2009
AI workflows in production
proactive and reactive
MCP tools behind OAuth 2.1
used by Claude, GPT and Cursor
LLM cost cut
on the highest-spend workflow
merged PRs in 12 months
across 12 repositories
users in a few weeks
SEO for a viral media startup
Chapter 01The through-line

Same job for 17 years. Different tools.

I keep getting hired to make unreliable things behave.

In 2009 it was game servers taking DDoS attacks. Then viral traffic spikes, phones with no signal, edge runtimes nobody trusted yet.

Now it's language models. They are the most useful unreliable component I've ever worked with, and the engineering around them is where I spend my days.

DDoS→Viral spikes→Offline-first→Edge→LLMs
Chapter 02How I build agents

Seven rules I learned shipping LLMs to production

None of these came from a blog post. Each one came from a bug, an invoice or a 3am alert.

  1. Deterministic first, LLM second

    If code can answer it, the model doesn't get asked. Pre-filters drop loans with no signal, and a risk fingerprint skips the call when nothing changed since the last run.1

  2. Confidence gates, not blind autonomy

    High-confidence actions run on their own. Everything else lands in a processor's inbox for approval, with an audit log either way. Some workflows can never auto-send, by design.2

  3. Ground truth beats clever prompts

    When agents started inventing "X blocks Y" explanations, the fix wasn't a longer prompt. I gave them a tool that returns the real blockers and a rule to verify before sequencing.3

  4. Evals come from production

    Every hallucination that reaches a person becomes a fixture. Deterministic assertions catch the obvious, LLM-as-judge covers the rest, and both run on real cases.4

  5. Trace every call, price every token

    Every run records a five-part cost breakdown. A worker checks each hour for runs that should have fired and didn't, because the failure you never see is the expensive one.5

  6. Give the model less

    Smaller context is cheaper, faster and safer. Trimming one workflow from ~70K to ~2K tokens per step also closed a path where portal credentials reached the LLM provider.6

  7. Ship dormant, cut over boring

    Feature flags per tenant, per loan and per user. The legacy system keeps running in parallel. The cutover day should be the least interesting day of the project.7

Chapter 03Selected work

Systems I designed and own

Most of this runs at House Numbers, a San Francisco fintech automating mortgage-loan processing with AI agents.

Feature 01 / 06House Numbers2025 – now

An AI agent platform, from zero to 13+ workflows

A framework-agnostic service that consumes five SQS queues and runs every workflow through the same pipeline: deterministic checks, an LLM handler, a confidence gate, then an audited action.

  • Proactive workflows like a daily risk brief that sorts every active loan into FIRE, AT-RISK, WATCH or Monitor
  • Reactive workflows for borrower and lender email, inbox triage and document recovery
  • 14 action types behind an executor registry, with atomic approvals that can't run twice
  • Heartbeat and expectation workers that detect runs that silently never happened
TypeScriptNode.jsExpressMastraAWS SQSECS FargateMongoDB
13+
production workflows
5
SQS event queues
14
action types
Feature 02 / 06House Numbers2026

An MCP gateway agents can actually use

An OAuth 2.1 microservice that exposes loan data to Claude, GPT and Cursor through the Model Context Protocol. Stateless Streamable HTTP, scope-gated tools, RFC 9728 discovery and Redis rate limiting.

  • Standardized names and schemas across ~90 tools, so agents stop guessing which parameter means "which loan"
  • A response shaper that cut tool payloads by ~80% with near-zero information loss
  • Fixed OAuth interop with the Claude Code CLI
  • A 39-test integration suite that mocks only the true external boundaries
MCPOAuth 2.1ClerkRedisTerraformKubernetes
44% → <10%
tool-call failure rate
~90
MCP tools
−80%
payload size
Feature 03 / 06House Numbers2026

LLM cost and observability, built in

A pricing package for Anthropic, OpenAI and Google, a tracing wrapper with a five-part cost breakdown, a traces API and a React dashboard. Then I used it to make the platform cheaper.

  • Deterministic pre-filter plus risk fingerprint on the workflow that was ~36% of agent LLM spend
  • Per-workflow model slots with up to four fallbacks, validated at startup
  • Opus → Sonnet on a high-volume workflow for ~5x lower cost across ~93 daily calls
  • Slack alerts on failures and a fix for a 2x metric-inflation bug
AnthropicOpenAIGeminiNew RelicReactRecharts
80–85%
cost cut, top workflow
~5x
cheaper after model swap
~70K
wasted MCP calls/tenant/yr removed
Feature 04 / 06House Numbers2025

An audit-log microservice in one week

Designed, built and launched an event-driven changelog service with field-level AES-256-GCM encryption for PII, then wired it into five services and the web app.

  • ~19.5K lines in the foundation PR, in production via Terraform and ECS the same week
  • Type-inferred metadata filtering and a JSON:API query layer
  • Activity feed with IP geolocation, device parsing and infinite scroll
Node.jsMongoDBTerraformECSReact
1 week
idea to production
5
services integrated
AES-256
field-level PII encryption
Feature 05 / 06House Numbers2025

Instant search on any loan field

Algolia end to end, with secured per-tenant keys, 18 virtual replicas for sorted queries, real-time sync from the message bus and an automatic MongoDB fallback.

  • Hybrid client and server search with match highlighting and rich previews
  • A provider-agnostic entity-events system, so the index can change without touching services
AlgoliaMongoDBReact
3–10s → 50–100ms
search time
18
virtual replicas
Feature 06 / 06Trinnix AI2024 – 2025

Multi-agent framework, before the frameworks

As tech lead at an agritech startup, I built a provider-agnostic agent framework with pluggable adapters for OpenAI, Anthropic and Gemini, specialized vertical agents and background handoffs, before TypeScript agent frameworks matured.

  • A conversational BI tool that renders live charts inside the chat, so farmers query field operations in plain language
  • TypeScript monorepo with hexagonal architecture: 30% less duplication, 40% faster delivery
  • Passwordless OTP login that raised retention by 25%
TypeScriptNext.jsFastifytRPCPostgreSQLLangChain
+40%
delivery speed
+25%
retention
Chapter 04Journey

From game servers to agents

Scroll →
2009 – 2014 · Infra

Gamehaus

SysOps Engineer
Ijuí, Brazil

Kept online game servers alive. DDoS mitigation with proxies on dynamically scaled EC2 instances, migrations across seven infrastructure providers, 99.9% uptime.

2014 – 2017 · Web

Independent

Full-Stack Developer
Florianópolis, Brazil

Web and e-commerce projects end to end, from the first call with the client to production. PHP, Laravel, Node.js.

2017 – 2019 · Scale

Media Innovation Solutions

Senior Full-Stack Developer
Porto Alegre, Brazil

Viral content at scale. SEO for React apps that brought 1M+ users in a few weeks, and a tool that adjusted Facebook and Google ad spend in real time based on ROI.

2020 – 2023 · Mobile

EXEC Technologies

Senior Software Engineer
Florianópolis, Brazil

Consultancy work across clients. A React Native e-commerce app that beat the mobile site by 35% in conversion and 20% in order value, and an offline-first research app that cut data-entry errors by over 90%.

2022 · Edge

Unijuí

B.Sc. Computer Science
Thesis

A real-time chat running entirely on serverless edge computing with Durable Objects, back when that was still an experiment.

2024 – 2025 · Agents

Trinnix AI

Lead Full-Stack Engineer
Remote

Tech lead for an agritech product. Built a multi-agent framework and a conversational BI tool with a team spread across Brazil, the US, England, India and Pakistan.

2025 – now · AI platform

House Numbers

Senior Full-Stack Engineer
San Francisco, remote

Architected the AI agent platform, the MCP gateway and the cost and observability layer behind AI-assisted mortgage-loan processing.

Chapter 06Writing

Field notes

Long-form notes on what actually works with agents in production.

Coming up

  1. Confidence gates: letting agents act alone without losing sleepAgents
  2. Cutting LLM cost 80% without changing the modelCost
  3. Designing MCP tools agents can actually callMCP
  4. Your agent doesn't need the passwordSecurity
All posts →
Stack

What I reach for

AIAnthropic●OpenAI●Gemini●MCP●Mastra●LangChain●RAG & embeddings●Evals●LLM-as-judge●Full-stackTypeScript●Node.js●React●Next.js●React Router●Express●Fastify●tRPC●Zod●DataPostgreSQL●MongoDB●Redis●Algolia●AWS SQS●RabbitMQ●InfraAWS●ECS Fargate●Lambda●Terraform●Docker●Cloudflare Workers●GitHub Actions●New Relic●MobileReact Native●Expo ●
Last page

Building something with agents?

I like talking about agent architecture, MCP, evals and LLM cost. Send a note.

Education
B.Sc. Computer Science, Unijuí (2022)
Languages
Portuguese (native) · English · Spanish
Based in
Florianópolis, Brazil