AI Agent Development: Stack, Timelines and Pitfalls
What the work of building an AI agent actually consists of, the stack used in practice, where the time goes, and how to accept the result so you get a system rather than a demo.
All articles in the guide ИИ-агенты · 11
Agent development differs from ordinary development in one respect: the happy path is the smaller part of the work. The rest of the time goes into what happens when the system meets reality.
What the work consists of
Five parts, roughly in order of effort:
- Framing and the definition of done. The most underrated part. Until it is clear how the result is checked, nothing else can proceed.
- Tools and integrations. Access to databases, APIs, internal systems. This is usually where you discover the API does not exist or lacks the field you need.
- The agent loop and its bounds. Limits, error handling, idempotency.
- Verification and observability. Checking facts instead of reports, per-step logs, metrics.
- A run on real data and the fixes it forces. More than half of the final changes come from here.
The first item is done by the client together with the builder. Skipping it is not possible, and attempting to skip it is the most expensive move available.
The stack
What gets used in practice and why:
Language. Python or TypeScript. The choice follows what the rest of your systems are written in, since the agent has to reach into them.
Model calls. The provider SDK. A reseller’s compatible endpoint looks the same but occasionally differs in details - better to know that up front than to discover it in production.
State. An ordinary database. The agent needs to remember what it has already done, and that is what protects you when it restarts.
A queue. For background work, retries and concurrency limits. Without one, a load spike becomes a provider rate limit.
Per-step logs. Not the general application log but the agent’s decision history: context, chosen tool, result. Incident analysis is impossible without it.
A framework, optionally. It saves a day at the start and costs a week when the behaviour you need does not fit its abstractions. On a simple loop, your own code wins; on a complex multi-agent design, ready-made scaffolding earns its place.
Where the time goes
In descending order:
Real data. Real inputs are always dirtier than test inputs. Empty fields, truncation, attachments, several topics in one message, duplicates.
Failure behaviour. What to do when an integration is down, when a response arrives half-formed, when the agent restarts mid-run. Idempotency lives here - see idempotent pipelines.
Tool descriptions. They look like a detail, and they decide whether the agent picks the right action. They get rewritten after runs rather than written once.
Confidence boundaries. Where the agent decides and where it hands over. Tuned from measured data; that threshold cannot be guessed.
Cost. The first version is almost always more expensive than acceptable. Optimisation means shrinking context and routing tasks across models - see the model router.
How to accept the result
Accepting on a demo is the classic client mistake. A demo shows the happy path, and the happy path almost always works.
What to require:
- A run on your real sample, not a prepared one. A hundred genuine records tell you more than any presentation.
- Measured numbers: completion rate, handover rate, mean and maximum step count, cost per run.
- A failure test: switch off an integration and watch. The correct answer is an explicit error, not a success message.
- Logs that show how the decision was reached.
- An answer to what happens on rerun. No answer means no idempotency.
- A documented rollback and kill switch.
A good sign: the builder shows you where the system fails and how often. A bad sign: the result is presented as working with no caveats at all.
On timelines
An estimate that usually lands near the truth: a week for framing and a narrow prototype, two to three weeks for tools, loop and verification, another two for the real run, fixes and launch. After that, maintenance, because data and models change.
Timelines jump sharply when the required integrations do not exist and have to be built. Establish that before the estimate, not after.
To discuss your own task, timeline and cost, see the services page. What must be true before launch is in rollout. A concrete walkthrough is here. The overview is in the AI agents guide.
FAQ
How long does AI agent development take?
A demo comes together in days; a system you can trust with real volume takes weeks. Most of the time goes not into the happy path but into failure behaviour: incomplete data, broken integrations, reruns. That part is what separates a working system from a presentation.
What stack is used for agents?
Usually Python or TypeScript, model calls through the provider SDK, a database for state and a queue for background work. A framework is optional: the agent loop is an evening of hand-written code, and your own loop is easier to debug than somebody else abstractions.
How do I accept agent work?
Not by demo but by a run over a real sample with measured numbers: completion rate, handover rate, average step count, cost per run. Plus a test with an integration switched off. A demo on prepared data proves nothing.
- What an AI Agent Is and How It Differs from a ChatbotGuide
- Building an AI Agent: From Prompt to ProductionThe path from idea to a working agent: framing the task, choosing tools, the execution loop, testing before launch, and what has to be true before it reaches production.
- How to Build an AI Agent: A Step-by-Step Real CaseOne agent walked through end to end: requirements, design, tools and their descriptions, the first run and the fixes it forced, and which parts deliberately stayed ordinary code.
- AI Agents for Business: Where They Pay Off and Where They Do NotWhich processes an AI agent genuinely makes cheaper, where ordinary automation or a hire wins, how to calculate payback honestly, and the risks that rarely make it into the model.
Done for you
I will build an AI agent for a real task
With tools, memory and logs, so it works in production and not only in a demo.
from $1,500 · 1 to 2 weeks