> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex.md).

# What is Sonar Vortex?

Sonar Vortex is a product that equips your coding agent to write code that fits your project, and to check that code as it is produced. It works with Claude Code, Codex, GitHub Copilot CLI, Cursor, and Antigravity, among others.

Vortex gives your agent:

* Code navigation tools
* Constraints and guidance
* Continuous verification of the code as it is being generated

The goal is code of higher quality, produced faster and at a lower cost.

## Why your agent needs it

A coding agent suffers from two main limitations:

* It does not know your project
* It does not know your constraints and has no way to verify that its code is aligned with them

The first limitation means the agent spends effort, and tokens, reading your codebase with textual search such as grep, find, and glob, every time you start a session or change direction. If you have been using agents extensively, you may have experienced this "eternal new-joiner" feeling.

The second limitation means the agent may generate code that works but *looks and feels* wrong: code that ignores your coding standards, disrespects the layers of your application, or introduces dependencies that violate your policies. The analysis at the pull request level catches these problems eventually, but correcting them costs frustration, delay, and either human time or follow-up agentic sessions.

Writing extensive documentation in your repository solves neither problem well. It goes stale, it costs tokens to keep current, your agent may forget to update it, and it verifies nothing.

## The Guide-Verify-Solve loop

Sonar Vortex equips your agent with a guide-verify-solve loop to ensure pull requests pass quality gates the first time, leading to faster code reviews with no back-and-forth. The loop has three steps:

1. [**Guide**](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex-context.md): Vortex injects code intelligence, architectural awareness, coding guidelines, third-party license policies, and security information into the LLM context before it writes or edits code.
2. [**Verify**](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex-analysis.md): Vortex verifies the resulting code with full CI-level precision.
3. **Solve**: The LLM refines the code based on analysis results and corrects the issues it introduced.

```mermaid
%%{init: {'themeVariables': {'actorBkg': 'rgba(18, 110, 211, 0.06)', 'actorBorder': '#126ED3', 'actorLineColor': '#126ED3', 'signalColor': '#126ED3', 'labelBoxBorderColor': '#126ED3'}}}%%
sequenceDiagram
    participant User
    participant LLM as AI Agent
    participant Vortex as Vortex<br/>(Guide & Verify)

    User->>LLM: Request code generation
    LLM->>Vortex: Request guidelines & architecture
    Vortex-->>LLM: Inject coding standards & structure (Guide)
    LLM->>LLM: Generate code
    LLM->>Vortex: Analyze generated code (Verify)
    Vortex-->>LLM: Return analysis results

    alt Issues found
        LLM->>LLM: Refine code based on issues (Solve)
        LLM->>Vortex: Re-analyze code
        Vortex-->>LLM: Return analysis results
    end

    LLM-->>User: Return verified code
```

The outcome: green quality gates and mergeable pull requests, for fewer tokens.

## Learn more

* [Sonar Vortex context](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex-context.md): how Vortex delivers context to your agent to reduce tokens
* [Sonar Vortex analysis](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex-analysis.md): how Vortex verifies your agent's code to keep quality high

## Get started with Vortex

Learn how to [install Vortex for your agent](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/how-to-guides.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonarsource.com/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/sonar-vortex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
