Skip to content
Janeiro.ai

Library

Patterns

Production architectures for AI systems that must work under real constraints—cost, language, latency, and institutional trust across LatAm and Lusophone markets.

Deep Patterns

Decision criteria, failure modes, primary sources

Pattern

LGPD-Aware Data Paths in RAG Pipelines

Keep personal data off the wrong RAG hop in Brazil: classify at ingest, split indexes, control prompt and log copies, and make deletion a full graph walk.

9 min read · lgpd

Read pattern
Pattern

Constitutional Critique and Revise

A second pass that checks a written constitution—tone, safety, Portuguese UX—then revises. It catches copy. It does not authorize money transfers.

6 min read · safety

Read pattern
Pattern

Human-in-the-Loop for High-Risk Agent Actions

Pause agents before money, HR, or production changes: risk gates, durable interrupts, approval UX that shows blast radius, and fail-closed timeouts in ops.

8 min read · agents

Read pattern
Pattern

Agent Memory with Consent and Eviction

Treat agent memory as a data plane: working, summary, and vector layers with tenant ACL, TTL, consent, and a deletion walk—not an unbounded transcript.

7 min read · agents

Read pattern
Pattern

Multi-Agent Supervisor Without Cosplay

Add a supervisor only when roles are real: typed handoffs, summarized worker output, cost caps, and one finish path—not a committee of chatbots in prod.

5 min read · agents

Read pattern
Pattern

Plan-and-Execute Instead of Wandering

Plan once, execute cheaply: JSON steps with success checks, a smaller executor, and replan only on failed gates—not an unbounded ReAct wander in prod.

6 min read · agents

Read pattern
Pattern

ReAct Tool Loops in Production

Ship ReAct loops that actually terminate: typed tools, observation trust boundaries, step and spend budgets, and idempotent side effects in production.

8 min read · agents

Read pattern
Pattern

Structured Output That Fails Closed

Fail closed on model JSON: versioned schemas, constrained decoding, one repair loop, and no side effects until validation passes—treat output like an API.

6 min read · agents

Read pattern
Pattern

Tool Use with Least Privilege

Least-privilege tool registries: typed schemas, role ACL, timeouts, idempotency keys, and redacted logs—before a model can touch CRM, SQL, or Pix rails.

6 min read · agents

Read pattern

Reference

Compact calendar notes

Shorter operational notes. Use a Deep Pattern when you need implementation contracts and citations.

Pattern

Tool Contracts for Agents That Touch Money

Schema, idempotency, and refusal rules for agents that create tickets, quotes, or payments under thin margins and high dispute cost.

1 min read · agents

Read pattern
Pattern

Provenance Citations Operators Can Verify

Citation UX that shows source, jurisdiction, and freshness—so a local operator can challenge the answer, not decorate it.

1 min read · rag

Read pattern
Pattern

Jurisdiction Filters Before You Rank

Filter retrieval by market, language variety, and regulatory scope before semantic ranking—so global similarity cannot override local law.

1 min read · rag

Read pattern
Pattern

Golden Sets in the Languages You Ship

Author and freeze a small prompt suite in PT-BR, PT-PT, and Spanish that blocks merge when product surfaces regress.

1 min read · evals

Read pattern
Pattern

Cost-Aware Model Routing Under FX Pressure

Split traffic across frontier, mid-tier, and open-weight paths with hard token budgets—so a 10% FX move does not break the product.

1 min read · routing

Read pattern
Pattern

Retrieval with Regional Context

Ground answers in evidence that reflects local language, regulation, and business reality—not only English corpora.

1 min read · rag

Read pattern
Pattern

Eval Gates Before You Ship

A minimal regression gate so Portuguese and Spanish product surfaces do not silently degrade between releases.

1 min read · evals

Read pattern

Newsletter

Signal, not noise.

Monthly intelligence for builders resetting judgment across LatAm, Brazil, Portugal, and emerging markets—signal, not hype.

Subscriptions are temporarily unavailable.