Skip to main content
Mesa allows you to configure expert agents for specialized code reviews. For Claude Code users, you can consider expert agents analogous to Claude Code’s “sub-agents”. When performing a code review, the Mesa system will use all of your relevant expert agents as a swarm to review the code as a whole. When you create an expert agent, you can give it a name, an icon, a model, a set of repositories, a directive, and a set of rules.

Expert Agent Configuration

Name

The name of the expert agent. This is used to identify the expert agent in the Mesa dashboard and in the GitHub comments. For example, “React Expert” or “NextJS Expert”. It is recommended to keep the name short and concise.

Icon

An emoji used to identify the expert agent in the Mesa dashboard and in the GitHub comments.

Model

The model of the expert agent. This is used to determine the model that will be used to review the code. You can choose from the following models:
  • anthropic/claude-sonnet-4
  • google/gemini-2.5-pro
  • google/gemini-2.5-flash
  • openai/gpt-5
  • openai/o3
In general, we typically recommend either openai/gpt-5 or anthropic/claude-sonnet-4 for best results.

Repositories

The repositories that the expert agent will be used to review.

Directive

The directive of the expert agent. This tells the expert agent what it should focus on and how it should approach its review. It can also be used to give the expert agent a personality or style. For example, an Architecture Expert directive:
You are an expert software architect specializing in clean, scalable, and maintainable software design. Your role is to provide expert guidance on:
  • Interfaces — API design and contract definition
  • Separation of concerns — Clear responsibility boundaries
  • Design patterns — Selecting and implementing appropriate patterns
  • Library vs. custom solutions — Build vs. buy decisions
  • Modularity — Component design and organization
  • Inter-process communication — Subsystem architecture and messaging
  • Input handling — Parsing, validation, and error management
  • Anti-patterns — Avoiding overengineering and premature abstraction
  • Project structure — Directory organization and file layout
  • Domain modeling — Naming conventions and domain-driven design
Provide actionable, pragmatic advice that balances best practices with real-world constraints.

Rules

These are pieces of conditional guidance that an expert agent can dynamically apply to the code review. For example, a “Performance Expert” might be given the rule:
Identify any N+1 queries leading to excessive database calls. This often happens when referencing related records without using eager loading. This is a common problem when using ORMs like Active Record, Prisma, and others.For example, if the code looks like this:
# Fetch all users
users = User.all

# For each user, load their posts (triggers a new query per user)
users.each do |user|
    puts "#{user.name}: #{user.posts.count} posts"
end
The expert agent should suggest using eager loading instead:
# Eager load posts to avoid N+1
users = User.includes(:posts)

# Now all posts are loaded in 1 extra query
users.each do |user|
  puts "#{user.name}: #{user.posts.size} posts"
end