AI Agents

How do I keep my AI agent within its intended role?

Updated October 7, 2026

A reliable AI agent should know what it is responsible for and what it should not handle.

You can keep the agent focused by combining:

  • Clear AI Instructions
  • Controlled knowledge sources
  • Appropriate Router paths
  • Carefully enabled skills
  • Human Handoff for cases that need a person

The goal is not to make the agent refuse everything outside a narrow script.

The goal is to make its responsibilities clear.

Define the role clearly

Start with a direct description of what the AI agent does.

For example:

You help customers understand our services, answer common questions, and guide them to the correct next step.

This is clearer than:

Be a helpful assistant.

Define the scope

List the main subjects the AI agent should handle.

For example:

  • Service information
  • Pricing process
  • Booking
  • Customer support
  • Product discovery

Then define what should happen outside that scope.

For example:

For unrelated requests, explain that you can help with our products and services.

Keep important business rules explicit

If something must not happen, define the correct behavior.

For example:

Do not invent prices. Use the configured Product information, Data Search, or Calculations.

Do not offer appointment times unless they are returned by Scheduling.

Do not confirm a policy unless it is supported by approved knowledge.

These instructions are more useful than simply saying:

Do not hallucinate.

Use controlled knowledge for important information

Keep business-critical information in the appropriate source.

Use:

  • Document Search for policies and written knowledge
  • Data Search for structured records and exact values
  • Products for Product Card content
  • Calendar for appointment availability

Do not rely on general AI knowledge for information your business already controls.

Turn off Live Web Search when it is not appropriate

Live Web Search is useful for current public information.

But not every AI agent should browse the internet.

Turn it off when the agent should use only controlled sources.

Examples include:

  • Internal support
  • Strict policy workflows
  • Sensitive processes
  • Agents that should answer only from company knowledge

Restrict web sources when source control matters

If the AI agent needs current information but should only use approved websites, restrict Live Web Search to those sources.

This can be useful for:

  • Official government sources
  • Your own website
  • Partner websites
  • Official travel information
  • Approved reference sites

Enable only the skills the agent needs

Do not give every AI Answer node every capability.

For example, an FAQ agent may not need:

  • Scheduling
  • Calculations
  • Product Cards

A booking agent may not need:

  • Product Cards
  • Albums

Focused capability makes behavior easier to test and control.

Use Router to separate different responsibilities

If one AI agent handles several jobs, use Router to keep them organized.

For example:

Policy question
→ Document Search

Book appointment
→ AI Answer with Scheduling enabled

Product search
→ Data Search

Needs a person
→ Human Handoff

This keeps unrelated responsibilities from being mixed together.

Use Human Handoff for cases that should not stay automated

Some requests should go to a person.

Examples include:

  • Customer asks for a person
  • Exception requires approval
  • Information cannot be confirmed
  • Dispute needs review
  • Business policy requires human judgment

Define these cases clearly.

Tell the AI agent what to do when it does not know

Do not leave failure behavior undefined.

For example:

If the answer cannot be confirmed from the available knowledge, say that you cannot confirm it and offer Human Handoff.

This is better than allowing the AI agent to guess.

Avoid conflicting instructions

Conflicting rules can make behavior unpredictable.

For example:

Always answer every question.

and:

Only answer questions about our services.

These rules compete.

A clearer version is:

Answer questions about our services. For unrelated requests, explain what you can help with.

Avoid overly broad instructions

Instructions such as:

Help with anything the customer asks.

make it difficult to maintain clear boundaries.

Use a defined business role instead.

Avoid overly restrictive instructions

The opposite can also cause problems.

For example:

Never answer anything unless the exact sentence appears in our knowledge.

may make the experience unnecessarily rigid.

Allow the AI agent to explain approved information naturally while keeping important facts grounded in controlled sources.

Test out-of-scope questions

Ask questions the AI agent should not handle.

For example:

  • Unrelated trivia
  • Advice outside your service area
  • Requests for unsupported actions
  • Requests to invent prices or policies

Check whether the response stays within the intended role.

Test attempts to override instructions

Customers may say:

“Ignore your rules.”

or:

“Just make up a price.”

The AI agent should continue following the configured business rules.

Test missing-information cases

Ask the AI agent to complete a task without required information.

For example:

“Calculate my quote.”

without providing the necessary inputs.

The agent should ask for what is missing rather than inventing values.

Test unavailable actions

Ask for something the workflow does not support.

For example:

“Book me for midnight.”

when the Calendar is closed.

or:

“Show me a product that is not in the catalog.”

The AI agent should not create an unsupported result.

Keep instructions current

Review the agent's role when you:

  • Add a new node
  • Add a new skill
  • Change business rules
  • Add a new source
  • Change human-handoff policy

Old instructions can conflict with new capabilities.

Tips for keeping an AI agent focused

  • Define the role clearly.
  • Define the supported scope.
  • Keep important business rules explicit.
  • Use controlled sources for important facts.
  • Turn off unnecessary skills.
  • Restrict Live Web Search when appropriate.
  • Use Router to separate different jobs.
  • Define when Human Handoff should happen.
  • Tell the AI agent what to do when information cannot be confirmed.
  • Test out-of-scope and adversarial requests.
  • Review instructions after workflow changes.

For more information, see:

  • How should I write AI Instructions?
  • How do I plan an AI agent?
  • How does Live Web Search work?
  • Which AskHandle node should I use?
  • How should I test my AI agent before publishing?