Xcode, agents, and you
Use Xcode 27 coding agents to explore projects, plan and build features, refine UI, and orchestrate localization and accessibility work.
TL;DR
- Xcode agents can inspect project context, open files, selections, build settings, and Apple documentation to explain a codebase and preserve findings as project documentation.
- Plan mode, queued messages, agent questions, artifacts, builds, previews, and tests help keep feature implementation aligned with developer intent.
- Design refinement workflows combine Swift Charts, realistic previews, image attachments, and inline annotations for targeted UI changes.
- Orchestration lets developers describe high-level goals such as localization and accessibility while Xcode discovers tools and coordinates sub-agents in parallel.
Agent workflows in Xcode 27
The session demonstrates Xcode 27's expanded coding-agent workflow through a workout tracking app. The development flow is organized around four activities: exploring an unfamiliar project, building a new feature, refining the visual design, and orchestrating broader tasks across multiple conversations.
A key theme is staying in control: the developer supplies product direction, reviews plans and artifacts, steers implementation with follow-up messages, and validates changes with Xcode's build, preview, and test tools.
- Xcode 26.3 introduced coding agents and tools for complex multi-step tasks; Xcode 27 expands the tool set and redesigns agent interaction.
- Agents can work from project context including source code, build settings, open files, and active selections.
- Conversation output is split between the transcript, which shows reasoning progress and tool activity, and artifacts, which show created files, edits, diffs, and previews.
Explore a project and capture knowledge
Agents can be used as a guided entry point into a codebase. In the demo, a new conversation is opened in a separate editor pane, and the agent is asked to summarize data models, describe the current view hierarchy, and provide a walkthrough. The walkthrough includes architecture details, data flow, key source references, and links into relevant files.
The exploration work is then preserved by asking the agent to draft architecture documents and place them in the project. This turns one conversation's discovery loop into reusable project knowledge that can help the original developer or teammates get up to speed later.
- Use an agent walkthrough to identify where to start in a new or unfamiliar project.
- Ask the agent to create architecture documents from its findings so the knowledge base evolves with the source code.
- Reference those documents in later conversations to give the agent fast, project-specific context.
- Use Apple Document Search when adopting unfamiliar Apple APIs or checking current framework guidance.
Plan, build, and validate features
For the insights feature, Xcode is put into plan mode before any implementation begins. The developer provides the desired new tab, high-level requirements, device-specific presentation details learned during exploration, and a request for previews. Plan mode turns implementation into a reviewable discussion rather than immediately generating code.
Queued messages let the developer add requirements while the agent is still working. In the demo, a follow-up asks for metric ideas, the agent proposes options, and the developer selects a per-exercise view and a top-level summary. Once the markdown plan is approved, Xcode implements it and surfaces diffs and new files as artifacts.
Validation is part of the workflow. The agent uses Xcode's build tool, receives build errors, iterates, updates architecture documents, renders previews, and later writes and runs unit tests for the SwiftData model changes.
- Use plan mode when the architecture and scope matter more than immediate code generation.
- Review and edit the markdown plan before approving implementation.
- Inspect source edits and new files as artifacts while they are produced.
- Use builds, previews, and tests to let the agent validate work incrementally.
Refine UI with previews, attachments, and annotations
The refinement phase adds Swift Charts visualizations to the insights view. The agent first explores chart styles suitable for the app's data, then generates previews using artificial workout data so the developer can compare options in context. The selected chart is a volume-over-time visualization.
The developer then attaches a sketch made in Freeform to communicate the desired chart style. Xcode's preview rendering allows the agent to iteratively verify the generated UI. Final tweaks use inline annotations placed directly in source code to request a fade-in animation and theme-matching trend line color at precise locations.
- Use realistic preview data to evaluate visual options rather than relying on text descriptions.
- Attach images, sketches, or documents to communicate design intent that is hard to express in text.
- Use inline annotations when the change belongs at a specific source location; surrounding code becomes part of the context.
- Keep subjective choices such as chart type, animation, and color under developer direction.
Orchestrate larger goals with tools and sub-agents
The orchestration section shows high-level tasks that span many files: localizing the app into Filipino and improving accessibility. Instead of manually invoking each tool, the developer describes the goal and Xcode discovers the relevant tools, such as machine translation support, then coordinates work across sub-agents.
Localization and accessibility run in parallel conversations. The localization workflow finds user-facing strings, translates them, and configures the strings catalog. The accessibility workflow adds VoiceOver labels and accessibility identifiers to interactive elements. The developer remains able to check progress and review the final app behavior.
- Describe broad goals such as localization or accessibility instead of micromanaging each edit.
- Xcode can discover tools automatically based on the task.
- Sub-agents can divide work and call specialized tools under the main workflow.
- Always review results, especially translated strings and accessibility behavior.
Resources
Related Sessions
What’s new in Xcode 27
Explore Xcode 27's customizable workspace, editor-based coding agents, Device Hub, localization, Organizer metrics, Instruments, and Xcode Cloud updates.
Get the most out of Device Hub
Use Device Hub in Xcode 27 to control, organize, configure, diagnose, and reproduce issues across physical devices and simulators.