Guidelines for writing AI agent instructions

reference brazil Updated Sep 10, 2026 1 min read guidelines-agent-instruction.md
Raw file servicenow.com

Review the guidelines to write affective instructions for the AI agents to complete your Agentic Playbooks activity.

Guideline

Description

Provide step-by-step instructions

Break down complex operations into individual steps.If you need to perform operations like count, high, or low, write each operation out, step by step.

Verify that all columns can be queried

Check the Knowledge Graph to confirm that the columns can be queried

Use specific column names

  • Make sure column names are correct in your instruction.
  • If agent doesn't understand the column value that you're giving, try to give an example. For example, if an agent returns a sys_id instead of a number, you could tell the agent to Retrieve Incident numbers like INC000081.

Write conversationally

Write instructions in plain English.

Use meaningful names and labels for activities and other nodes

Rename tables and other nodes for clarity. For example, if a table named abcd contains employee data, rename it to Employees.Note: This is especially important if you are using custom Knowledge Graph for the workflow.

Test and revise instructions

Test your instructions and check for accurate AI agent behavior for your use cases.

Emphasize critical steps

Highlight important steps to ensure they are not skipped. Use keywords like Mandatory, Required, or Important.

Specify query operations

Using the keyword Query helps our data gathering AI agent to pick the more effective Knowledge Graph over the AI search.

Search documentation
Search document titles and file paths on the brazil branch