{"abstract":[{"text":"Enable intelligence tools that you want to use in Xcode.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.Xcode\/documentation\/Xcode","doc:\/\/com.apple.Xcode\/documentation\/Xcode\/coding-intelligence"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/setting-up-coding-intelligence"},"kind":"article","legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","privacyPolicy":"https:\/\/www.apple.com\/privacy\/privacy-policy","termsOfUse":"https:\/\/www.apple.com\/legal\/internet-services\/terms\/site.html"},"metadata":{"availableLanguages":["de-DE","en-US","es-419","fr-FR","it-IT","ja-JP","ko-KR","pt-BR","zh-CN"],"customMetadata":{"show-on-this-page":"true"},"role":"article","roleHeading":"Article","title":"Setting up coding intelligence"},"primaryContentSections":[{"content":[{"anchor":"Overview","level":2,"text":"Overview","type":"heading"},{"inlineContent":[{"text":"To use coding intelligence in Xcode, go to the Intelligence settings and turn on the agents that you want to use. Choose Xcode > Settings and select Intelligence in the sidebar or click “Get Started with Agents” in the coding assistant sidebar. You can also use agents and tools from other providers that don’t appear under Agents.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"identifier":"intelligence-settings","type":"image"}],"type":"paragraph"},{"inlineContent":[{"text":"After you enable an agent in the Intelligence settings, you can enter prompts in the coding assistant. When you enter prompts, the agent that you set up in the Intelligence settings may access your project files and other information when processing your requests. For more information about sharing your project files with agents, click “About Intelligence in Xcode & Privacy…” under Coding Intelligence in the Intelligence settings.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Help agents reach your goals faster with additional guidance and tools that you and Xcode provide. You control which commands, tools, and skills agents use to perform tasks on your behalf. For more information, see ","type":"text"},{"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/extending-and-customizing-agents","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"To give agents that you use outside of Xcode access to your project and Xcode capabilities, see ","type":"text"},{"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/giving-external-agents-access-to-xcode","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"anchor":"Enable-agents","level":2,"text":"Enable agents","type":"heading"},{"inlineContent":[{"text":"When you choose an agent in the coding assistant, it automatically has access to Xcode capabilities, such as building and testing your app. To enable an agent:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"In Intelligence settings, click Get next to the agent you want to enable under Agents.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the dialog that appears, click Install.","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"text":"After you download and install agents, Xcode automatically updates the downloads if possible. To manage agent downloads, see ","type":"text"},{"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/downloading-and-installing-additional-xcode-components","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"If you have an account, sign in:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"In the agent settings, click the More button (…) in the Account row.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the next sheets, and in the browser window if one appears, follow the instructions to sign in and enter your credentials.","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"identifier":"intelligence-settings-claude-agent","type":"image"}],"type":"paragraph"},{"inlineContent":[{"text":"For more information about an agent, click the privacy policy and terms of use links that appear under Account.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"To enable an agent that doesn’t appear in Intelligence settings and supports the Agent Client Protocol (ACP), click Add an Agent under Agents, enter information in the next sheet, and click Add.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"identifier":"intelligence-settings-add-agent","type":"image"}],"type":"paragraph"},{"anchor":"Enable-ChatGPT-in-Xcode","level":2,"text":"Enable ChatGPT in Xcode","type":"heading"},{"inlineContent":[{"text":"To use ChatGPT in Xcode (with or without an account):","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"In Intelligence settings, click Turn On in the ChatGPT in Xcode row under Chat.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the dialogs that appear, click Next, and then click Turn On ChatGPT.","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"text":"To sign in to a free ChatGPT account, or a paid account with higher limits:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"In ChatGPT in Xcode settings, click Sign In in the ChatGPT row, and in the next dialog, click Sign In again.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the browser window that appears, follow the instructions to enter your credentials.","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"text":"To upgrade your free ChatGPT account to a paid account, click “Upgrade to ChatGPT Plus” at the bottom of the ChatGPT in Xcode settings.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"For some models, you can choose the level of reasoning that the model uses while producing a response. In the transcript pane of the conversation with the model, select the level of reasoning in the Reasoning pop-up menu that appears at the bottom of the message text field.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"For more information about OpenAI products, click “OpenAI Terms of Use…” under ChatGPT.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"To turn off ChatGPT in Xcode, toggle ChatGPT in Xcode off in the ChatGPT in Xcode settings.","type":"text"}],"type":"paragraph"},{"anchor":"Enable-Claude-Sonnet--Opus","level":2,"text":"Enable Claude Sonnet & Opus","type":"heading"},{"inlineContent":[{"text":"To use Claude Sonnet & Opus:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"In Intelligence settings, click Claude Sonnet & Opus under Chat.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the Claude row, click Sign In.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"In the browser window that appears, follow the instructions to enter your credentials.","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"text":"For more information about Anthropic products, click “Anthropic Terms of Use…” at the bottom of the Claude settings.","type":"text"}],"type":"paragraph"},{"anchor":"Use-another-chat-provider","level":2,"text":"Use another chat provider","type":"heading"},{"inlineContent":[{"text":"To use another chat provider, click the Add a Chat Provider button under Chat. To add a provider that’s hosted on the internet, select Internet Hosted, enter the URL and other details, and click Add in the dialog that appears. To add a provider that’s hosted locally on your Mac, select Locally Hosted and enter a port and optional description instead.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"identifier":"intelligence-settings-add-provider","type":"image"}],"type":"paragraph"},{"inlineContent":[{"text":"If you add another provider, it needs to support the Chat Completions API. In addition, Xcode expects the provider to support these endpoints that list models and perform completions:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"code":"{Model provider URL}\/v1\/models","type":"codeVoice"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"code":"{Model provider URL}\/v1\/chat\/completions","type":"codeVoice"}],"type":"paragraph"}]}],"type":"unorderedList"},{"anchor":"Configure-managed-devices","level":2,"text":"Configure managed devices","type":"heading"},{"inlineContent":[{"text":"To turn off the coding assistant for managed devices, set the ","type":"text"},{"code":"CodingAssistantAllowExternalIntegrations","type":"codeVoice"},{"text":" key to ","type":"text"},{"code":"false","type":"codeVoice"},{"text":" in a mobile device management (MDM) profile. For more information, see ","type":"text"},{"identifier":"https:\/\/support.apple.com\/guide\/deployment\/restrictions-for-mac-depba790e53\/web","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}],"kind":"content"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"seeAlsoSections":[{"anchor":"Essentials","generated":true,"identifiers":["doc:\/\/com.apple.Xcode\/documentation\/Xcode\/writing-code-with-intelligence-in-xcode","doc:\/\/com.apple.Xcode\/documentation\/Xcode\/using-coding-intelligence-in-the-source-editor"],"title":"Essentials"}],"references":{"Xcode-PageImage-card.png":{"alt":"The Xcode logo on a blue gradient background.","identifier":"Xcode-PageImage-card.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.Xcode\/Xcode-PageImage-card@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.Xcode\/Xcode-PageImage-card~dark@2x.png"}]},"doc://com.apple.Xcode/documentation/Xcode":{"abstract":[{"text":"Build, test, and submit your app with Apple’s integrated development environment.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode","images":[{"identifier":"Xcode-PageImage-card.png","type":"card"}],"kind":"article","role":"collection","title":"Xcode","type":"topic","url":"\/documentation\/xcode"},"doc://com.apple.Xcode/documentation/Xcode/coding-intelligence":{"abstract":[{"text":"Use agents to help you explore code, add features, refine your interface, and leverage skills, such as localization and accessibility.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/coding-intelligence","kind":"article","role":"collectionGroup","title":"Coding intelligence","type":"topic","url":"\/documentation\/xcode\/coding-intelligence"},"doc://com.apple.Xcode/documentation/Xcode/downloading-and-installing-additional-xcode-components":{"abstract":[{"text":"Add more simulated devices, optional features, and support for additional platforms.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/downloading-and-installing-additional-xcode-components","kind":"article","role":"article","title":"Downloading and installing additional Xcode components","type":"topic","url":"\/documentation\/xcode\/downloading-and-installing-additional-xcode-components"},"doc://com.apple.Xcode/documentation/Xcode/extending-and-customizing-agents":{"abstract":[{"text":"Expand agent capabilities for your specific needs and application domain.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/extending-and-customizing-agents","kind":"article","role":"article","title":"Extending and customizing agents","type":"topic","url":"\/documentation\/xcode\/extending-and-customizing-agents"},"doc://com.apple.Xcode/documentation/Xcode/giving-external-agents-access-to-xcode":{"abstract":[{"text":"Let agents access your project and Xcode capabilities using the Model Context Protocol.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/giving-external-agents-access-to-xcode","kind":"article","role":"article","title":"Giving external agents access to Xcode","type":"topic","url":"\/documentation\/xcode\/giving-external-agents-access-to-xcode"},"doc://com.apple.Xcode/documentation/Xcode/using-coding-intelligence-in-the-source-editor":{"abstract":[{"text":"Submit prompts in the same place you want to make changes to your code.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/using-coding-intelligence-in-the-source-editor","kind":"article","role":"article","title":"Using coding intelligence in the source editor","type":"topic","url":"\/documentation\/xcode\/using-coding-intelligence-in-the-source-editor"},"doc://com.apple.Xcode/documentation/Xcode/writing-code-with-intelligence-in-xcode":{"abstract":[{"text":"Start conversations with an agent in Xcode to generate code, navigate unfamiliar codebases, and fix or refactor existing code.","type":"text"}],"identifier":"doc:\/\/com.apple.Xcode\/documentation\/Xcode\/writing-code-with-intelligence-in-xcode","images":[{"identifier":"writing-code-using-an-assistant-PageImage.png","type":"card"}],"kind":"article","role":"article","title":"Writing code with intelligence in Xcode","type":"topic","url":"\/documentation\/xcode\/writing-code-with-intelligence-in-xcode"},"doc://com.apple.documentation/documentation/technologies":{"abstract":[],"identifier":"doc:\/\/com.apple.documentation\/documentation\/technologies","kind":"technologies","role":"overview","title":"Technologies","type":"topic","url":"\/documentation\/technologies"},"https://support.apple.com/guide/deployment/restrictions-for-mac-depba790e53/web":{"identifier":"https:\/\/support.apple.com\/guide\/deployment\/restrictions-for-mac-depba790e53\/web","title":"Device management restrictions for Mac computers","titleInlineContent":[{"text":"Device management restrictions for Mac computers","type":"text"}],"type":"link","url":"https:\/\/support.apple.com\/guide\/deployment\/restrictions-for-mac-depba790e53\/web"},"intelligence-settings":{"alt":"A screenshot of the Intelligence settings showing the About Intelligence in Xcode and Privacy link, and the Agents and Model Context Protocol setting sections.","identifier":"intelligence-settings","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.Xcode\/intelligence-settings@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.Xcode\/intelligence-settings~dark@2x.png"}]},"intelligence-settings-add-agent":{"alt":"A screenshot of the Add an ACP Agent sheet with the agent settings and Add button below.","identifier":"intelligence-settings-add-agent","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-add-agent@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-add-agent~dark@2x.png"}]},"intelligence-settings-add-provider":{"alt":"A screenshot of the Add a Model Provider dialog with the Internet Hosted option selected, and the URL, other controls, and Add button below.","identifier":"intelligence-settings-add-provider","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-add-provider@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-add-provider~dark@2x.png"}]},"intelligence-settings-claude-agent":{"alt":"A screenshot of the Claude Agent settings showing the more button.","identifier":"intelligence-settings-claude-agent","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-claude-agent@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.Xcode\/intelligence-settings-claude-agent~dark@2x.png"}]},"writing-code-using-an-assistant-PageImage.png":{"alt":"A mockup of the coding assistant on the left and the source editor on the right with the coding assistant button and message text field enlarged, and a multicolor Xcode icon in the upper-right corner. ","identifier":"writing-code-using-an-assistant-PageImage.png","type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/com.apple.Xcode\/writing-code-using-an-assistant-PageImage.png"},{"traits":["1x","dark"],"url":"\/images\/com.apple.Xcode\/writing-code-using-an-assistant-PageImage~dark.png"}]}}}