To write a good prompt for an AI agent, describe the goal and what “done” looks like, give it the context it cannot guess, set clear limits on what it may and may not do, and tell it when to stop and ask you. Agents act on their own for many steps, so a vague prompt does not just give a weak answer, it can send the agent down the wrong path for an hour.
How is prompting an agent different from prompting a chatbot?
A chatbot answers once and waits. An agent plans, uses tools, clicks buttons and makes decisions on its own. Think of the difference between asking a friend a question and handing a new assistant a job for the afternoon. The assistant needs a brief, not a question. If you are new to the basics, start with why your AI prompts are not working.
What should an agent prompt include?
- The goal: one sentence on what you want achieved, for example “find three venues for a 40-person dinner in Boston on December 12”
- What done looks like: the exact output, such as “a table with name, price per head, link and availability”
- Context: facts it cannot know, like budget, preferences and which files or sites to use
- Limits: what it must never do, such as “do not book or pay for anything”
- Check-in points: when to pause and ask, for example “ask before sending any email”
Can you show a before and after example?
Weak: “Clean up my inbox.”
Strong: “Go through unread emails from the last 7 days. Archive newsletters and receipts. Star anything from clients. Draft, but do not send, replies to questions you can answer from our FAQ document. At the end, give me a list of emails that need my decision.”
The strong version tells the agent the scope, the rules, the one thing it must not do, and the report it should hand back.
Should I tell the agent how to do the task?
Usually not step by step. Describe the outcome and the rules, and let the agent plan. Add steps only where there is one right way, like a company process. If a task keeps going wrong, show it an example of a good result; this is the same idea as few-shot prompting. For tricky reasoning, asking it to plan first and share the plan before acting works like chain-of-thought prompting.
How do I keep an agent safe with my prompt?
Give it the least access it needs, say clearly which actions need your approval, and never paste passwords into a prompt. Be careful about telling an agent to “follow the instructions” in emails or web pages, since attackers hide instructions there, as our agent security guide explains.
What is the simplest habit that improves agent results?
Ask the agent to repeat the task back in its own words before starting. If its summary is wrong, your prompt was unclear, and you fix it in ten seconds instead of after an hour of wasted work. For more ready-made patterns, see our prompt examples that work.




