Using Wing with an AI Agent
Pro Only
Wing Pro 12 can run your choice of AI agent inside the IDE. Agents read your code, make edits, write and run tests, debug failures, and iterate until the work is done. Wing provides an AI Agent panel for the agent sessions, a Tasks tool for queueing and tracking progress, one-click FIX actions on test failures and warnings, and side-by-side review for inspecting agent-made code changes.
You can use agents manually, creating them and interacting with them directly, or make use of Wing's Tasks Manager to keep a team of autonomous AI agents running through completion of larger implementations.
Wing also helps agents work more efficiently by giving them access to its analysis, debugger, testing, and version control features, through the Model Context Protocol (MCP).
Before You Start
If you have not yet set up an AI agent, use the following instructions to do that now. Note that not all AI agents are equally safe or well suited to autonomous development. See the table in AI Agent Safety for details.
Any other agent that speaks the Agent Client Protocol (ACP) can be used as well; see Setting Up an AI Agent.
You will also need to install a version control system, either git or Mercurial. Wing uses it to track, review, and commit each task's changes. If you aren't sure which to choose, use git. You don't need to learn to use it, since Wing and the agents manage the repository for you.
Working with an AI Agent
The AI Agent tool holds your agent sessions. It is shown automatically when you create a new project that uses an AI agent or when you run Set Up for AI Agent from the Project menu. You can also access it from the Tools menu.
Whenever possible, agents are integrated using their terminal user interface (TUI). This includes Claude Code, Codex, Antigravity, Copilot, Cursor, and OpenCode. Others like goose and other ACP agents don't have a TUI and instead talk to Wing over the Agent Client Protocol, and Wing manages them in its own AI agent conversation UI.
You can interact with the agent by typing requests directly into it -- implement a feature, refactor existing code, write tests, investigate a bug. The agent reads your source files, makes changes, runs tests, and iterates until the task is done.
The currently open agent sessions are accessed from the drop-down at the top of the AI Agent tool, and persist across restarts. Use the Options menu (the ⋯ button) to start a new session, resume a previous conversation, or clear the current one.
You can have several sessions open at once, on the same agent or on different ones, each in its own working directory. Sessions are created automatically when you use one-click fixes or run multiple queues from the Tasks tool.
See The AI Agent Tool for full details.
AI Actions
Wing provides quick access to AI agent-driven actions:
- One-click fixes for failing tests, debugger exceptions, and code warnings -- via the relevant tool's FIX icon.
- Test generation for Python files from the Testing menu.
- Code actions from the AI actions icon in the top right of the editor: explain a scope, review for quality or security, fix warnings, optimize, update docs, or run a custom action.
See AI Actions for details.
Planning and Executing Tasks
The Tasks tool lets you draft work in advance and run it through the agent. This is especially useful when you have several tasks and want them to run unattended sequentially, or in parallel across multiple queues.
This tool has several parts: Plan for setting up your tasks, Execute for monitoring execution progress once tasks are started, Review for reviewing results and decisions made, and History for tasks that have been reviewed and marked complete.
You can queue tasks manually from the Plan tab using the Q menu, which lets you specify whether a task should just form a plan or actually make changes, whether the agent should be allowed to make changes without requesting approval for each one, and whether to reuse, compact, or clear the agent's context.
However, rather than manually queueing and interacting with worker agents, we strongly recommend turning on the Tasks Manager agent with Use Tasks Manager Agent in the Tasks tool's Options menu. When the manager is enabled, the Q menu is hidden and replaced with Draft indicators on each task, which when pressed indicate the task is Ready to run. The Tasks Manager figures out how to allocate tasks to queues, when to reuse context, when to run tasks in parallel, and it can often answer questions raised by the worker tasks, or work around missing information until you are available to answer questions on the Questions tab. The Tasks Manager can optionally also automatically commit work, so it can work autonomously for long periods of time on large projects and produce a coherent revision control history.
You can view tasks by queue or in an Up Next view from the Execute tab. You can also send notes to workers or talk directly to the Tasks Manager from here, for help setting up your environment or to ask about or modify running tasks.
Once tasks complete, they move to the Review tab, which summarizes the work that was done, gives a list of decisions made, and lets you do code-level comparisons. You can comment on and ask for revisions for any of these, from the whole task, to specific decisions or code changes. This is also where you commit code, if not done automatically by the Tasks Manager.
Finally, after tasks are committed and accepted as complete, they move to the History tab, from which you can still request revisions at any time in the future.
See The Tasks Tool for details and Autonomous Development with Wing Pro for more information on using the Tasks Manager to run your development process.
Agents Use Wing's IDE Features
Wing gives AI agents access to the same IDE features you use, through the Model Context Protocol (MCP) servers it sets up for each session. These can be used by the agents to quickly find points of definition and uses of code symbols, to debug code that is hard to reason about, to run tests with code coverage efficiently, and for token-friendly version control and review actions. Agents and the Tasks Manager decide for themselves when to use these, so you don't need to ask them to do it.
Allowing agents to use Wing's IDE features reduces both wall time and token use. Preliminary benchmarks with Claude Code showed tasks running about twice as fast on average, using roughly half the tokens of the same agent run standalone. See Tutorial: Getting Reliable Results for details.
Tips for Effective Use
How you use AI agents makes a big difference in the quality of the work they produce.
Be clear and don't micro-manage
Treat the agent like a human worker. Tell it what you want, not how to do it. Focus on the results you are looking for, why you want those results, and then let the agents plan and execute on their own. If you find you are looking at agent sessions, reading code, and intervening in the details, you are likely focusing at too low a level and will prevent the agent and Tasks Manager from working at their full potential. They are fully capable of understanding a well-specified and detailed application design and then researching, planning, and implementing every part of it on their own.
Build feedback into your requests
When you're setting up your development environment for a new project, be sure to try to give the agent "eyes" to see your application as you will. Ask it to look at the UI and fix problems it finds. Make sure it writes high-level tests that simulate live runs of the code, and not just low-level unit tests. Tell it about important considerations like security, speed, accessible design, or anything else you need. The clearer and more complete you are in your requirements, the smoother development will go.
Review task summaries and decisions first
Before diving into code, read the task and decision summaries first. Catching issues there is usually more productive than sifting through every code change.
Cross-check from multiple angles
Ask the agent to review its own work for behavior, edge cases, security, version compatibility, performance, or anything else that is important to you. A good time to do this is before pushing or merging changes. You can set up recurring review tasks in the Checklists area of the Tasks tool.
See Using AI Agents Effectively for more guidance.
Permissions and Safety
The AI Agent tab in Project Properties controls what the agent is pre-approved to do without asking for confirmation. You can restrict which directories it may edit, whether it can run commands, and whether it can use version control.
To work safely with an AI agent we recommend that you:
- Run the agent in a dedicated environment (VM, container, or at minimum a dedicated user account) so it does not have access to keys for production infrastructure or sensitive data.
- Use revision control with a remote repository the agent cannot push to. Set up a VCS-only SSH key for the remote and do remote operations manually.
- Configure continuous backup (Dropbox, iCloud, or similar) so mistakes are recoverable.
See AI Agent Safety for the full discussion.
Resources
For a step-by-step walkthrough of the same workflow, see the AI agent chapters in the Tutorial.
For full reference details on each feature, see AI Agent-Assisted Development in the manual.
Section Contents
1.0.1. Using Wing with Codex
1.0.2. Using Wing with Antigravity
1.0.3. Using Wing with Copilot
1.0.4. Using Wing with Cursor
1.0.5. Using Wing with goose
1.0.6. Using Wing with OpenCode