PhpStorm 2026.2 Help

Agents in PhpStorm

IDE intelligence for coding agents

PhpStorm integrates the coding agents of your choice directly into your project workspace, allowing them to query and act based on PhpStorm’s parsed, indexed, and inferred model of your codebase, knowledge about the project context, including package dependencies and PHP language level, and framework-aware resolution.

PhpStorm's inspections and integrated static analysis tools provide agents with deterministic checks to validate their changes, saving the tokens and context that model-based review would spend.

For review and validation of an agent’s changes, PhpStorm provides fine-grained diff and rollback tools, while Local History lets you compare and restore intermediate states even when the agent creates no VCS commit.

Agent workspace in PhpStorm

The Agent workspace is PhpStorm's agent-centric development environment. It provides the workspace for managing multiple agents and agent sessions in parallel across repos and tasks. You can run agents locally, in the cloud, or isolated in a temporary worktree.

Agent workspace PhpStorm

You can work with both agent sessions and project files in the editor tabs simultaneously, without having to switch between the editor and agent workspace views.

Open and manage Agent Sessions

To start a new agent session:

  • Click the agent widget in the main toolbar to start an empty session with the currently selected preset.

    Main toolbar with the agent widget icon and dropdown arrow highlighted for starting a new agent session.

    To use another preset, click next to the widget and select it from the list.

    Agent widget menu in the main toolbar listing the presets and agent defaults available for a new session, and the Add Agents item.
  1. Open the Agent Sessions tool window. If it is not visible, select View | Tool Windows | Agent Sessions.

  2. Click New Session to start a new session with the currently selected preset.

    Agent Sessions tool window showing the New Session control at the top and a list of existing sessions below it.

    To use another preset, click next to the button and select it from the list.

    Agent Sessions tool window with the list next to New Session expanded, showing the available presets with the current one selected.
  1. Press Ctrl twice to open the global prompt. You can invoke it from anywhere in the IDE.

    Global prompt with the preset list, quick action suggestions, attached code context, and a text field for the request.
  2. To use another preset, click the currently selected preset and select the required one from the list.

    Global prompt with the preset list open, listing the available presets and the Add Agents and Manage Presets actions.
  3. Type your request in the text field and press Enter.

Learn more:

Features for working with agents

Multi-agent setups

PhpStorm works with the agents, provider accounts, and subscriptions you already have, along with providing a curated registry of agents you can browse, install, and set up from your IDE.

Agent presets are reusable configurations defining which agent, agent mode, model and reasoning effort are used for the current agent session, allowing you to easily switch between agents or agent setups for different types of tasks.

Locally installed agents

If you already have coding agents installed on your machine, PhpStorm detects them the same way it detects your default system shell or configured PHP interpreter.

An agent that is already present in your environment, such as Claude Code or Codex, becomes available in the IDE with the configuration it already uses.

Registry of available agents

A curated catalog of ACP-compatible agents you can browse from PhpStorm. The IDE reads the registry from a JetBrains-hosted online JSON file by default, and your organization can provide its own registry.

Because Agent Client Protocol (ACP) is a standard interface, compatible agents can work with PhpStorm without a dedicated integration.

Learn more:

Context and cost management in agent sessions

Per each agent session, you can attach context such as files/folders, commits, contex from screen, or specific agent skills.

Context picker listing Project Files and Folders, Upload from Computer, Context from Screen, Commits, and Skills, plus a list of recent files.

After you send the first prompt, a context indicator also appears in the text field. Hovering over it shows how much of the model's context window is used in the current session. Prompts, attached context, and agent responses contribute to this usage, and the indicator updates as the session continues.

Agent Session View with the context indicator tooltip open, showing the percentage of context used and the used, available, and capacity token counts.

Learn more:

Diff review and output validation tools

While you review the files changed by an agent, you can leave notes on the lines of a diff and send them back to the agent in your next message. Notes let you point at the code you want reworked instead of describing it in the prompt.

Diff viewer with a note popup on line 45 of the session changes, showing the typed note text and the Cancel and Add Note buttons.

Learn more:

Learn more

JetBrains Air

The detailed guide to the JetBrains Air features in JetBrains IDEs.

MCP server

The full list of PhpStorm tools available for coding agents via MCP server.

AI Assistant

PhpStorm's plugin providing JetBrains AI features, including AI Chat, in-editor code completion, next edit suggestions, code insights, and coding agents.

01 October 2026