> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gorules.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GoRules AI

> Build, test, and debug graphs and policies with the built-in AI assistant.

GoRules AI is the assistant built into every project. Describe what you need - a new rule, a failing test explained, a rename across the whole workspace - and it reads your documents, makes the changes, and shows you exactly what it did.

<Frame caption="The project-level GoRules AI page">
  <img src="https://mintcdn.com/gorules/q-SATzlFrErBsX5L/images/brms/ai-home.png?fit=max&auto=format&n=q-SATzlFrErBsX5L&q=85&s=f22a89f7467d00da62637629e525bc17" alt="GoRules AI page with a chat input and the workspace sidebar" width="1600" height="1000" data-path="images/brms/ai-home.png" />
</Frame>

## Where you'll find it

* **GoRules AI** in the sidebar's Quick Access opens a project-wide chat that can work across every document in the workspace.
* The **GoRules AI** tab in a document's side panel opens the same assistant scoped to the graph or policy you're editing.

Both share one engine; the difference is starting context.

## What it can do

* **Build and edit** - create graphs and policies, add and rewire nodes, edit decision table rows, write expressions. All node and block types are supported.
* **Test** - write test cases, run them, and debug failures by simulating with trace data.
* **Simulate and explain** - evaluate a graph with sample input, inspect intermediate values, and explain how a result was derived.
* **Analyse and refactor** - search the whole workspace, follow dependencies between documents, and rename an entity or field everywhere it's used.
* **Check quality** - run the same checks as [Quality Control](/brms/quality/quality-control) and fix what they find.

After it acts, the assistant reports an action log - files changed, tests run, simulations - so you can verify each step. Changes land in your draft workspace like your own edits: review them in the [Changes panel](/brms/build/workspace) and revert anything you don't want.

For complex or ambiguous requests the assistant presents a plan, or asks you to choose between options, before touching anything.

### Attachments

Attach images and files with the paperclip, by drag-and-drop, or by pasting. Attach a CSV of reference data and ask the assistant to turn it into a dictionary or a decision table.

## Scope awareness

The assistant adapts to what you have open. On a branch draft it has full editing capability. On a release, a commit, or a request diff it switches to read-and-simulate: it can explain and evaluate, but not modify history.

## Prompts that work well

Be specific. The more concrete the request, the better the result.

| Goal | Good prompt |
| - | - |
| Build | "Create a decision table for shipping rates based on weight (\< 1kg, 1-5kg, > 5kg) and zone (domestic, international)" |
| Modify | "In the pricing table, change row 2 to a 20% discount instead of 15%" |
| Test | "Add test cases for the loan-approval graph covering a strong applicant and one below the credit minimum" |
| Debug | "This test fails - simulate its input and show me where the trace diverges from the expected output" |
| Refactor | "Rename the `tier` field to `customerTier` everywhere it's used" |

Vague prompts - "make it better", "fix the bug" - work less well than describing the expected behaviour.

## Long conversations

A meter shows how much of the context window the chat has used. When a conversation gets long, use **Compact history** to summarise it in place, or **Clear chat** to start fresh. Compacting keeps the assistant sharp without losing the thread.

## Availability and credits

GoRules AI requires a plan with AI enabled and an LLM provider configured by your administrator - see [AI setup](/developers/deployment/brms/ai-setup).

Usage draws on your organisation's AI credits: a monthly included allowance is used first (it resets monthly and doesn't roll over), then any purchased top-ups. When the balance reaches zero, AI pauses until you top up. Administrators can track spend under Billing & Credits in the organisation settings.

## Connecting external AI tools

The same tools the assistant uses are available to external AI editors - Claude Code, Cursor, and others - through the MCP server in [Developer Tools](/developers/developer-tools#mcp-server). Connect the [GoRules CLI](/developers/cli) and your editor works with the workspace exactly as GoRules AI does.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.