Agent Setup Guide

Set Up Your AI Coding Agent the Right Way

From basic cursorrules to dynamic product context. Give your AI assistant the information it needs to make good decisions.

Why AI Coding Agents Struggle

Your AI assistant can write code, but it doesn't know your business. Without context, it makes technically correct decisions that are wrong for your product.

No Memory of Decisions

You rejected an approach yesterday. Today, the agent suggests it again. It doesn't remember what you've already tried or why you chose a different path.

Missing Business Context

The agent knows code, not customers. It builds generic solutions instead of features that match your users' needs and your product strategy.

Session Resets

Every new session starts from zero. You re-explain your tech stack, conventions, and constraints over and over.

Wrong Patterns

The agent defaults to patterns it learned from training data, not your codebase. It suggests Jest when you use Vitest, or adds features you explicitly don't want.

Three Levels of Agent Context

Most teams start with basic rules files. As needs grow, they add skills and commands. The most effective teams connect their agents to live product context.

1 Basic Rules

Static configuration files that load at session start.

  • .cursorrules for Cursor
  • CLAUDE.md for Claude Code
  • .windsurfrules for Windsurf
  • codex.md for Codex

Limitation: Static, manual updates, gets stale, no memory across sessions.

2 Skills & Commands

Reusable workflows and slash commands for common tasks.

  • AGENTS.md with hard rules
  • Skill files for patterns
  • /onboard, /prep, /test commands
  • Decision guards before changes

Limitation: Still file-based. Decisions aren't searchable or connected.

3 Dynamic Context (Brief)

Live product context via MCP. Your agent queries Brief for decisions, customers, and strategy.

  • Decision memory across sessions
  • Customer and persona context
  • Strategic constraints
  • Automatic context from your tools

Full solution: Code decisions with business context.

Quick Setup by Tool

Choose your AI coding assistant to get started.

Cursor Setup

Level 1: Basic Rules

Create .cursorrules in your project root:

# Project Rules

## Tech Stack
- React 18 with TypeScript
- Tailwind CSS for styling
- Vitest for testing (not Jest)

## Conventions
- Use functional components with hooks
- Prefer composition over inheritance
- Always add error boundaries to new features

## What NOT to do
- Don't use class components
- Don't add new dependencies without asking
- Don't use any inline styles

Level 3: Brief MCP

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "brief": {
      "type": "sse",
      "url": "https://app.briefhq.ai/api/mcp/sse"
    }
  }
}

When Cursor connects, a browser window opens for authentication. Full setup guide →

Claude Code Setup

Level 1: Basic Rules

Create CLAUDE.md in your project root:

# Project Context

## About This Project
B2B SaaS application for product teams.

## Tech Stack
- Next.js 14 with App Router
- Supabase for database and auth
- Drizzle ORM for queries

## Hard Rules
- NEVER use git commit --amend
- ALWAYS run tests before committing
- Use Brief MCP for product context

Level 3: Brief MCP

Run this command:

claude mcp add --transport http brief https://app.briefhq.ai/mcp

Then run /mcp inside Claude Code to authenticate. Full setup guide →

Windsurf Setup

Level 1: Basic Rules

Create .windsurfrules in your project root with your conventions.

Level 3: Brief MCP

Go to Settings → Cascade → MCP Servers → Add custom server:

{
  "mcpServers": {
    "brief": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.briefhq.ai/api/mcp/sse"]
    }
  }
}

Full setup guide →

Codex CLI Setup

Level 1: Basic Rules

Create codex.md or AGENTS.md in your project root.

Level 3: Brief MCP

Run these commands:

codex mcp add brief --url https://app.briefhq.ai/mcp
codex mcp login brief

Full setup guide →

VS Code Setup

Level 3: Brief MCP

  1. Press Ctrl/Cmd + P and search for MCP: Add Server
  2. Select Command (stdio)
  3. Enter: npx mcp-remote https://app.briefhq.ai/api/mcp/sse
  4. Name it brief and hit enter

Full setup guide →

Frequently Asked Questions

What is a cursorrules file?

A .cursorrules file is a configuration file that tells Cursor about your coding preferences, tech stack, and project conventions. It's static text that loads at the start of each session. Useful for basic setup, but limited because it doesn't remember past decisions or understand your business context.

What is CLAUDE.md?

CLAUDE.md is the equivalent of cursorrules for Claude Code. It's a markdown file in your repository root that provides context and instructions to Claude about your project. Same benefits and limitations as cursorrules.

Why do AI agents keep suggesting code I've already rejected?

AI agents have no memory between sessions. They don't know you rejected an approach yesterday or why you chose a specific architecture. Brief solves this by giving agents access to your decision history via MCP.

What is MCP (Model Context Protocol)?

MCP is an open standard by Anthropic that lets AI assistants connect to external data sources. Think of it like a USB port for AI. Brief uses MCP to give your coding agent access to product decisions, customer context, and strategic constraints. Learn more about MCP →

How long does Brief setup take?

About 5 minutes. Add one line to your MCP config, authenticate in the browser, and you're connected. Brief starts pulling context from your existing tools (Linear, Notion, Slack) immediately.

Ready for Context That Actually Helps?

Basic rules files get you 20% of the way. Brief gets you the rest. Give your AI coding agent access to your product decisions, customer context, and strategic constraints.