Skip to main content

Agent Rules

Agent rules are instructions injected into Docket’s system prompt when running your tests. They help the agent navigate application-specific behavior that isn’t obvious from the UI alone. Agent rules are particularly useful when writing AI Steps, as they provide the AI agent with application-specific knowledge to make better decisions. Examples:
  • The “Create Project” button is only visible after hovering over the sidebar and clicking the plus icon
  • The onboarding modal must be dismissed before any part of the dashboard becomes interactive
  • To invite a teammate, go to “Workspace Settings” via the top-right dropdown, then open the “Members” tab
  • “Add to Cart” is labeled as “Reserve Now” on product detail pages for rental items
  • The “Submit for Approval” button only appears after all form fields are valid and the form auto-saves
Each rule can be up to 1,024 characters, with a maximum of 10 rules per level.

Company-Level Rules

Company-level rules apply to all tests across your organization. Configure them from the Agent Rules tab on the Docket dashboard. Screenshot 2025-07-17 at 6.25.22 PM.png

Suite-Level Rules

You can also define agent rules at the test suite level. Suite-level rules are additive — they are combined with your company-level rules when running tests in that suite. This is useful when different parts of your application have different navigation patterns, terminology, or behavior. For example, your admin dashboard might have different conventions than your public-facing app. To add suite-level rules, open the create or edit modal for a test suite and scroll to the Agent Rules section. agent_rule_test_suite.png
Note: Suite-level rules supplement company rules — they don’t replace them. The agent sees both sets of rules during test execution.