Notes from the foundry
Engineering essays on generative AI, retrieval systems, and what it takes to ship intelligent software to production.

agent-for-accounting: An Open-Source AI Agent for Bank-to-Ledger Reconciliation
We open-sourced an AI agent that reconciles a bank statement against a ledger, computes MACRS depreciation, and refuses to give tax advice. Here's what it actually does, and the double-counting bug fuzzing caught that reading never would have.

AI Coding Agents in Large Codebases: Why Repository Intelligence Beats a Bigger Context Window
AI coding agents in large codebases fail because the context that makes a change correct rarely lives in the file they're editing, and repository intelligence, instruction files, commit history, and subsystem scoping are how you fix that.

Claude Opus 5 vs Grok 4.5 vs Muse Spark 1.1: Which Agentic Model to Use in 2026
An independent comparison of the three agentic models that launched this month. Real pricing, production failure modes, cost per completed task, and the routing table we actually run, not a benchmark aggregation.

Claude Opus 5 Batch API Tutorial: AI Contract Data Extraction at Scale, with Real Costs
A step-by-step tutorial for bulk AI document extraction with the Claude Opus 5 Batch API: structured outputs with JSON schemas, 50% batch pricing, the 300K output beta, and the real cost of processing 40,000 vendor contracts.

Claude Opus 5 Effort Parameter Guide: How to Reduce Claude API Costs Without Switching Models
How to use the Claude Opus 5 effort parameter (low, medium, high, xhigh, max) to cut Claude API costs. Real per-request cost numbers, working Python code, and why we retired our Haiku/Sonnet/Opus routing layer.

How to Build a Long-Running AI Agent with the Claude Opus 5 API: An Overnight Build Log
A hands-on guide to building autonomous AI agents on the Claude Opus 5 API: the agent loop in Python, mid-conversation system messages, prompt caching costs, and what an overnight dependency-upgrade run actually cost.

How to Handle Claude Opus 5 Refusals in Production: stop_reason, stop_details, and the Fallbacks Parameter
Claude Opus 5's safety classifiers can decline requests with stop_reason: refusal, even on legitimate security work. How to handle refusals in the Claude API, use the new fallbacks parameter, and design pipelines that degrade gracefully.

Grok 4.5 API Review: Pricing, Performance, and When to Use It Instead of Claude
An honest Grok 4.5 review after a week in a production agent stack. Grok 4.5 API pricing ($2/$6 per MTok), OpenAI-compatible integration code, reasoning effort settings, and a Grok 4.5 vs Claude Opus 5 routing comparison.

Build a Realtime Voice Agent with Grok
A hands-on Grok Voice API tutorial: WebSocket setup, turn detection, and function calling for live order lookups in a support agent.

How to Build a Multilingual AI Voice Agent with Grok Voice: Hindi, Spanish, and 20+ Languages
A practical guide to building a multilingual AI customer support voice agent on Grok Voice: the new 26-voice roster, language hints, key terms for code-switched speech, pronunciation maps, and custom brand voices.

How to Connect an AI Voice Agent to a Real Phone Number: Grok Voice SIP Setup and Cost Breakdown
Build an AI phone answering service on Grok Voice: SIP integration, native G.711 telephony audio, VAD tuning for phone calls, and the real per-call cost of an after-hours AI answering agent versus a human service.

Meta Model API Tutorial: How to Get Started with Muse Spark 1.1 (Pricing, Setup, First Agent)
A hands-on Meta Model API guide: Muse Spark 1.1 pricing at $1.25/$4.25 per million tokens, OpenAI- and Anthropic-compatible endpoints, working Python setup code, and an honest look at what the public preview is missing.

How to Migrate to the Claude Opus 5 API: Breaking Changes, 400 Errors, and a Production Checklist
A Claude Opus 5 migration guide from a team that did it on launch day. Every breaking change in the claude-opus-5 API, the exact 400 errors you'll hit coming from Opus 4.8, and the fixes with working Python code.

How to Build a Computer Use Agent with Muse Spark 1.1: Cross-Application Workflows That Actually Finish
A practical guide to building computer use agents on Muse Spark 1.1: batched actions, the script-versus-click decision, handling data that changes mid-task, and the guardrails you need before pointing one at a real system.

Multi-Agent Orchestration with Muse Spark 1.1: How Subagent Delegation Actually Works in Production
Muse Spark 1.1 was trained to act as both orchestrator and subagent, with planning mode, goal conditioning, and context compaction. How to build a multi-agent system on the Meta Model API, and when a single agent is still the better call.

Context Engineering for AI Agents: Managing the Context Window in Production
Context engineering for AI agents is now the skill that decides whether a long-running agent works, and it means managing context rot, compaction, and the agent context window instead of writing a better prompt.

How to Evaluate a New LLM in 48 Hours: The Shadow-Mode Playbook
A repeatable process for deciding whether a newly launched model belongs in your stack: shadow-mode traffic, the four metrics that matter, and why benchmark tables should never drive your routing table.

We Open-Sourced an AI Agent That Catches the Markup/Margin Error Costing Contractors Money
agent-for-field-service is a free, self-hosted AI copilot for HVAC, plumbing, electrical, and roofing contractors that prices jobs to a real margin instead of a markup that only looks like one.

How to Automate a Legacy System That Has No API (Without Waiting for IT)
Insurance portals, ERP terminals, and vendor tools that predate integration all block automation the same way: no API. How computer use agents work around it, what they cost, and the guardrails enterprises need first.

We Open-Sourced an AI Agent That Vets Freight Carriers Against FMCSA
agent-for-logistics checks a carrier's authority, insurance, and safety rating in one call and flags the double-brokering pattern before you tender a load. Here's how it's built.