Build Agents That Don’t Fail in Production
...a step-by-step guide (with code).
Open-source plugin to give coding agents live web data
A key limitation of coding agents today is that they can’t fetch live web data on their own.
And platforms like LinkedIn, X, and Reddit (where a ton of developer discussions happen) are notoriously hard to scrape due to bot detection, CAPTCHAs, and JavaScript rendering.
Bright Data open-sourced a skills plugin (brightdata/skills), which provides live web access directly into Claude Code, Cursor, Windsurf, and 40+ other coding agents, with automatic handling of all those access barriers.
You can use it to scrape any webpage as clean markdown, run Google searches that return structured JSON, and extract structured data from 40+ platforms, including Amazon, LinkedIn, YouTube, TikTok, and Reddit.
Thanks to Bright Data for partering today!
How to build Agents that don’t fail in production
Here are some damages caused by AI in production:
Replit’s Agent wiped out a production DB.
Zillow lost $304M due to its home-buying AI.
iTutor paid $365k when AI auto-rejected old applicants.
Today, let’s learn how to build Agents that don’t fail in production (with code).
One primary challenge with customer-facing AI agents is that they either escalate the issue too quickly to a human agent or confidently mislead the user.
Also, it’s not just the frequency of mistakes, but their severity, especially when even the worst 0.001% could matter.
Talking specifically about user-facing use cases, placing control guidelines and embedding business logic into instruction-following Agents is helpful.
Let’s use Parlant (open-source with 18k stars) to build a compliant conversational finance agent that processes and approves loans.
Parlant is a framework to build customer-facing agents that behave exactly as instructed.
1️⃣ Create Agent
We start by defining a loan-approval Agent.
Next, we declare some domain-specific terms the Agent may need to know to answer confidently.
2️⃣ Journey
Parlant introduces the idea of Journeys. They inform the Agent about the multi-step conversational flow that helps it guide the user through the conversation as intended.
Check this loan approval journey:
This provides the following Journey:
Determine the type of loan the user wants
Collect loan and income-related details
Call the tool to check eligibility
End if not eligible, else ask them to upload docs
Call the tool to process the uploaded docs
End if invalid docs, else loan approved
3️⃣ Guidelines
Guidelines in Parlant tell the agent how to approach specific situations through condition-action pairs.
This provides more control over the agent’s behaviour.
This reduces misalignments by ensuring the Agent’s behavior aligns with the business needs.
We can do more things to embed more control, but this simple setup itself gives a powerful instruction-following Agent.
In the video below, no matter what we try to get a loan approved, the Agent refuses to do so.
You can also inspect the exact reasoning.
This was just the primer on what you actually do with Parlant. We are still exploring and will cover more on building extensive, production-grade, and user-facing AI systems that don’t fail.
Building Agents is about engineering “behavior” at scale. So you cannot vibe-prompt an Agent and expect it to work.
Parlant gives the structure to build Agents that behave exactly as instructed.
In the meantime, here’s the Parlant GitHub repo →
The code for today’s issue is available in this GitHub repo →
Thanks for reading!
P.S. For those wanting to develop “Industry ML” expertise:
At the end of the day, all businesses care about impact. That’s it!
Can you reduce costs?
Drive revenue?
Can you scale ML models?
Predict trends before they happen?
We have discussed several other topics (with implementations) that align with such topics.
Here are some of them:
Learn everything about MCPs in this crash course with 9 parts →
Learn how to build Agentic systems in a crash course with 14 parts.
Learn how to build real-world RAG apps and evaluate and scale them in this crash course.
Learn sophisticated graph architectures and how to train them on graph data.
So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches here.
Learn how to run large models on small devices using Quantization techniques.
Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using Conformal Predictions.
Learn how to identify causal relationships and answer business questions using causal inference in this crash course.
Learn how to scale and implement ML model training in this practical guide.
Learn techniques to reliably test new models in production.
Learn how to build privacy-first ML systems using Federated Learning.
Learn 6 techniques with implementation to compress ML models.
All these resources will help you cultivate key skills that businesses and companies care about the most.










