Skip to content
MarsLab

Autonomous AI Agents: What Works in Production

What an autonomous AI agent is, which tasks it handles reliably today, and the steps that take one from a demo to production.

8 min readPublished Nov 2026

An autonomous AI agent is a program in which a language model chooses its own next steps, calls tools such as search, a database or an API, reads each result and repeats until it judges the task done. Today it works reliably on narrow tasks with clear success checks, limited permissions and a person approving risky actions. Open-ended, high-stakes work still needs supervision.

What is an autonomous AI agent?

It is a system where the model, not your code, decides the path. Anthropic’s guide Building effective agents draws the line this way: “Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.”

“Autonomous” is a matter of degree. A system that drafts a reply for a person to send has little autonomy. One that reads an inbox, looks up an order and issues a refund on its own has a lot. Most useful production systems sit in between, which is why the useful question is how much freedom each action gets.

If you are still deciding whether a task needs an agent at all, read AI agent vs automation script and most agents are a cron job. This page assumes you have decided and want to know what comes next.

What are the parts of an AI agent?

An agent has five parts: a model, tools, memory or state, a loop and guardrails. Anthropic calls the first three “an LLM enhanced with augmentations such as retrieval, tools, and memory”, and describes the whole thing as “just LLMs using tools based on environmental feedback in a loop.”

  • Model: the language model that reads the situation and picks the next action.
  • Tools: functions the model can call, such as a database query, a search, an email send or a payment API. Tools are the only way an agent changes anything outside its own text.
  • Memory or state: what the agent carries between steps, such as the task so far, earlier tool results and facts it should remember.
  • Loop: the cycle of decide, act, observe, repeat, with a rule for when to stop.
  • Guardrails: limits on what the agent may do, how long it may run, what it may spend and which actions need a person’s approval.

Anthropic’s guide stresses that the loop needs a stop rule: “it’s also common to include stopping conditions (such as a maximum number of iterations) to maintain control.” It also says the agent should get “ground truth” from the environment at each step, such as a tool result, so it can check its own progress.

What are the levels of autonomy in an AI agent?

Autonomy runs from a single model call to a loop that acts for hours without a person. The levels below are a working scale, not an industry standard. Pick the lowest one that does the job.

  • Level 0, one model call: the model answers or classifies once and your code does the rest.
  • Level 1, a fixed workflow: several steps in an order you wrote, with a model doing the judgement inside some steps.
  • Level 2, an agent that proposes: the model picks tools and steps, but a person approves every action that changes something.
  • Level 3, an agent that acts within limits: the model acts alone on low-risk actions, and asks a person for the risky ones.
  • Level 4, a fully autonomous loop: the model acts alone over many steps, with only logs and limits as a check.

Anthropic’s advice sits at the bottom of this scale: “we recommend finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all.” Most production value today comes from levels 1 to 3.

What can autonomous AI agents do reliably today?

They are reliable on bounded tasks where each step can be checked, the tools are few and well described, and a mistake is cheap to undo. Reliability comes from the task and the limits around the model, not from the model alone.

  • Answering questions from a defined body of knowledge and taking a small set of next steps, such as booking a callback.
  • Research across many sources, where a person reads the result before acting on it.
  • Work with a test that gives a clear pass or fail, such as code that either passes its tests or does not.
  • Triage and routing of messages, with a person handling anything the agent marks as uncertain.
  • High-volume, repetitive conversations that follow the same shape every time.

Anthropic names the conditions under which agents are useful: “open-ended problems where it’s difficult or impossible to predict the required number of steps, and where you can’t hardcode a fixed path.” It adds that you “must have some level of trust in its decision-making.” That trust has to be earned by testing, which a later section covers.

Where do autonomous agents still not work?

They are a poor fit where one wrong action is costly or cannot be reversed, where success is hard to check, or where the task needs context the agent cannot reach. In those cases keep a person in the decision.

  • Moving money, deleting data, signing contracts or messaging customers without review.
  • Tasks with no objective test, where nobody can say whether an answer is right until much later.
  • Long chains of dependent steps, where a small error early on ruins everything after it.
  • Anything where the agent reads untrusted text and also holds powerful tools, which is the setting where prompt injection does the most harm.

How do you create an AI agent, step by step?

