> For the complete documentation index, see [llms.txt](https://docs.stoobly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoobly.com/getting-started/configuring-an-ai-assistant.md).

# Configuring an AI Assistant

## Overview

If you're using an AI coding assistant (like Cursor, Windsurf, GitHub Copilot, or similar tools), you can configure it to use Stoobly's documentation as an authoritative reference. This ensures the AI provides accurate, up-to-date answers about Stoobly commands and workflows.

## Why Use LLM Rules?

LLM rules help your AI assistant:

* **Provide accurate CLI commands** with proper syntax
* **Reference official documentation** instead of hallucinating features
* **Answer questions faster** by consulting the structured FAQ
* **Stay up-to-date** with the latest Stoobly features and best practices

## Setting Up LLM Rules

### Step 1: Get the Rules File

The Stoobly documentation includes a pre-built LLM context file designed for AI assistants. Point your AI assistant directly to the online version, which always reflects the latest published documentation and requires no setup:

```
https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md
```

Your AI assistant needs to be able to fetch web content to use it.

#### What's in the Rules File?

The LLM rules file contains:

* An index of common Stoobly questions and commands
* Links to detailed documentation pages
* CLI command examples and syntax
* Best practices for answering Stoobly-related questions

### Step 2: Configure Your AI Assistant

The configuration method depends on your AI tool:

{% tabs %}
{% tab title="Multi-Tool (AGENTS.md)" %}
**Using AGENTS.md (Recommended for Multi-Tool Support)**

[AGENTS.md](https://agents.md/) is an emerging open format for AI assistant configuration supported by many AI coding tools. Choose this option if you use multiple AI coding assistants or want a single, standardized configuration file that works across different tools.

**Supported tools include:**

* GitHub Copilot
* Cursor
* VS Code
* OpenAI Codex
* Google Gemini CLI

**Using AGENTS.md**

1. Create an `AGENTS.md` file in your project root
2. Add the following configuration to instruct your AI assistant to read the LLM context file:

```
# Stoobly Project Context

For all Stoobly-related questions, ALWAYS fetch https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first. Do not answer from memory.
```

3. Save the file and restart your editor if needed
   {% endtab %}

{% tab title="Claude Code" %}
**Using Claude Code**

Claude Code supports custom instructions through the `CLAUDE.md` files:

1. Create or edit `~/.claude/CLAUDE.md` (global user configuration) or `CLAUDE.md` (project-specific) in your repo
2. Add the following configuration:

```
For all Stoobly-related questions, ALWAYS fetch https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first. Do not answer from memory.
```

3. Save the file - Claude Code will automatically use these rules in your next conversation
4. You can also reference the rules file explicitly in your prompts
   {% endtab %}

{% tab title="Cursor" %}
**Using Cursor**

1. Open your Cursor settings or create a `.cursorrules` file in your project root
2. Add the following rule to instruct Cursor to read the LLM context file:

```
For all Stoobly-related questions, ALWAYS fetch https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first. Do not answer from memory.
```

3. Save the file and restart Cursor if needed
   {% endtab %}

{% tab title="Windsurf" %}
**Using Windsurf**

1. Create a `.windsurfrules` file in your project root
2. Add the following rule to instruct Windsurf to read the LLM context file:

```
For all Stoobly-related questions, ALWAYS fetch https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first. Do not answer from memory.
```

3. Save the file and Windsurf will automatically use these rules
4. You can also reference the rules file explicitly in your prompts
   {% endtab %}

{% tab title="GitHub Copilot" %}
**Using GitHub Copilot**

GitHub Copilot can use workspace context automatically. To help it prioritize the LLM context:

1. Reference the online URL explicitly in your prompts:

   ```
   Using https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules, how do I record requests?
   ```
2. For GitHub Copilot Chat, you can add a custom instruction in your settings
   {% endtab %}

{% tab title="Other AI Tools" %}
**Using Other AI Assistants**

For other AI coding assistants:

1. Check if your tool supports custom rules or context files
2. Configure it to fetch the LLM rules file before answering Stoobly-related questions: `https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md`
3. Use this phrasing in your rules configuration:

```
For all Stoobly-related questions, ALWAYS fetch https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first. Do not answer from memory.
```

4. If your tool doesn't support rules files, reference it explicitly in your prompts:

```
Read https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md first, then answer: how do I [your question]?
```

{% endtab %}
{% endtabs %}

### Step 3: Test Your Configuration

Try asking your AI assistant a Stoobly question to verify it's using the rules file:

**Example questions to test:**

* "How do I install stoobly-agent?"
* "How do I record requests with Stoobly?"
* "How do I update a scenario?"
* "What's the command to enable intercept mode in Stoobly?"

## Best Practices

### For Users

* **Be specific** in your questions (e.g., "How do I record HTTPS traffic with Stoobly?" vs "How does recording work in Stoobly?")
* **Mention Stoobly** explicitly so the AI knows to consult the rules file
* **Verify commands** in the official docs if you're unsure

### For Documentation Maintainers

* **Keep the LLM rules file updated** when adding new features or commands
* **Add new entries** to the Index table for new CLI commands
* **Create FAQ pages** in `/faq/` for detailed command documentation
* **Test with AI assistants** to ensure the rules work as expected
* **Commit and push changes** to GitHub so the published rules file stays current

## Troubleshooting

### AI Not Using the Rules File

If your AI assistant isn't referencing the LLM context:

1. **Verify the URL** - Ensure your rules file references `https://docs.stoobly.com/getting-started/configuring-an-ai-assistant/llm-rules.md` exactly, and that your tool can fetch web content
2. **Mention it explicitly** - Reference the rules file directly in your prompts
3. **Check your tool's settings** - Some AI tools require explicit configuration
4. **Restart your editor** - Rules changes may require a restart

### Getting Outdated Information

If the AI provides outdated commands:

1. **Clear AI cache** - Restart your editor or clear your AI assistant's context
2. **Reference specific docs** - Point the AI to the exact FAQ page
3. **Report issues** - If documentation is outdated, [submit a change request](https://github.com/Stoobly/stoobly-docs/issues)

### Commands Not Working

If suggested commands fail:

1. **Verify installation** - Run `stoobly-agent --version` to check if installed
2. **Check syntax** - Compare with examples in the [FAQ](https://docs.stoobly.com/faq)
3. **Use `--help`** - Run `stoobly-agent <command> --help` for official syntax

## Next Steps

You're all setup! Depending on your use case, you may want to take a look at:

{% tabs %}
{% tab title="API Mocking" %}
{% content-ref url="/pages/XRMveeqrNM5K07qs5H8k" %}
[How to Record Requests](https://docs.stoobly.com/guides/how-to-record-requests.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="E2E Testing" %}
{% content-ref url="/pages/Ri9aZJJVXgxuyy67a3tW" %}
[How to Integrate E2E Testing](https://docs.stoobly.com/guides/how-to-integrate-e2e-testing.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
