AI agents
What AI agent templates give you, and what you still have to build
A template gets you a working loop in an afternoon, which is the easy part and the part nobody was stuck on.
What are AI agent templates?
An AI agent template is a working skeleton: a loop, a tool interface, some prompt scaffolding and usually a deploy config. It saves you the plumbing, not the thinking. The parts that decide whether an agent works are your tools, your data access and your stopping rules, and no template ships those.
The short version
- An agent template is scaffolding: a loop, a tool interface, a prompt and a config. The scaffolding was never the hard part.
- The example tools in a template return clean data. Yours will not, and the agent will not tell you when it guessed.
- A template cannot contain your permissions model, your stopping rules or your definition of a finished task, because those are decisions about your business.
- Starting from a vendor's template library usually commits you to that vendor's runtime, which is fine if you chose it on purpose.
- If the steps never vary, you do not need an agent template. You need a scheduled job.
What is actually inside an AI agent template?
Four things, usually. A loop that calls a model, reads back any tool calls, runs them and appends the results. A tool interface with two or three example tools. A prompt with placeholders where your instructions are meant to go. A config file naming a model and expecting an API key. Better templates add a tracing hook, a chat interface or a deploy target.
None of that is difficult to write, and that is the honest case for using one. The loop is about forty lines. What you are buying is that somebody already made the small decisions you would get slightly wrong on a first pass: where the tool schema lives, how results are passed back, how the loop terminates, what gets logged. Reading a well written template is one of the fastest ways to learn the shape of a framework.
What you are not being handed is the agent. The agent is the set of tools it can call, the data those tools reach, the instructions that describe your actual task, and the rules for when it should stop and fetch a person. Every one of those is specific to you. A template has to leave them blank, so it fills the gap with a weather lookup, a calculator and a prompt about being helpful.
Which parts of a template are worth keeping?
Keep the plumbing, delete the content. The loop, the retry logic, the tool registration pattern, the logging hook and the project layout are genuinely reusable. The prompt, the example tools and the model settings were written to demo well, and they will not survive your first real task.
The prompt is the part teams keep by accident. It arrives sounding authoritative, something about being 'a helpful autonomous agent with access to tools', and it reads like a sensible default. It is not a default. It is filler, and it is the strongest single lever you have over behaviour. Write your own, in the words your team already uses to describe the task, and be specific about what the agent must not do. A prompt that names three forbidden actions is worth more than one that praises accuracy.
The model settings deserve the same suspicion. A template's model choice was made months ago against whatever was cheap or well known at the time, and the timeouts and token limits are usually set to whatever stopped the demo crashing. Both are now your numbers to defend.
Keep, rewrite or delete
| Part of the template | What to do with it | Why |
|---|---|---|
| Agent loop and tool dispatch | Keep | Generic, and already debugged by somebody else |
| Retries, timeouts, error handling | Keep, then tighten | The defaults stop a demo crashing, not a queue backing up |
| Example tools | Delete | They return clean data from a service you do not use |
| System prompt | Rewrite | It is filler, and it is your main control over behaviour |
| Model and sampling settings | Rewrite | Chosen months ago for a different task and a different budget |
| Memory and state handling | Rewrite | 'We keep everything' is an awkward answer to a later deletion request |
| Evaluation harness | Usually absent | Nobody can write your evaluation set for you |
Why does a template agent break the first time it touches your data?
Because the example tool returned clean data and yours will not. A template's mock CRM returns three fields with sensible names. Your CRM returns sixty, a third of them empty, two of them holding the same phone number in different formats, a date format that varies by region, and a free text notes field where the answer usually actually lives. The model does not stop when the data is ambiguous. It picks the record that most resembles the one in the example and reports success.
That is the failure mode to design for, and notice that it is not a crash. A crash is easy: you see it, you fix it. A confident wrong answer looks identical to a correct one in every log you have, unless you deliberately recorded enough to tell them apart. In practice that means storing the full transcript of each run, every tool call with its arguments, and everything that came back. If you cannot reconstruct why the agent chose that record, you cannot debug it, and you cannot tell a customer what happened.
The second break is permissions. A template runs as whatever credential sits in the environment file, and that credential is usually broad, because broad is what makes a demo work. The moment the agent acts on behalf of a named user, broad is wrong. The agent should reach only what that user could reach. This is a decision to make before you wire the first real tool, not a thing to retrofit after the pilot goes well.
Do AI agent templates actually save time?
They save the hours you would have spent writing the loop, which is real but small. Whether they shorten the project is a different question, and the honest answer is that you should not trust your own estimate of it. Teams reliably feel faster with new tooling, and feeling faster is not the same as finishing earlier.
Measuring this properly is hard enough that the best known attempt is being rebuilt. METR ran a randomised controlled trial with 16 experienced open-source developers across 246 real tasks in repositories they already maintained, collecting data between February and June 2025. It has since said that its newer late-2025 data gives an unreliable signal and that it is redesigning the study. That is a reasonable position for a research group, and a useful warning for everyone else: if a careful trial struggles to measure the effect, a retrospective guess from your own team is not evidence.
So treat a template as a way to reach a decision sooner, not as a delivery estimate. The decision you want in week one is whether the task is tractable at all: do the tool calls return what you need, does the model pick the right one, are the failures the kind you can detect. A template gets you to that answer faster. It does not shorten the work that follows it.
What do you still have to build before anyone outside the team uses it?
Five things, and a template ships none of them. An evaluation set of real past cases where you already know the right answer. A log you can search by run, by user and by tool call. A budget for cost and latency with something that enforces it. A path for handing a task to a person with enough context that the person is not starting from scratch. And an explicit list of actions the agent is never allowed to take, checked outside the prompt.
The evaluation set is the one teams skip, and it is the one that determines whether you can change anything later. Without it, every prompt edit is a guess, and you will quietly become unwilling to touch a system you do not trust. A few dozen real cases beat a large synthetic set, because the real ones contain the messiness that actually breaks the agent.
The five things a template leaves to you
- An evaluation set: a few dozen real cases from the last few months, each with the answer you would accept, run on every change.
- Run logs: full transcript, every tool call and its arguments, retrievable months later by run id.
- A budget: a cap on tokens, tool calls and wall clock per run, enforced in code rather than hoped for.
- A handoff: when the agent stops, a person receives the task along with what was already tried.
- A deny list: the actions the agent must never take, enforced outside the prompt where the model cannot talk its way past them.
When is an agent template the wrong place to start?
When the steps never vary. If the work is 'take the row, call the endpoint, write the result, email somebody on failure', an agent is a worse scheduled job. It costs more, it is slower, and it can decide to do something else. Agent templates make this mistake easy, because they will happily run a fixed workflow and look sophisticated doing it.
It is also wrong when the first real requirement is a boundary rather than a behaviour. If the task touches patient records, client files or payments, the first thing to write down is who may see what. No template encodes your version of that, and bolting the constraint on afterwards costs more than designing to it would have.
And it is wrong when nobody has agreed what finished looks like. An agent needs a stopping condition. If the team cannot say in one sentence what a successfully handled case is, the template will loop, spend money and produce something no one is willing to sign off.
How should a small team actually use one?
Read it, then rewrite it against one real task. Pick something a person does by hand more than once a week. Wire exactly one real tool with real credentials, scoped to one user's access. Run it against ten cases where you already know the correct answer, and read every transcript rather than the summary. You will learn more in that afternoon than in a week of comparing template galleries, because the thing that decides the project is how your data behaves, and no gallery contains your data.
This is ordinary work, not exotic work. Of the 1,340 practitioners who answered LangChain's State of Agent Engineering survey, 49% were at organisations of fewer than 100 people. Agent building is largely happening in small teams, which is exactly why so many start from a template, and why the distance between a template and something you can operate is worth stating plainly.
The second task is where you find out whether you built anything. If adding it means a second copy of the loop, the template won, and you now have two agents to maintain. If it means registering one more tool and adding cases to the evaluation set, you have a system. That is the only milestone in this project worth marking.
Questions people ask
Where do AI agent templates come from?
Mostly two places. Agent frameworks ship starter repositories that demonstrate the loop and the tool interface in their own idiom. Automation platforms publish galleries of prebuilt agents aimed at a named job, such as triaging inbound email. The first teaches you a framework. The second usually runs on the vendor's runtime, so check what you are committing to before you build on top of it.
Can we put a template straight in front of customers?
No, and not because the code is bad. A template has no evaluation set, no searchable run log, no spend cap and no handoff to a person. Those are the things that let you notice a confident wrong answer and recover from it. Without them, you find out about failures from the customer, which is the most expensive way to learn about them.
How much of a template survives to production?
The plumbing usually survives: the loop, tool dispatch, retries, project layout. The prompt, the example tools and the model settings rarely do. Expect to keep the shape and replace the content. If most of the original template is still intact after a month of real use, that is a sign nobody has tested it against the awkward cases yet.
Do we need an agent, or just automation?
If the steps are fixed and every decision point is a rule you can write down, you want workflow automation. It is cheaper, faster and it cannot improvise. Reach for an agent when the input is unstructured, when the next step depends on what the last one returned, and when a person currently makes a judgement call each time the work comes round.
What is the smallest first build worth doing?
One task, one real tool, one user's permissions, and ten cases where you already know the correct answer. Run it, read every transcript, and count how often it was confidently wrong rather than how often it crashed. That number tells you whether the task is tractable. It takes roughly a day, and it regularly saves weeks of building the wrong thing.
Related on this site
Sources
- NEW SBE Council Tech Use Survey: The Digital State of Small Business, online survey of 517 small business employers with 2-99 employees, conducted by TechnoMetrica for SBE Council, 17-23 February 2026, credibility interval +/- 4.4 percentage points · Small Business & Entrepreneurship Council, data from 2026
- 2026 AI Impact Report: Mapping Adoption, Use, and Impact Across Small to Midsize Businesses, quarterly surveys of more than 34,000 small and midsize business owners across the US, Canada, the UK and Australia, run from July 2024 to January 2026, plus anonymised data from more than 5.3 million QuickBooks businesses · Intuit, data from 2026
- State of Agent Engineering, public survey of 1,340 practitioners run for two weeks from 18 November to 2 December 2025; 49% of respondents were at organisations of fewer than 100 people · LangChain, data from 2025
- Software Developers, Quality Assurance Analysts, and Testers : Occupational Outlook Handbook, Occupational Employment and Wage Statistics (OEWS) survey of U.S. employers, May 2025 reference period · U.S. Bureau of Labor Statistics, data from 2025
- We are Changing our Developer Productivity Experiment Design, randomised controlled trial of 16 experienced open-source developers across 246 real tasks in repositories they already maintained; data collected February to June 2025. METR notes on this page that its newer late-2025 data gives an unreliable signal and that it is redesigning the study, so the figure should be dated to early-2025 tools. · METR, data from 2025