{"id":138555,"date":"2026-09-18T09:33:15","date_gmt":"2026-09-18T09:33:15","guid":{"rendered":"\/in\/tutorials\/ai-agent-prompts"},"modified":"2026-09-18T09:33:15","modified_gmt":"2026-09-18T09:33:15","slug":"ai-agent-prompts","status":"publish","type":"post","link":"\/in\/tutorials\/ai-agent-prompts\/","title":{"rendered":"What are AI agent prompts and how to write them"},"content":{"rendered":"<p class=\"wp-block-paragraph\">AI agent prompts are instructions that tell an AI agent what to achieve, what information and tools to use, what limits to follow, and what counts as a successful result.<\/p><p class=\"wp-block-paragraph\">Unlike a regular prompt that asks for a single response, an agent prompt guides the agent through a task where it needs to make decisions, use tools, and respond to what happens next.<\/p><p class=\"wp-block-paragraph\">That difference matters when an agent has to do more than generate an answer. A support agent might need to decide whether to issue a refund or escalate a request, while a research agent might need to choose which sources to use and assess whether there is enough evidence to complete the task.<\/p><p class=\"wp-block-paragraph\">To write an effective agent prompt, define what the agent needs to do, what it can use, what limits it must follow, and how it should know when the task is complete. Test the prompt with real scenarios, then refine it when the agent makes a mistake or fails to complete the task.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-what-are-ai-agent-prompts\">What are AI agent prompts?<\/h2><p class=\"wp-block-paragraph\">AI agent prompts are instructions that guide<a href=\"\/in\/tutorials\/what-are-ai-agents\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/what-are-ai-agents\/\" data-wpel-link=\"internal\" rel=\"follow\">an AI agent<\/a> through entire tasks. They define the goal, provide relevant context, set rules and limits, identify the tools and resources the agent can use, and explain what a successful result looks like and when the agent should stop.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-ai-agent-prompts-vs-regular-ai-prompts\">AI agent prompts vs regular AI prompts<\/h2><p class=\"wp-block-paragraph\">A regular AI prompt asks a model to produce a response, while an AI agent prompt guides an agent through a task that can involve multiple decisions, tool use, and actions.<\/p><p class=\"wp-block-paragraph\">For example, a regular prompt might ask, &ldquo;Review this week&rsquo;s customer feedback and summarize the three most common complaints.&rdquo; The model analyzes the feedback and returns the summary.<\/p><p class=\"wp-block-paragraph\">An agent prompt for the same task might ask the agent to review the week&rsquo;s feedback, group complaints, check relevant support records, prepare a summary, and flag complaints that meet specific escalation criteria.<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td colspan=\"1\" rowspan=\"1\"><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Regular AI prompt<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>AI agent prompt<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Purpose<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Shapes a generated answer<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Guides behavior toward an outcome<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Scope<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>One response or turn<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>A complete agent run<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Operation<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Generate and stop<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Decide, act, observe, evaluate, continue<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Capabilities<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Uses the model&rsquo;s available context<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>May use connected tools, data, apps, or other agents<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Completion<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Ends after producing the response<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Ends when done, blocked, or handed off<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Example tasks<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Drafting, summarization<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Research, support resolution, campaign prep, connected workflows<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">Both prompts can include context, examples, tone, and output format. An agent prompt also needs instructions for what happens during the task, such as when to use a tool, when to ask for approval, how to handle a failure, and what proves the task is complete.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-ai-agent-prompts-work\">How AI agent prompts work<\/h2><p class=\"wp-block-paragraph\">An AI agent prompt works by guiding the agent through a repeating process: understand the task, choose an action, review the result, and decide what to do next.<\/p><p class=\"wp-block-paragraph\">Multi-step tasks that combine planning, tool use, and evaluation are called<a href=\"\/in\/tutorials\/agentic-workflows\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/agentic-workflows\/\" data-wpel-link=\"internal\" rel=\"follow\">agentic workflows<\/a>. The prompt tells the agent what it needs to accomplish, what limits to follow, and when to stop or ask for help.<\/p><p class=\"wp-block-paragraph\">A competitor-research agent, for instance, might search for current data, compare the results with what it needs, spot gaps, run another search, and prepare the final brief. Here&rsquo;s what happens as the agent works through that task:<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6aad14028a6f8\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6aad14028a6f8\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/09\/1789722463008-0.jpeg\/public\" alt=\"How AI agent prompts work\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\">\n<li><strong>Understand the goal and context.<\/strong> The agent reads the goal, constraints, and available data. Information from<a href=\"\/in\/tutorials\/ai-agent-memory\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/ai-agent-memory\/\" data-wpel-link=\"internal\" rel=\"follow\">AI agent memory<\/a> may also feed into the context, but the memory stays separate from the prompt itself.<\/li>\n\n\n\n<li><strong>Choose the next action.<\/strong> The agent decides whether to answer, ask a question, use a tool, or stop. The decision depends on how clearly the prompt defines the goal, constraints, and tool rules. When something goes wrong, inspect the agent&rsquo;s actions, tool calls, and responses to see where the task went off track. Understanding <a href=\"\/in\/tutorials\/ai-agent-reasoning\/\" data-wpel-link=\"internal\" rel=\"follow\">AI agent reasoning<\/a> can help you improve the instructions that guide those choices.<\/li>\n\n\n\n<li><strong>Use an available tool.<\/strong> A connected tool retrieves data, runs an operation, or changes an external system. The way<a href=\"\/in\/tutorials\/ai-agent-tool-use\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/ai-agent-tool-use\/\" data-wpel-link=\"internal\" rel=\"follow\">agents use tools<\/a> affects prompt design because access to tools changes which instructions you need to write.<\/li>\n\n\n\n<li><strong>Review the result and continue, finish, or escalate.<\/strong> The agent checks whether the result moves it closer to the goal. It keeps working, asks for missing data, requests approval, reports a failure, or returns the finished result.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">One thing the prompt can&rsquo;t do is enforce permissions. It can say &ldquo;request approval before issuing a refund,&rdquo; but the app still needs to block an unapproved refund if the agent skips that step. Access controls, approval gates, and safety checks must live in the agent system, not the prompt.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-what-should-an-ai-agent-prompt-include\">What should an AI agent prompt include?<\/h2><p class=\"wp-block-paragraph\">An AI agent prompt should include a clear goal, relevant context, the agent&rsquo;s role and scope, instructions and constraints, available tools and resources, and a definition of successful completion.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6aad14028b233\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6aad14028b233\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/09\/1789722467451-0.jpeg\/public\" alt=\"What should an AI agent prompt include? \"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading h-t-title-3\">Goal<\/h3><p class=\"wp-block-paragraph\">The goal is the specific outcome the agent needs to achieve, described clearly enough that someone can check whether it was done.<\/p><p class=\"wp-block-paragraph\">&ldquo;Research competitors&rdquo; leaves the scope and result open to interpretation. &ldquo;Create a source-backed competitor brief covering pricing, target audience, key features, and positioning for five named competitors&rdquo; tells the agent what to produce and what the result should include.<\/p><p class=\"wp-block-paragraph\">Add specific requirements when the result needs certain information, evidence, or fields.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Context<\/h3><p class=\"wp-block-paragraph\">Context is the business data, users, files, definitions, task inputs, and current state that the agent needs to do its work. Without it, agents guess, and guesses lead to wrong actions.<\/p><p class=\"wp-block-paragraph\">A marketing agent, for example, might need the target audience, the product and offer, brand guidelines, previous campaign results, the channels being used, and the current campaign dates.<\/p><p class=\"wp-block-paragraph\">Only include information that helps the agent complete the task. An unfiltered history dump can bury the current goal or introduce clashing instructions.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Role and scope<\/h3><p class=\"wp-block-paragraph\">Define a role and scope to help the agent understand its responsibilities, expertise, or limits. &ldquo;Act as a customer support agent responsible for resolving billing questions&rdquo; sets all three in one line.<\/p><p class=\"wp-block-paragraph\">Scope matters more than persona. The agent needs to know what work it owns, what it must not do, and when to hand off the task. &ldquo;You can explain billing policies and review account data. Escalate refund requests that exceed the approved limit.&rdquo; draws that line.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Instructions and constraints<\/h3><p class=\"wp-block-paragraph\">Instructions tell the agent what to do and how. Constraints tell it what not to do. Together, they&rsquo;re where most prompts succeed or fail.<\/p><p class=\"wp-block-paragraph\">Clear instructions use direct verbs and concrete limits. &ldquo;Draft the campaign assets, but do not publish or schedule them without approval&rdquo; is easy to follow. &ldquo;Handle the request appropriately&rdquo; is not.<\/p><p class=\"wp-block-paragraph\">Use ordered steps when the task has a real sequence. Use &ldquo;if\/then&rdquo; rules for choices: &ldquo;If the customer&rsquo;s account data is missing, ask for it before continuing. Do not guess account details.&rdquo;<\/p><h3 class=\"wp-block-heading h-t-title-3\">Available tools and resources<\/h3><p class=\"wp-block-paragraph\">Tools and resources are the data sources, integrations, apps, or other agents the task can use. For each tool, state what it does, when the agent should call it, and what to do when it fails.<\/p><p class=\"wp-block-paragraph\">For example: &ldquo;Use the customer database to verify the order number before discussing the order. If the order cannot be found, ask the customer to confirm the number or escalate the request.&rdquo;<\/p><p class=\"wp-block-paragraph\">Naming a tool in a prompt doesn&rsquo;t connect or authorize it. The app needs a separate<a href=\"\/in\/tutorials\/ai-agent-integrations\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/ai-agent-integrations\/\" data-wpel-link=\"internal\" rel=\"follow\">agent integration<\/a> to give the AI agent access to each tool and permission to use it.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Expected output and completion conditions<\/h3><p class=\"wp-block-paragraph\">The expected output defines what the agent should produce and how it knows the task is finished: the format, audience, needed fields, success criteria, and stopping condition.<\/p><p class=\"wp-block-paragraph\">A polished final message doesn&rsquo;t prove the task actually worked, though. An agent that says &ldquo;CRM updated&rdquo; (CRM stands for Customer Relationship Management, which is the customer database many sales teams use) may have failed to save the record without noticing. A saved file, database update, sent message, or test result needs confirmation from the tool that performed it.<\/p><p class=\"wp-block-paragraph\">Also, tell the agent what to do when it can&rsquo;t finish the task: ask for missing details, report a blocker, retry within an approved limit, or escalate with the proof collected so far.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-write-ai-agent-prompts\">How to write AI agent prompts<\/h2><p class=\"wp-block-paragraph\">Write AI agent prompts by defining the task, giving the agent the information and tools it needs, setting clear boundaries, and explaining what a successful result looks like.<\/p><p class=\"wp-block-paragraph\">Use this process:<\/p><ol class=\"wp-block-list\">\n<li>Define one clear, checkable goal.<\/li>\n\n\n\n<li>Add only the context the agent needs.<\/li>\n\n\n\n<li>Set the agent&rsquo;s role and task scope.<\/li>\n\n\n\n<li>List available tools and when to use them.<\/li>\n\n\n\n<li>Define constraints, approvals, retries, and escalation.<\/li>\n\n\n\n<li>Specify the output, proof, and stopping condition.<\/li>\n\n\n\n<li>Test normal, ambiguous, failed, and high-risk cases.<\/li>\n\n\n\n<li>Revise the prompt from recorded results.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">For example, here&rsquo;s the difference between a vague prompt and one that gives the agent enough direction:<\/p><p class=\"wp-block-paragraph\"><strong>Vague prompt:<\/strong><\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Create a marketing campaign.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\"><strong>Specific prompt:<\/strong><\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Create a 30-day campaign plan for our small-business audience using the supplied offer, brand guidelines, and previous campaign data. Draft the email and social assets for each campaign stage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not publish, schedule, or spend money without approval.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For each asset, include its audience, goal, channel, and intended call to action. Stop and ask for clarification if required campaign information is missing.<\/p>\n<\/blockquote><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-ai-agent-prompt-examples\">AI agent prompt examples<\/h2><p class=\"wp-block-paragraph\">The right AI agent prompt structure depends on what the agent needs to do and what it is allowed to do.<\/p><p class=\"wp-block-paragraph\">For instance, a research agent needs clear source and verification rules. A marketing agent needs boundaries around publishing and spending. A customer support agent needs rules for account access and escalation, while a business workflow agent needs limits on which records it can change.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6aad14028d784\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6aad14028d784\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/09\/1789722471799-0.jpeg\/public\" alt=\"Examples of AI agent prompts\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading h-t-title-3\">Research agent prompt<\/h3><p class=\"wp-block-paragraph\">For research tasks, define where the agent should get information and how it should verify the result. This example shows an agent preparing a competitor brief.<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Role:<\/strong> Act as a market research analyst.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Goal:<\/strong> Produce a verified competitor brief for the marketing or strategy team.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tools and resources:<\/strong> Use web search and the supplied documents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Instructions and constraints:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use current primary sources.<\/li>\n\n\n\n<li>Do not contact companies.<\/li>\n\n\n\n<li>Do not claim to verify private competitor data.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected output and success criteria:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cover every required competitor and comparison field.<\/li>\n\n\n\n<li>Support each comparison with a source.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Approval point:<\/strong> No approval is needed for read-only research.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">This prompt tells the agent where to look, what not to do, and what evidence the final brief needs. Web access or a connected search tool remains a dependency.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Marketing agent prompt<\/h3><p class=\"wp-block-paragraph\">For marketing tasks, separate preparing the work from actions that affect the outside world. This example lets the agent create a campaign while keeping publishing and spending behind human approval.<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Role:<\/strong> Act as a marketing planner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Goal:<\/strong> Create a 30-day campaign plan and draft campaign assets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Context:<\/strong> Use the supplied audience, offer, brand voice, channels, and budget.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tools and resources:<\/strong> Use website content, analytics, calendar, and document tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Instructions and constraints:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Map every asset to an audience segment and campaign goal.<\/li>\n\n\n\n<li>Do not publish, schedule, or spend money without approval.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected output and success criteria:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Provide the complete campaign plan and draft assets.<\/li>\n\n\n\n<li>Show the audience and campaign goal for each asset.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Approval points:<\/strong> Pause for approval before publishing, scheduling, or spending money.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">The approval rule makes it clear that preparing the campaign is allowed, but publishing or spending still requires approval.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Customer support agent prompt<\/h3><p class=\"wp-block-paragraph\">For customer support, define what the agent can resolve and when it must hand the request to a person. This example keeps account changes and other sensitive actions within clear limits.<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Role:<\/strong> Act as a product support agent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Goal:<\/strong> Resolve eligible customer requests or create a complete human handoff.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Context:<\/strong> Use the supplied product policy, account information, and ticket history.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tools and resources:<\/strong> Use the knowledge base, customer record, order lookup, and ticketing system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Instructions and constraints:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify account data before making changes.<\/li>\n\n\n\n<li>Never invent product policy.<\/li>\n\n\n\n<li>Escalate requests that fall outside the supplied policy.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected output and success criteria:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm the resolution, or create an escalation with the needed proof.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Approval points:<\/strong> Require approval for refunds, cancellations, and account changes over defined limits.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">The prompt gives the agent enough information to resolve routine requests while setting clear boundaries for actions that need human review.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Business workflow agent prompt<\/h3><p class=\"wp-block-paragraph\">For business workflows, define what records the agent can review or prepare and which changes require approval. This example helps a sales or operations team qualify leads and prepare CRM updates.<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Role:<\/strong> Act as a lead-qualification agent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Goal:<\/strong> Prioritize qualified leads and prepare CRM updates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Context:<\/strong> Use the supplied qualification criteria and incoming form data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tools and resources:<\/strong> Use CRM lookup and draft-update tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Instructions and constraints:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do not invent missing company data.<\/li>\n\n\n\n<li>Ask for human clarification when scoring rules are ambiguous.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected output and success criteria:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Record the score, rationale, next action, and unresolved fields for each lead.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Approval points:<\/strong> Pause before sending outreach or changing lead ownership.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">The agent can review records and prepare updates without automatically sending outreach or changing ownership.<\/p><p class=\"wp-block-paragraph\">If you don&rsquo;t want to build an AI agent from scratch, you can use a ready-made agent instead. For example, <a href=\"\/in\/hostinger-agent\" data-wpel-link=\"internal\" rel=\"follow\">Hostinger Agent<\/a> provides specialized AI agents for tasks such as SEO, marketing, content, sales, and customer communication. You set the goal and instructions, while the platform provides the capabilities the agent needs to carry out the task.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6aad14028f79a\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6aad14028f79a\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/09\/1789722476793-0.png\/public\" alt=\"Hostinger Agent landing page\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">For a marketing campaign, you can give the agent your target audience, offer, brand guidelines, and campaign goal, then let it prepare the work while keeping actions such as publishing or spending behind your approval.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-best-practices-for-writing-ai-agent-prompts\">Best practices for writing AI agent prompts<\/h2><p class=\"wp-block-paragraph\">Write prompts that give the agent a clear goal, useful context, specific boundaries, and a way to tell when the task is complete. These practices make prompts easier to follow, test, and refine.<\/p><ul class=\"wp-block-list\">\n<li><strong>Define one clear outcome.<\/strong> State exactly what the agent needs to accomplish. For complex tasks, break the work into clear actions and use &ldquo;if\/then&rdquo; rules when the next step depends on the result.<\/li>\n\n\n\n<li><strong>Set limits and approval points.<\/strong> Tell the agent what it can and cannot do, and require approval before actions such as publishing, sending, purchasing, deleting, or changing records. If an action needs approval, tell the agent what it should prepare while it waits.<\/li>\n\n\n\n<li><strong>Give examples when the expected result is hard to describe.<\/strong> A sample completed record can show which fields you need, while an example escalation can show what information a human reviewer expects.<\/li>\n\n\n\n<li><strong>Keep instructions concise and consistent.<\/strong> Remove repeated rules, unrelated background, and conflicting instructions. More prompt text does not make up for missing tools or permissions.<\/li>\n\n\n\n<li><strong>Define how the agent should handle failure.<\/strong> Tell it what to do when information is missing, a tool fails, or the task cannot be completed. It should ask for clarification, retry within a limit, report the problem, or escalate rather than guess.<\/li>\n\n\n\n<li><strong>Require proof for completed actions.<\/strong> When the task involves a saved file, database update, sent message, or other external action, require confirmation from the tool or system that performed it.<\/li>\n\n\n\n<li><strong>Treat external content as data, not instructions.<\/strong> Websites, emails, files, and tool results can contain instructions that try to redirect the agent. Tell the agent not to let that content override its trusted instructions or approval rules.<\/li>\n\n\n\n<li><strong>Test and refine the prompt.<\/strong> Run realistic scenarios, look for specific failure patterns, and revise the instruction that caused the problem. Don&rsquo;t try to fix every failure by making the prompt longer.<\/li>\n<\/ul><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-test-and-refine-ai-agent-prompts\">How to test and refine AI agent prompts<\/h2><p class=\"wp-block-paragraph\">Test an AI agent prompt by running the same task under normal, incomplete, failed, and high-risk conditions, then compare what the agent did with what you expected it to do. One successful run doesn&rsquo;t prove the prompt works in other situations.<\/p><p class=\"wp-block-paragraph\">Start with one normal request and write down what the agent should do and what result you expect. Then change one condition at a time:<\/p><ul class=\"wp-block-list\">\n<li><strong>Remove required information.<\/strong> Leave out a detail the agent needs, such as a customer ID or campaign date. Check whether it asks for the missing information instead of guessing.<\/li>\n\n\n\n<li><strong>Give ambiguous instructions.<\/strong> Create a request where two actions could be reasonable. Check whether the agent asks for clarification or follows the boundary you defined.<\/li>\n\n\n\n<li><strong>Make a tool fail.<\/strong> Use a test environment where a search returns no results or an update fails. Check whether the agent reports the failure, retries within the allowed limit, or escalates instead of claiming success.<\/li>\n\n\n\n<li><strong>Trigger an approval point.<\/strong> Ask the agent to perform an action that requires approval, such as publishing content or issuing a refund. Check that it pauses and requests approval rather than completing the action.<\/li>\n\n\n\n<li><strong>Test untrusted content.<\/strong> Give the agent a webpage, email, or document containing instructions unrelated to its task. Check that it treats those instructions as content rather than following them.<\/li>\n\n\n\n<li><strong>Test repeated actions.<\/strong> Give the agent a situation where the same step could be attempted repeatedly, such as an empty search result. Check that it stops or escalates once it reaches the limit you set.<\/li>\n<\/ul><p class=\"wp-block-paragraph\"><strong>After each test, compare the agent&rsquo;s behavior with your expected result.<\/strong> Review which tools it used, what information it received, what actions it took, and what actually changed. Record the test input, expected result, actual result, and failure so you can identify exactly what needs fixing.<\/p><p class=\"wp-block-paragraph\">If a test fails, change the instruction that caused the failure and run the same test again. For example, if the agent guesses when a customer ID is missing, add an explicit rule telling it to ask for the ID instead. If it claims a database update succeeded without confirmation, require confirmation from the database before reporting success.<\/p><p class=\"wp-block-paragraph\">Once the prompt passes your test cases, <strong>move from simulated or read-only tasks to live actions gradually.<\/strong> Start with low-risk actions such as creating drafts or test records, then repeat your tests with the actual tools and permissions the agent will use.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6aad1402909d3\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6aad1402909d3\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/09\/1789722484089-0.jpeg\/public\" alt=\"How to test and refine AI agent prompts\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-extend-ai-agents-with-reusable-skills\">Extend AI agents with reusable skills<\/h2><p class=\"wp-block-paragraph\">Consider a reusable skill when an agent needs to follow the same instructions, use the same resources, or repeat the same process across multiple tasks. A skill packages that repeatable work so the agent can reuse it instead of relying on a new prompt each time.<\/p><p class=\"wp-block-paragraph\">For example, you might use a prompt to tell an agent how to research competitors for one campaign. If you use the same research process for every campaign, turn that procedure into an<a href=\"\/in\/tutorials\/ai-agent-skills\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a href=\"\/in\/tutorials\/ai-agent-skills\/\" data-wpel-link=\"internal\" rel=\"follow\">AI agent skill<\/a>. Keep changing information, such as the current campaign, audience, or approval decision, in the prompt, while the skill holds the stable research process and supporting resources.<\/p><p class=\"wp-block-paragraph\">When the process is stable, separate the details that change from the instructions and resources that stay the same. Keep changing details such as the current campaign, audience, or approval decision in the prompt, and package the repeatable instructions and resources in the skill.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AI agent prompts are instructions that tell an AI agent what to achieve, what information and tools to use, what limits to follow, and what counts as a successful result. Unlike a regular prompt that asks for a single response, an agent prompt guides the agent through a task where it needs to make decisions, [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/in\/tutorials\/ai-agent-prompts\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":624,"featured_media":138556,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What are AI agent prompts and how to write them","rank_math_description":"Learn what AI agent prompts are, what six elements to include, and how to write, test, and refine prompts that guide agents through multi-step tasks.","rank_math_focus_keyword":"ai agent prompts","footnotes":""},"categories":[22675],"tags":[],"class_list":["post-138555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-agents"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/ai-agent-prompts","default":1},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/ai-agent-prompts","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/ai-agent-prompts","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/138555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/users\/624"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/comments?post=138555"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/138555\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media\/138556"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media?parent=138555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/categories?post=138555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/tags?post=138555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}