Nearly 7 out of 10 AI projects inside Brazilian companies stall, become an internal joke, or simply never leave the PowerPoint. It is not because of the model, the cloud vendor, or the size of the budget. It is because of the order in which things were done. Building an AI agent has a sequence. Whoever skips a step pays for it later.
This text describes the seven real phases from those who have already put AI agents into production, with real customers conversing every day. It is not a theoretical roadmap. It is what remained after scraping what works from what only generated meetings. It is for business owners, operations directors, product managers, or technology leads who are about to approve (or have already approved) a budget and want to know if it is going to fail before it does.
1. Before phase 1: the "what for" needs to be locked in
Every first project meeting starts with the wrong question: "which model are we going to use?" The right question is: "which business decision changes when this agent is running?" If you answer "we will respond faster," the answer is weak. Faster at what, for which type of customer, with what gain in margin or NPS?
An agent with no clear target cannot be measured. And what is not measured becomes opinion. And opinion does not fund the second quarter of a project. Before any line of code, fix the target: "reduce average first response time in customer support from 18 min to 2 min, without NPS dropping below 70." That is the kind of target that holds a project together.
2. Phase 1: map the process that will become an agent
Before AI, process. You cannot automate what you cannot describe. Sit down with the team doing the task today (customer service rep, salesperson, analyst) and ask them to walk through, step by step, what they do when a request comes in. Not the idealized version. The real version, with workarounds, separate spreadsheets, calls to a colleague, and everything else.
It will be alarming: the process is messier than the org chart suggests. That is fine. That is where the important decisions live (when the rep escalates to a supervisor, which exceptions they accept, when they refuse). Without mapping this, the agent will feel like it was trained on another planet.
Realistic time: 1 to 2 weeks. Whoever skips this step to "save time" loses 3 months later fixing absurd answers the agent is giving.
3. Phase 2: the 4-week prototype that fools no one
The first prototype serves one purpose: "is this technically viable with the data we have today?" It is not meant to impress the board. It does not need to look polished. It needs to handle a real sample of the process and show three things: how far it gets on its own, where it fails, and how much it costs per interaction.
This is where the first trap lives. Some vendors deliver a beautiful prototype with toy data, an idealized flow, and three lines from a fictional customer. Applause in the conference room. When you put in real conversations, with typos, topic changes, and an upset customer, the prototype falls apart. Demand real data in the prototype, even if anonymized. If the vendor resists, that is a red flag.
(Also read why AI agents fly in the demo and die in production to understand the five gears that decide that transition.)
4. Phase 3: integration with real systems
This is where many projects stall. An agent that only converses is a chat assistant. An agent that acts needs to talk to the ERP, CRM, payment gateway, knowledge base, order management system, and finance spreadsheet. Each integration is real work, with SLAs, latency, authentication, and retry logic.
This phase typically takes 3 to 6 weeks, depending on how many systems need to talk to the agent. The sign that things are going well: the team can list, by name, every system the agent accesses, what action it performs in each one, and what happens if that system goes down. The sign things are going badly: "we will integrate with the ERP later." No, integrate now. Everything else is cosmetic.
5. Phase 4: governance before scale
Before opening to real customers at volume, three things need to be in place. Kill switch: who (and how) takes the agent offline in seconds if it starts making systematic errors. Without this, a scare becomes a crisis. Audit panel: every conversation, every action taken, every integration triggered stays logged with the time, user, and result. When the customer complains, you have the answer. Escalation rule: in which situations does the agent hand off to a human, and how does the human receive the context. Without this rule, the customer gets stuck in a loop, and the complaint goes viral.
Companies that skip governance and go straight to scale usually come back 6 months later in fire-fighting mode, at double the cost.
6. Phases 5, 6, and 7: controlled rollout, measurement, and continuous improvement
Rollout (phase 5): gradual release. Start with 5% of real volume. Monitor for 2 weeks. If it holds, move to 20%. If it holds, 50%. Only go to 100% when you have 4 to 6 weeks of stable numbers. Whoever opens 100% on the first day to show boldness is betting the project's reputation.
Measurement (phase 6): at minimum three indicators. Resolution rate without human intervention. Average response time. NPS or customer satisfaction. Without these three, any statement about the agent is wishful thinking, not fact. Panel updated every day, reviewed every week, actioned every month.
Continuous improvement (phase 7): an agent is not a project, it is a product. Every week a customer asks a question the agent did not expect. Every month a new integration appears. Every quarter the underlying AI model improves. The team needs to be committed to this, or the agent decays in the third month and nobody knows why.
7. What typically breaks (and how to avoid it)
Three patterns show up in 80% of projects that stall.
Pattern 1: scope bloats midway. Started to handle customer support, became an agent that also handles collections, qualifies leads, and answers HR questions. Result: nothing is done well. Treat each new scope as a new project, with a conscious decision and a new budget.
Pattern 2: dependency on a single vendor that disappeared. AI model pricing changes (it has already changed three times this year). An API breaks its contract. A great company gets acquired and support vanishes. Whoever ties a project to one vendor with no exit route discovers hidden costs at the worst moment.
Pattern 3: no internal owner. When the project is "the consultancy's," nobody on the company's side absorbs the knowledge. When the consultancy leaves, the agent becomes a black box. Make sure at least one person on your team understands the agent from the inside and has the authority to decide its future.
Frequently asked questions about how to build an AI agent
How long does it take to build an AI agent from scratch?
For an agent covering one process (customer service, lead qualification, internal support), the realistic path is 12 to 16 weeks to controlled production. Simpler agents take about 8 weeks. Heavily integrated agents (5+ systems) or those in regulated industries can take up to 6 months.
What is the minimum team size to build a serious AI agent?
A lean functional team: 1 product person (who understands the process), 1 AI engineer, 1 integration engineer, and 1 internal point of contact from the client side. Total: 4. Larger teams work for projects with many integrations or multiple simultaneous channels.
Is it better to build an AI agent in-house or hire a partner?
It depends on two things: whether you have senior AI technical staff in-house, and whether AI will be a strategic differentiator or an efficiency tool. If it is a differentiator and you have the team, build in-house. If it is a tool, hire a specialist to accelerate the learning cycle.
What is the biggest cause of failure in AI agent projects?
Poorly defined scope at the start. Companies that begin a project without knowing which business decision the agent is going to affect (response time, conversion rate, cost per interaction, NPS) rarely finish the project.
Do I need a proprietary AI model or can I use OpenAI, Anthropic, and Google?
For most companies, commercial models (OpenAI, Anthropic, Google) or well-deployed open-source models solve the problem. A proprietary model only makes sense at very high volume, with very sensitive data, or when technical differentiation is the product itself. Focus the build on the process and the integration, not the model.