Start with one task, give the agent the fewest tools that can do it, write the evaluation set before the prompt, add hard limits and approval points, and log every step. Build the smallest version first and widen it only when the numbers support it.

  • Pick one task. Choose a job a person does today, with a definition of done you can write in a sentence. A broad goal such as “handle customer support” is too wide to test.
  • Define the tools. List the actions the agent needs and give each one a clear name, description and input format. Give it read access first and add write access one tool at a time.
  • Write the evaluation set. Collect real cases, including awkward ones, and decide in advance what a pass looks like. How to build an LLM eval set covers this step in full.
  • Add limits and approval points. Cap the number of steps, the spend per run and the time per run. Mark which actions run alone and which wait for a person.
  • Log everything. Record each model call, tool call, input, output and cost so a human can replay any run.
  • Run it beside the person first. Compare its decisions with theirs, fix the gaps, then let it act on the low-risk actions.

Most of the work is in steps 2 to 5, not in the model call. The glue around the model is what separates a demo from something a team can depend on.

How do autonomous agents fail?

The main failures are compounding errors, runaway cost, unsafe tool use and prompt injection. Anthropic puts it directly: “The autonomous nature of agents means higher costs, and the potential for compounding errors.” Each failure has a matching control.

  • Compounding errors: each step builds on the last, so an early mistake spreads. Control it with checks between steps and a person at checkpoints.
  • Runaway cost and loops: an agent can keep calling tools and models without finishing. Control it with a step cap, a spend cap and a time cap.
  • Unsafe tool use: the agent calls a tool in a way you did not intend. Control it with narrow tools and least privilege.
  • Prompt injection: text the agent reads tells it to do something else. Control it by treating all retrieved text as untrusted and limiting what the agent can do after reading it.

What is prompt injection, and how do you limit it?

Prompt injection is when untrusted text tries to override the agent’s instructions. You cannot fully prevent it, so the defence is to limit what a fooled agent can do. OpenAI describes it in its agent safety guidance.

That page says: “A prompt injection happens when untrusted text or data enters an AI system, and malicious contents in that text or data attempt to override instructions to the AI.” It also warns that “even with these mitigations, agents won’t be perfect and can still make mistakes or be tricked.”

The OWASP project lists the related risk of excessive agency in its LLM06:2025 entry. Its first two controls are to limit the extensions an agent may call “to only the minimum necessary”, and to limit what each one can do. Its example is a mailbox tool that only needs to read emails, so it should not be able to delete or send them. OWASP also advises that you “require a human to approve high-impact actions before they are taken.”

How do you measure an AI agent in production?

Track whether the task got done, how much it cost, how often a person had to step in and whether quality is drifting. Offline test scores tell you if a release is safe to ship. Production numbers tell you if it is still working.

  • Task completion rate: the share of runs that reach a correct end state, checked on a sample by a person.
  • Escalation rate: how often the agent hands off to a human, and whether those hand-offs were right.
  • Cost and steps per run: the average and the worst case, so a looping run stands out.
  • Offline score against a business metric: if the test score holds while resolution or complaint numbers drift, the evaluation set has gone stale.

Keep a full record of each run. MarsLab’s note the audit trail is the product argues that showing why a system answered the way it did is the hard deliverable in regulated work, and the same log is the raw material for your next evaluation set.

What does an agent that acts on its own look like in practice?

Two MarsLab engagements show the range. In both, the system takes actions without a person doing each one, and the published figures come from the case studies.

For Bhajanlal Communications, an electronics wholesaler in West Bengal, MarsLab built an AI voice agent that calls each Meta lead, confirms the model of interest, captures when the customer plans to buy, answers product questions and books a callback or a showroom visit. It handles around 10,000 calls a day, where the sales team had been dialing on the order of 10,000 calls a day by hand. See the Bhajanlal case study and the AI voice agent service.

For StudyBuddy, MarsLab built a multi-agent framework on LangChain that coordinates specialised reasoning across subjects, with retrieval over a curated knowledge base and live internet search for current questions. The brief was to solve assignments accurately across very different disciplines and hold that quality as query volume grew. Details are in the StudyBuddy case study.

When should you talk to MarsLab about an autonomous agent?

Talk to us when you have a task in mind and need it running in your own systems, with the evaluation, limits and logging done properly. MarsLab embeds forward deployed engineers who build and run such systems inside a client’s operation. You can reach us on the contact page.

We want your hardest problems.

We collaborate with ambitious organisations ready to move beyond AI experimentation. If you’re looking to transform how your business operates, we’d love to build with you.

Book an intro call (opens in a new tab)

Thirty minutes with an engineer, not a sales sequence. Pick a slot that suits you.