When AI starts wandering: rethinking the AI agent and its prompt
If you have worked with AI tools in recent months, you have probably experienced this directly: you ask for one thing and receive something slightly different. Sometimes slightly different is fine, even pleasant. Sometimes, however, your AI agent takes a long detour around the task, loses focus and direction, and drowns in irrelevant details.
The world has become accustomed to discussing prompt engineering, but a new layer has begun taking shape in recent months: agentic workflows, workflows assuming the model has a role, responsibility and operating boundaries. This goes beyond phrasing a good question to designing an entire route where the AI agent stays on track, or at least wanders less.
This article attempts to unravel that concept, break it into steps and show how agentic workflows can reduce these deviations, sometimes called task drift. No, this is more than a technical issue. It is psychological, commercial and even somewhat Israeli, with shortcuts, improvisation and “it'll be fine”.
What is an AI agent, and why does it behave like a newly discharged soldier backpacking through Asia?
Let us clarify things. An AI agent today means more than a chatbot returning answers. It means a partly autonomous entity receiving a task, breaking it into steps, calling external tools, APIs, databases and organisational systems, and performing a sequence of actions. Sometimes without your standing over it at every stage.
In theory, a dream. In practice, without properly defined boundaries, the agent becomes confused. It answers the wrong questions, falls in love with unimportant details and invents assumptions you never requested. It is not stupid; it simply tries to help, even when uncertain. Which sounds a little like some people we once worked with.
Task drift occurs when the task the agent understands in its head, metaphorically speaking, no longer matches the user's intention. This can happen after several conversational rounds, a small requirement change or an overly open original prompt. Now multiply that across a workflow of 10–20 automatic steps. A small initial deviation becomes a large final one.
Why is this happening now?
The shift from static models to models working as AI agents changes the rules. Use ChatGPT for one question and the worst outcome may be a slightly crooked answer. Connect the model to CRM, Tableau, Slack and financial tools, then give it permission to act, and every small deviation acquires business significance.
This is where agentic workflows come in: prompt templates, working principles and guardrails intended to keep the agent oriented and ensure that even its mistakes are small and correctable.
From one prompt to a workflow: what agentic thinking looks like
Until recently, the approach was “Let's write a good prompt”. More sophisticated versions added “Answer in Hebrew”, “Do it in six steps” or “Do not invent sources”. Beyond a certain point, that is no longer enough. The AI agent world requires designing a sequence of interactions.
Instead of one prompt, we begin thinking about:
- Stages: information gathering → planning → execution → checking → summarisation.
- Roles: who is the agent, a data analyst, marketing assistant or technical QA specialist?
- Boundaries: what may it do and what is prohibited? What happens under uncertainty?
- Stopping points: where must it raise a flag and ask the user?
This is precisely where prompting templates that reduce task drift enter. Flow engineering, rather than magic.
Template 1: define identity and role, beyond a jack of all trades
The first organisational mistake is an overly general AI agent. Everything is requested: meeting summaries, financial analysis, marketing emails. With robotic politeness, it tries.
In agentic workflows, the clear recommendation is to limit identity and role.
An example basic prompt template, expressed readably rather than as code:
You are an AI agent supporting a sales team in Israel. Your role: - Analyse existing email correspondence with customers. - Suggest possible replies. - Do not update any external system yourself. If the task you receive is not directly related to sales or emails, answer: "This task is outside my responsibilities" and suggest a general referral.
This sounds basic, but clear identity reduces deviation rates from the original task. The agent is not tempted elsewhere, at least in most cases.
Template 2: divide the task into objectives and intermediate checks
Another critical mechanism is requiring the agent to describe the task structure before execution. More than an attractive exercise, this creates an early working agreement between user and agent.
Step 1: Return a brief description of: - What you understood the task to mean. - The outputs you plan to produce. - The order in which you will work. Wait for my explicit approval before proceeding to execution.
In other words, make the AI agent explain what it is about to do. A simple method, but it exposes misunderstandings at the outset. In long workflows especially, this can save days of unproductive runs.
Template 3: an internal gatekeeper, with built-in self-review
Another common template explicitly requests that the agent perform a self-check on its outputs before returning them or taking an automatic action.
Before returning a final answer: 1. Check whether you answered the original question directly. 2. Note to yourself, in internal text, which parts of the answer may be assumptions or uncertain. 3. If uncertainty is high, suggest one or two clarifying questions instead of a final answer.
This goes beyond an answer to behaviour. With an AI agent connected to production or financial systems, it can save considerable headaches.
Task drift: a cultural issue as well as a technical one
Let us pause the technical discussion. There is something interesting about task drift: it exists in organisations, people and culture as well as machines.
In Israel, we are accustomed to improvisation. “Trust me”, “It'll be fine”. A manager assigns a task, the employee interprets it slightly differently, adds a twist and produces something not quite right but somehow suitable. Sometimes wonderful. Sometimes less so.
Introducing an AI agent into this reality creates an interesting mismatch. The model itself likes filling gaps, supplying details and inventing answers without complete certainty. Organisational culture sometimes says, “Fine, as long as we moved fast”. But with regulation, money or oversight reports, there is little room for stories.
What does this look like in Israeli organisations?
Conversations with innovation managers and Israeli CTOs reveal the same complaint: “We built internal AI agents for employees, a knowledge centre, reporting assistant or customer enquiry assistant, and theoretically it works. After two weeks, though, users say, ‘I don't have the energy to check whether it's accurate.’”
Daily workload, a frantic pace and the desire to shorten processes make even small task deviations problematic. Not because they are fatal, but because they erode trust. Once employees stop trusting the agent, they return to Google, their knowledgeable friend's WhatsApp and manual methods.
This is where good agentic workflows turn from a technological improvement into organisational change. If deviations are limited, transparent and correctable, trust remains. Ultimately, trust is the real currency of any AI project.
Designing agentic workflows that reduce drift without becoming the police
There is a temptation to build golden cages, restricting the AI agent until it is barely interesting. Only tightly limited answers, only fixed templates. Safe, but missing the models' major advantage.
The real challenge is subtler: create a clear framework while leaving freedom where it genuinely helps. This requires workflow design, beyond prompt design.
First principle: short stages and frequent feedback
Instead of a huge assignment such as “Write a marketing strategy for the coming year”, break it into:
- Target-audience analysis.
- Competitor analysis.
- Details of possible marketing channels.
- A draft strategy.
Each stage has its own prompt flow and intermediate approval. The AI agent becomes a dialogue partner rather than a black box producing a final document. This slightly slows the magic, but substantially improves accuracy.
Second principle: two heads, creator and reviewer
One interesting emerging pattern uses two agents: a creator and a reviewer. The same underlying model can be used, with separate roles.
Agent 1, creator: performs the task as defined.
Agent 2, reviewer: checks whether the output answers the original task,
identifies unnecessary drift and suggests a correction.
The advantage? Instead of trusting an overloaded user to check everything, an internal review layer is added. In critical projects, this is more than nice to have.
Third principle: document intent as well as final output
Another useful pattern asks the agent to document why it chose a route, beyond what it did.
At every stage involving a significant decision, such as choosing a source, formula or segment, record in one sentence: - Which option you considered. - Why you chose the selected option.
This helps oversight and early identification of where task drift began. As the organisation learns from these events, the next generation of agentic workflows arrives more immunised.
Questions and answers: what people actually ask about AI agents and task drift
Question: can task drift be eliminated completely?
The short answer is no. More precisely, it can be greatly reduced, managed and observed, but while models operate probabilistically, slips will occur. The goal is deviations detected promptly, causing little damage and rare in critical situations.
Question: does every organisation need a prompt engineering expert?
It depends on size and complexity. In a medium-sized or larger organisation, somebody, a data team lead, solution architect or even experienced product manager, must own agentic workflow design. Not because a prompt wizard is required, but because this is becoming process architecture, beyond wording.
Question: what is the greatest risk of uncontrolled AI agent use?
Above all, the illusion of accuracy. When an agent answers confidently, with fluent wording and a professional tone, it is easy to assume it is correct. The real risk is people ceasing to ask questions and transferring decision-making responsibility to a system that does not really understand.
Question: how do we measure whether our agentic workflow works well?
Several indicators exist:
- Fewer manual corrections after using agent outputs.
- Greater output consistency across different users.
- Fewer complaints such as “It didn't understand me”.
- The ability to explain each stage through workflow documentation, without incomprehensible magic.
Summary table: agentic workflow ideas for reducing task drift
| Topic | The problem | Suggested template or solution | Effect on task drift |
|---|---|---|---|
| AI agent identity | An overly general role trying to answer everything | A narrow role, defined responsibilities and “Outside my responsibilities” | Fewer irrelevant detours and greater focus |
| Task understanding | Unidentified misunderstandings at the outset | A compulsory statement of understanding before execution, with user approval | Early gap detection before investing time and resources |
| Self-review | Answers delivered without internal checking | Explicit self-check requests and uncertainty marking | Fewer disconnected answers and greater confidence transparency |
| Stage length | Huge tasks without stopping points | Short stages with frequent feedback | Less error accumulation and opportunities to correct midway |
| Two-head model | No internal reviewer for agent outputs | A creator agent and reviewer or validator agent | Better outputs and fewer obvious errors |
| Decision documentation | Difficulty understanding how and why decisions occurred | Document intent at every significant decision | Retrospective drift analysis and learning |
| Organisational culture | “Trust me”, with no definition of a serious error | Clear red lines and defined critical uses | Aligned human-agent expectations and less disappointment |
What next? An AI agent as part of the team, rather than black magic
Looking ahead, it is easy to get carried away by images of an intelligent agent, personal assistant or digital employee. Ultimately, however, a good AI agent is simply a working tool for which we have accepted responsibility.
Agentic workflows mean more than another buzzword. They invite us to consider human-machine relationships: how much freedom to give, where to stop, how to communicate uncertainty and how to keep decisions' centre of gravity with us.
If your organisation is experimenting with AI, running pilots and trying to turn chatbots into real agents, this is precisely when to ask:
- Where does drift hurt most today?
- Which processes cannot tolerate approximately right?
- Are our workflows transparent enough to explain to a manager who does not live in code?
This is where we come in: helping design agentic workflows, develop intelligent prompting templates and aim to make your AI agent productive, accurate and, above all, trustworthy.
Finally, before continuing
If you are considering an organisational AI agent, or already have several running but something feels misaligned, we would be happy to help with an initial consultation at no cost: examining flows, prompts and the places where small deviations ultimately become expensive.
This is planning, rather than magic. But when planning meets good technology, even artificial intelligence can, more or less, stay on task.
From reading to a pilot
Choose which systems to connect to the pilot
We will assess which data the agent needs to read, which actions it should propose and where the outcome is recorded.
