Developer Tools • 1:02:02
Join us online to ask questions, get advice, and follow the discussion about getting started with coding intelligence. Conducted in English.
Unlisted on Apple Developer site
Transcript
This transcript was generated using Whisper, it may have transcription errors.
Hello and welcome to the Coding Intelligence for beginners Group lab. My name is Angelica. I’m part of the Worldwide Developer Relations team, and it is my privilege to be hosting today’s group lab because I am joined by some great panelists, some that you might be familiar with from a certain platform, state of the Union, including someone who had an incredible wardrobe with Xcode themes.
I didn’t wear it today. Unfortunately. I really wanted that neon noir one. And also Mr. Fantastic himself. We are all so excited to answer your questions today. There are quite a few of you joining us today, so there’s a chance we won’t get to every question. We’re going to be focusing on the most popular questions and questions that benefit the broader audience.
If you don’t get your questions answered today, don’t fret. We can continue the conversation in developer.apple.com/forums. And of course, don’t forget about feedback.apple.com where you can submit code questions, bug reports and enhancement requests. All right, that’s enough from me. Let’s get started with a round of introductions starting from across the table. Who are you and what do you do here at Apple? Yeah, I’m Nathan and I manage one of the one of a few different Xcode intelligence teams, specifically one that deals a lot with the interactions with the agent and the models we deal with. Yeah.
I’m Ken. In addition to doing fun costume changes, and so too, I lead the Xcode team. Hi. Good morning everyone. I’m Jerome, I’m the product manager for Developer Tools and I’m also a pins collector. Hi everyone. I’m Kevin, I’m one of the senior engineering managers for Xcode focused on our AI tools. Awesome. Well, this is coding intelligence for beginners after all. So I’m going to start with a general question for all four of you coding intelligence, working with agents. It’s a pretty big shift in terms of the way developers work.
And some folks are at different levels of familiarity with agents or working with agents. How would you say development has changed, especially app development? How has it changed since the introduction of agents, maybe Jerome or Ken? You have thoughts about this? I mean, I think from my perspective, what you get to do a little bit more tangibly now is you get to work with these agents to articulate some of your ideas and make those a little bit more real, something you can see.
Something I personally do is I work with the agent to create a spec for what I’m building, right? So it kind of creates this document that says this captures my intent or it doesn’t. And if it doesn’t, then I can iterate with it and then I can see it over time. I can, I can, you know, modify it over time.
And so that’s one big change. Like all of those things were happening before people were doing those, but they just weren’t maybe quite as codified. So I think that’s a big one. Yeah. I mean, you know, from from the very beginning of computer science, we try to make coding easier, right?
And like, you know, in the beginning, you just type one character at a time, you know, you had a mistake, you have to find exactly where it was. So we added code completion and code completion with models. And then this chat experience that allows you to generate code in a certain files, but like this Agentic flow that can verify its own work, fix its own errors, and actually work until something is done. That’s a much bigger shift that helps you realize your ID much faster and actually keeps you very creative, because you can really focus on making those ideas a reality with the help of all these tools.
So I would say it goes beyond just the idea of like getting to the idea that you already have in your mind. I think what I love is that you can actually, you actually test your idea to see if it’s good. Yeah. I find most of the time my initial idea is probably wrong.
And before I would like, stare at this like, complex path of performing and be like, I just don’t know if it’s worth it to go down that path. With genetic coding, it’s so easy to explore those paths. Yeah, there’s a lot, a lot of shifts in your mind when you’re exploring a problem space, and the cost of writing new code and deleting old code is so fundamentally changed, you feel much more emboldened to try things that you might not try before, and to really do something for your user that you wouldn’t have thought possible.
I think that’s very, very cool. That’s the coolest thing really, is that it shifts this cost around a little and makes it possible for you to try big things. One of my favorite things that I think that it has introduced is the introduction of some of the best practices that a lot of folks may like, delay or put later in their roadmap, like how testing, introducing, testing has actually helped with agent workflows. So like building your test suite actually benefits. And every prompt that you have with the, with the agent moving forward or introducing the translation.
Translation with agents and localizing your apps and these type of things. It’s, it benefits you as a developer because it makes it easier for you to do. But the incredible benefit to your users, to the people who are using your apps is, you know, immeasurable, I think. So that’s, I think what was the most exciting about the introduction of agents, especially in app development? Totally. All right. We do have some great questions from some developers. The first one we have from Pichaya tries, I really hope I pronounced that correctly. Where is the best place to learn all the commands like slash plan and more?
Yeah. So when you when you type slash Xcode has collected from the agent, if the agent happens to provide a list back to us the compatible commands that it knows about, and then it’ll also show you any of the skills that are loaded up from Xcode. Things like that. You can also ask the agent, right? You can ask the agent for help with this stuff. The agent is aware of almost every command that can be executed and what it will do.
I would suggest experimenting with both of those things and seeing what you can learn from that. And just try some of them and see see what they show you. Because you may be really pleasantly surprised about a whole new workflow that either we provide or the agent provides already out of the box. That really changes the way you work with these.
I think Ask the Agent is probably something that you know will be an answer for many of your questions today. You know? Definitely a good tactic. Ask the agent. All right. We have another question from our developer, Jason Chung. As more developers adopt agent first workflows, what unique advantage does Xcode’s built in coding intelligence provide over external AI agents?
And how does Apple see the future of relationships between AI and Xcode? Well, maybe the future question might be a little bit tougher since we don’t talk about future plans. But I’m very curious if you all have insights on what’s unique, what’s what’s a unique advantage of using Xcode for agent workflows?
Yeah. Kevin, why don’t you. Yeah, I’ll start with that one. I think a couple of things that come to mind immediately. One is we’ve spent a lot of time thinking about our tool set that we provide. We’ve spent a lot of time talking about the knowledge that we provide and also the project understanding.
So if we look at, we’ve really tried to get the agent to understand how your project is laid out. What does that mean for developing an Apple platforms? Then there’s a lot of great tools that surface information about the SDK and the APIs. We have our documentation tools that allow the agent to explore what are the new APIs. It’s always getting the most relevant information.
And then there’s tools for validation. And I think this is really what gets me really excited is how do we help the agent actually check its work as it goes along. So we have tools like that you’d expect like building. We have a couple different kinds of building tools because we’re also trying to make it really fast.
So we have both build the whole thing, but we also have like little builds that can run. We also have tools for validating the execution of code, which is, I think, really exciting. We can do, you know, both the execution of like little snippets of code all the way up through actually rendering your UI and interacting with it and testing it.
So those are a couple of like the different kind of tool sets and knowledge that we kind of provide for, for the agent to use as inside of Xcode. Yeah. And then I think there’s other things that that sort of go beyond that into the Apple ecosystem that give you access to data about your apps.
So, you know, your crash data, you know, best practices with localization. And there’s a lot of Apple knowledge baked into those to help surface up things, you know, to you to make it a lot easier to, to, to utilize that. Yeah. Xcode has like years and years of Of experiences of building apps for platforms, and it comes with unique features like the preview system, for example, which is unique to Xcode, allowing you to actually visualize all your changes.
And now, you know, we’re giving the the preview system to the agent so that it can visualize its work, right? And we build those very nice crafted experience within Xcode to annotate things text, but also previews, right? So not only you have all the tools available, but the experience itself, you know, feels very, you know, Apple very well crafted so that it’s, it’s, you know, welcoming for newcomers that maybe are using a genetic for the first time, you know, they will, they will feel at home using an Apple product, but also very powerful for, for all the people that wants to do very complex things and maybe their work in Excel for 20 years, they also needs to be welcomed with with that new workflows.
Yeah. The other thing that we offer is like there’s an onboarding point when you’re just getting started with the agents, where it’s very overwhelming because you’re looking at sort of all the different things you can do with these, and you just send an English language sentence to an agent, it will come back with an answer and it will look like it’s done a great job. And it probably has done a pretty good job, actually. But we have a lot of experience working with agents now and understanding how to onboard into these agents really effectively. So we offer out of the box guidance on a really good starting point.
We have a really good planning mode that really helps you get the most done with the agents built in planning mode, and we add a lot of great stuff on top of it. We have really good base set of tools, and you can extend both of those things with plugins now, of course, but it means that as you get started, you already have sort of a running start that someone outside Xcode might not have in terms of learning how to use an agent really effectively.
Great. All right. Moving on to a very highly upvoted question from Harry three. Does the Xcode 27 UI have any indication of the amount of genetic resources being consumed. While it is carrying out your request? Yes. So your agent provider will have a slash command of some kind that will give you access to that information.
I don’t want to enumerate every single one of the different ones because there’s so many. I will point out that there’s often two. There’s one that tells you what the current state of the primary context window, the central coordinating agent that’s handling the transaction, how full that is.
And then there’s also going to be one that tells you how much things have costed so far or how much you’ve used. These are often two different numbers, and it can be easy to mislead yourself by looking at the wrong one in terms of am I, you know, am I going to regret spending, you know, $20 on this session or whatever? It might be a different answer than, am I getting close to the point at which the agent’s going to start compressing down its context, and I have to wait a minute or so.
I think maybe a clarifying point to is that we don’t have that information in the UI. That’s something that you ask to drums point earlier. You ask the agent, ask the agent for that information. You ask the agent for that information. Yeah. If there’s if there’s more information like that that you’d like to have better surface, that’s a great time to file a feedback. Yeah. Yeah, absolutely. The kind of workflow stuff we’re really interested in fixing for people.
Yeah. If there’s a particular use case or perhaps a suggestion for where would you like it to be surfaced outside of asking the agent file feedback or [email protected]. All right, let’s move on to another question from a developer. Juto asked if the Xcode AI agent needs to read or search implementations from other projects. Is there a way to add additional working directories to its context? For example, could we let the agent access another local project when it needs cross project references? This is a great question about security and permissions that the agents have.
I think you want to. You want to kick it off, Nathan? Yeah. So We, we do sort of have a few different modes of security that you can operate in, in Xcode with agents, right? By default out of the box, we will use permission prompting to sort of make sure that the agent can get to the things it needs to get to, but doesn’t have free reign.
If you find that the permission prompting is getting in the way of being able to let the agent do a lot of hard work. The other thing that we offer, in addition to allow always is a mode that you can turn on that is still sort of an early preview of this functionality, but this managed security mode that lets you instead sort of gate on the agents actions themselves at sort of the file system level and govern what happens in terms of handling references. If it’s referenced in your Xcode workspace, the agent can get to it and can know about it.
If it’s referenced outside your Xcode workspace, it’s something on disk, somewhere that you want the agent to be aware of all the time I’m pasting in file paths, or I’m saying, oh, it’s in my documents directory, and I’m letting the agent go explore and find it. It’s very good at just figuring out the distinction between these things and getting the access it needs.
That’s a great point about like configuring your Xcode environment for what you’re working on. Xcode workspaces are a great way to bring in multiple projects. You can kind of mix and match based on like what you’re working on at the moment, configure your workspace, and then we automatically handle the agent being able to see all those pieces.
Yeah. Super important is you’re always in control. Like you will, you will see those tool calls and the agent will ask you permission to enable a certain, you know, some of those tools can actually move your files or delete your files. So we always ask you if you allow those tools within your project, right?
Yeah. But there’s, I mean, there’s great, it’s easy to, to give access to things where you always want that. Like if you’re like me, you take a lot of screenshots, drop them on your desktop, you want the model to have access to that. So you can reference those and talk about those really easy to do that, but you always get to make the choices. Yeah.
Absolutely. Okay. There is a there. As Nathan mentioned, there is an experimental one special feature in the settings. I believe you were mentioning Xcode settings. If you wanted to give it permissions to do take certain actions. But when you’re copying, moving, deleting things in other directories, of course, we want to make sure that you are in control and know exactly what the agent is going to be doing, since it is pretty non-deterministic most of the time. All right. Great. Let’s move on to a question from Tammy Santana.
Coding intelligence builds features but doesn’t explain them. A beginner finishes a session with working code that they don’t understand. They can’t debug it, maintain it, or extend it. Please, please add an optional explain what I just did and why. Summary. This might be more of a feature request.
Please add an optional. Explain what I just did and why. Summary. After each completed task. If. For people who want to learn, not just ship. That’s a great point. I can jump in to start. I think there’s a couple of things to do. One is asking the agent questions is such a great idea. It’s a great way to learn. And they love to talk. So it’s great to be able to ask agent, like, why did you just do that? And it’s happy to give you and kind of the form that you want.
Like I love asking for like HTML reports or markdown files or just like, tell me why you did this. Help me understand. And you can kind of get like, what’s cool about agents too is you can configure them to kind of do your common things like out of the box.
So if you have like an agent’s MD in your, in your project, you can configure it to say after on a prompt. Just always give me some explanation. Here’s the format I want it in. Here’s how I want you to do it. And now suddenly you’ve just basically built yourself a feature inside of of Xcode, which I think is just really fun and powerful.
So you’re creating a skill for yourself, which is, you know, every time I ask for something, I want you to create documentation for it or, you know, create a summary of what you just did. The way I’m using it though, is I’m creating two conversations, right? In 027, you can have many conversations in parallel.
And so while the agent is working, actually ask questions on the code that’s being generated or a question of a new API that it’s using, right? So you build and learn at the same time, which is, which is really cool. Yeah. And I think this kind of goes back to the, the sort of spec driven development that I was talking about where, you know, you can bake it into what you’re asking for so you can upfront ask, you know, like, let’s start by actually, you know, you tell me all the assumptions you’re going to make.
Maybe tell me how you’re going to implement it and capture that in something that you always have. I find that to be, you know, a good way to kind of split the difference there. Yeah. Another strategy I use all the time is I will write the shape of the code.
I will declare the struct where the work will happen. I will add some of the properties. I’ll put a comment saying and the others there, and then I will go over and I will declare the protocol that something else conforms to. And I will add a comment somewhere else that says, and here’s where I think we’re going to have to call this stuff.
And then I’ll open up a chat with an agent and I will say, all right, let’s, let’s do this work together to put this thing together, to thread these pieces together. And the agent can help fill in the gaps. That can be a very, very powerful technique as you’re sort of working through solving these problems. And I’ve found, especially in apps that I’m just bringing up for myself, I can define a lot of the structure that way very quickly without having to get as hands on as I used to.
That’s a great point about constraints. Like there’s different fidelities of constraints. You can give it. Like sometimes I’ll give it natural language constraints, like, please do this thing for me. Sometimes I’ll give it like a source file that’s like fill in these things for me. And sometimes you can combine it. So like, I’m not sure how to build this part, so I’ll do it in natural language, this part, I really care that it’s a protocol that has these kind of, you know, requirements on it.
and then you bring those together and the agent does a great job of blending those. And that can help also with the understanding. You can kind of start with what you understand and then bring in the parts you don’t. I was thinking too, like we talk about plan mode as a way to be able to understand before implementing any code, before anything gets changed in your project.
But plan mode is also a really great way for you to understand how it approaches a problem. And so rather than just saying that, you know, agents are just shipping features that I don’t understand, that plan mode is actually there to be able to, for you to be able to make changes and be the, the conductor of the, the work that the agent actually has to build.
So I would say that there’s a lot of opportunities to learn or learn about what you’re building as you’re going along with the agent. Again, asking questions is a great way. Building architecture documents that you then leave in your projects is also an added benefit, because that means the agent can use that in the future when you’re building more features. And that means you also get to use that as resources, or your teammate gets to use it as resources. So there are lots of ways you could use agents. It doesn’t necessarily mean it has to.
It has to go off and do its work on its own. There’s a lot of control that’s built into Xcode for you to be able to participate. And the other thing is like, there’s always this sort of tension that you feel as you’re working on this stuff of like I told the agent to go off and build this part of the calculator, but like when the, when I display the tip, I wrote this part, but now I feel very alien from that calculator stuff. How do I fix this? One of the things I’ve found that is a very fun way to sort of do this stuff is I will even.
Sometimes if it makes a big change for me, I will ask it to host a little game show for me and like ask trivia questions with its question, asking tools about like how the code is put together. And then I have to answer the multiple choice questions and I get to play a little game. And it teaches me about the code that I now own. And if you. Got it wrong, it’s stop working. Right.
That’s a great point about like the different ways that we all learn. Like I’m a visual learner. So I love diagrams. So like, I always have to make diagrams because it’s like, it makes so much more sense to me. And so I think that’s why my first thought was architecture documents, because I have to be able to look at the way data flows or how these features are built so that I could validate that that’s actually how I want it to work.
And I think that’s the part that that working in Xcode, specifically, being able to understand the context of the project, what’s happening with Xcode details from, you know, the like the organizer data or crash data, you could actually be a little bit more thoughtful about what you do. And debugging is still your responsibility.
You could ask it to debug things, but you still have to figure out exactly if those solutions are correct. And so there’s a lot of control that you and again, a lot of collaboration that you can do with agents rather than necessarily leaving it to chance. Yeah. That’s good. All right. Moving on to another question from Florentine F. What are some common mistakes the coding assistant makes that beginners would find pretty hard to catch on their own?
This is a great question. So there are, of course, whole classes of bugs that these coding agents will will commit, just like humans do. The most subtle thing a coding agent can do is not understand the assumptions that you were making when you asked it to do the work. And this takes many different forms.
It could be that you asked for one thing and it gives you something completely different, but it can also be that you asked for one thing, and it gives you an unmaintainable version of that thing. You know, there are a whole sort of categories of these failure modes.
It also can often not discover absolutely everything it needs to. In Xcode, we do a lot of work to make sure that agents can find what they need as quickly as possible and learn from it as quickly as possible. But these are fallible tools in a way that a compiler is generally not.
So you have to watch out for those things. I think the variant that I am often the most nervous about is what I would call like cheating, where an agent has quietly gone through a bunch of work and its job is to finish the job. Sometimes it’ll look at the work that’s been done and it’ll go well. I haven’t made that unit test passed, but that’s okay. It doesn’t pass because I’m in a debug configuration right now. It’ll pass in production.
You know, if you wouldn’t accept that answer from a coworker, don’t accept it from a machine. And you know, you have to watch out for that stuff and keep on top of it. But you can also teach it over time what your expectations are, especially with things like tests and strong types in your project that get caught by the compiler and live issues. The agent gets feedback on that stuff fast so that it can iterate and see it’s wrong work before it gets to you, because by the time it gets to you, it’s going to become much more challenging to catch everything that’s happened.
Yeah. And I think. That’s something that we’ve, we, we spent a lot of time doing is working on the tools for validation, particularly. That’s why we have so many tools for validation. So I say experiment with some of the different tools that are in the Xcode suite to kind of figure out what works for your project, what’s important, how different workflows and sharing with us. We’d love to, we’d love to.
I think I’d love to hear what what developers are doing. I think that’s, that’s the, my, my first thought process is, I mean, this happens with a lot of our features in Xcode, the Swift language, when it when it’s finally available to a larger audience. You know, we all sit here thinking about how agent workflows are, are going to be or like how we think it would be best done with xcode’s context and the tools that we have available.
But the way they use those tools are always surprising to us sometimes, you know, like not always, but sometimes surprising where you’re choosing a different workflow or your, your agent workflow is a little bit different than we expect. And of course, that’s where feedback assistant is incredibly valuable. If you have an enhancement request or a tool that you want to work in a certain way. Reach out to us and let us know.
All right. Let’s take a look at another highly upvoted question from Tammy Santana. This might be another feature request that might be great. For us kind of feature. Requests. So Tammy Santana is saying there is no undo button. Xcode coding intelligence needs an undo agent changes button when the agent edits ten files across my project, my only rollback option is git, which beginners, not all beginners, know one button to revert. Everything the agent did would save hours of damage from bad suggestions. Well, actually, you can tell the agent.
Actually, this doesn’t work for me. Come back to the previous state and they will do that usually pretty well, right? So it knows how to undo the work that it’s just done because he has the whole context. So he can always roll back to to the previous state. But that’s a good You know.
The other reason that I was joking that this is my favorite kind of feature request is because it’s an already implemented feature request. We have actually this history thing that has kept track of. As long as you have initialized a git repository for the agent to work within in your project. We do track states across each turn with the agent, and you can open that up and move the slider up one level and hit revert, and it will go back to the way that it was right before the agent took its last turn.
Right. So there’s like different levels of, of things you can use. There’s, you know, obviously git is the largest tool, the largest time window, I guess you could say. Then Xcode has this, you know, history feature for, you know, kind of the very granular, the last action that you took and you were saying, ask the agent.
Yeah. Like the agent’s also very good at understanding kind of what it did, which is also nice if it’s, if there’s parallel work that you’re doing or there’s multiple threads, you can be like, well, undo this part, but keep this part over here and it will kind of merge those together.
Yeah. I mean, I found the agent does a fantastic job reasoning about its own work, especially over time. You know, so as you’re making commits or having it make commits and you realize something you know, from yesterday isn’t quite right or isn’t panning isn’t panning out, it does a good job when you point that out. And so it does. Fantastic.
I do want to call out also, Tammy has a great point here, which is the only rollback option is tied to git. So both the history. If you if you have a git repository set up with your project, that’s the best way to be able to use that feature. You could ask the agent to go back. What I want to call out is regardless if you’re using an agent, using git is incredibly valuable.
Yes, please use git. There’s a reason that box is ticked by default when you hit new projects. When you. When you start new projects, you could set up. Get a git repository with your project so that you could actually do these changes. I would say even if you’re developing features on your own, I just want to say this because I’ve, I’ve encountered a lot of developers who are solo developers.
They. They think that git is related to working in the team where you have to do pull requests and things like that, but being able to revert issues like bugs that you introduce in your app and you, you release it already and you have to revert very quickly and be able to release a new one really quickly. Git is your best friend. Yeah. I mean, I. Take a look at. That. I have a ton of little side projects.
They’re just me and I always turn get on with them. I mean, there’s no there’s no downside to it, right? Yeah, exactly. All right. And it’s a really healthy for an agent to, to be able to look back and get history and see an archive of why changes were made all the time.
I will be able to trace back in one of my apps a bug that was created because of a bad assumption that happened when I was working on something unrelated, you know, and that’s that’s only possible if you have a tool like git that stores the changes and the explanations alongside each other. Yeah.
I guess that’s a pro tip too, is like the commit message is really important. Yeah. And the more you document assumptions in there, so it doesn’t have to reevaluate what the assumptions are by looking at the git diff. I was like. You don’t have. Commits like me where it just says whip and. You just.
Progress. Progress, like fixing habits. I got out of fixing because. Agents didn’t like them. Yeah. Yeah. I was this goes back to a point I had earlier, which is, I feel like what agents has has introduced to a lot of folks is because it has because by introducing things like good, good development practices like git or testing or any of those tools that you typically wouldn’t necessarily do as a solo developer.
Once you have that context, the agent actually works better because it can make a lot of assumptions about how you work and what your project history is and those prompts that you have, or whatever plans that you try to have them generate. It will, it’ll have better assumptions to start, and that first prompt will be much better than it typically would.
Yeah. All right. Great. Let’s go into another developer question from you, Jay. I have years of iOS development experience but little experience with AI coding assistants. As more engineering roles, expect AI assisted development skills. How would Apple recommend using Xcode’s coding intelligence or other AI tools to develop the skills needed to meet industry expectations? How much time do we have today? Who wants to? Who wants to. Start? I mean, I would say just start simple. Like you don’t need to start with some massive project. I mean, what I would do is work it into the things you’re already doing.
Find small changes. You want to make, small bugs you want to fix, maybe that you don’t want to spend the time doing it and have the agent do that for you, where you can reason about it really easily. I think as you do that, you’ll start to find what works really well And what doesn’t. And, and so that sort of iterative process, you’ll, you’ll become more, you know, you’ll be more confident in making bigger changes. So it’s sort of a natural cycle.
I think building the confidence is something that is important. So I would start with tasks you already know how to do, right? And so that you can very quickly compare the result of the genetic work to what you would have done yourself and like, you know, build that confidence. Oh, wow, this is actually working really great. And, you know, and, and slowly but surely expand to all the capabilities of these genetic flow.
But yeah, I mean, try it is really the first, you know, great advice we can say because it’s really fantastic. That’s a great point about like, bringing in your experience to working with agents is invaluable. So if you have like lots of industry experience, like that’s huge. That makes such a big difference. And like to drums point like some of the first times. Sometimes you use an agent, you might as an experienced developer, look at it and be like that.
That’s not what I would have done, But what’s great is they love to learn and you can you can direct them and guide them and they’re like, you know, indefatigable about like all the advice that you can give them all the guidance that you can give them to kind of help shape the way that the kind of code you want written, the architectures you want, the validation loops that you run, and they’ll just keep doing it and keep learning.
And I think that’s a, again, that experience is invaluable. Yeah. You can teach the agent, you know, that experience you have, right? To make you even more comfortable. You can tell, hey, this is the way I work and I want you to help me, you know, keeping, keeping that work the same, right?
Yeah, yeah. There’s no one way to use these tools either. There are many people who use them just as a very powerful find tool to help them create the plan of action for what they do. That’s a totally valuable way to use these things. If you’re looking at this stuff and you go, I’m not sure I like this because it’s surrendering a kind of control. I’m not comfortable with surrendering at this point.
Then you don’t have to just use it as a planning aid and see where that gets you. And if you like that, experiment with some other stuff over time. If you don’t, no harm. You know, I think that that’s one of the coolest things here is that this is adaptive in a way that other technology traditionally hasn’t been, and it can really become whatever you need it to be.
Yeah, I. Think the thing that a lot of a big misconception, I think when working with agents is that you’re handing all the control over. Actually, it’s really important with agents, as you were talking about, Kevin, that you don’t disconnect. Like, in fact, you should be, you should be reviewing all your changes. You should be working with the agent and using plan mode to be able to determine that it’s implementation details are correct.
I want to highly recommend a session that came out this year called Xcode agents and you for workflow ideas. It talks a lot about exploring or exploring a project, or exploring new features as a way to use agents as well as building, refining, or orchestrating multiple subagents to do something like translation. All of them are really great ways to use it. And as Nathan said, you don’t have to do all of them. You could just choose which works best for your workflow.
One more thing I would say is I think there’s both a kind of a way to come at it from the top and a way to come at it from the bottom. What I mean by that is I, I find that working on just engineering problems in general, sometimes starting with a low fidelity, like a really coarse grained look at a problem is really helpful.
Like I had a colleague who would always ask me, write your header files first. And that just let me think about the shape before I actually wrote any lines of code. So you can start with the agent, just like give me the shape. Like let’s just talk about your Swift interface equivalent.
Or you can kind of go from the other way where you’re like, I know the shape that I want because of all my experience, and I know I want protocols here and these classes here, etc.. And then you can have the agent kind of work in the like, it has so much context at that point of like what the function is and how it fits in with the whole scheme. It can kind of like just implement the body and you can like review that. So either top down or bottom up is another two different ways to approach it. Absolutely.
All right. Hope that answers your question, Jay. I know we probably could have spent another like 20 minutes talking about this. We do have several other questions. We have one from Pikaia. Tries again. What are the key differences between agent mode and chat mode? I successfully connected to connect to Xcode to the local LLM with ML LLM server in chat mode. Following example from WWDC 26 session. But the result is much different from the Coding Intelligence demo from our other WWDC 26 session.
Yes, it will be. So this is absolutely true. So the difference between that chat area in the settings and the agents area that we sort of floated up to the top is really capability because in that chat mode, we do give the agent a few tools to call to do things on your code base, but it’s on the order of 10 to 15 things that it can do in the agent mode.
The number of things that an agent can do is basically infinite. It can do anything it wants. If you let it right, it can use command line tools. It can use almost 60 tools inside Xcode. Now we, we give it all sorts of capabilities there that it wouldn’t have otherwise.
And these agent wrappers that sit around the model and give it other superpowers are super important as well because they let it manage its context and they let it spawn other agents and all of these things that as you get more experience working with them, you’ll find more and more useful.
A couple of the agent integrations that are already in Xcode, sitting in the UI are open source agent integrations that actually encourage you to try using with open models, and they have documentation on their websites or in their githubs that explain how to configure it. In Xcode settings, you can select the the agent name and then go to the dot, dot, dot and it says set up with configuration file.
And then it’ll point you to the configuration file. You can just paste in the example from the documentation. You can also use ACP mode, which is any agent, basically that you can find information about. You can set up for local agents as well. One of those, and some of those are designed specifically around being really, really great with these local agents. Yeah.
So I mean, the capability of the agents is just so much more. You’d be a great person, Nathan, to tell us, like the difference in scope of like code completion, like predictive code completion chat agentic, like what’s happening at each of those, like the time horizon that they work on? Yeah. Goes way up. And so the capability goes up. This is my favorite question actually. Because.
This is, this is something that has really been staggering to me because I, I remember when when the predictive code completion stuff was starting and we were working on that, I remember thinking to myself, this could be kind of a big deal. I, I way underestimated how big this was going to be because when we did that, we were saving you, you know, maybe two, three, five seconds at a time. Pretty good. But then when we added this chat stuff that became it can go for 30s and find an answer for me and that’s the right answer and make some code changes.
And a year ago when we started experimenting with this agent stuff, even six months ago when we started adding the agent integration you’re now used to in Xcode, it it was a half hour that you could get out of an agent sometimes, and now it’s an hour, an hour and a half, even more sometimes than an agent can work independently doing a lot of work for you so that you can get to an ultimate conclusion. It doesn’t mean it has to, but it can. And that’s just not possible with that chat feature. That’s not really what it was aimed at doing for people. So you’re going to get a very different experience when you use these agent modes.
And we really want everyone moving from chat to agents. And now’s a great time to do that with Xcode, 27. If you want 32nd mode, it can still give you 32nd. Yeah, it does all the time. Yeah. Agents can do the small things, too. Exactly. All right. We have I’ll say two questions. They’re related to each other. Both highly voted. The first one is from interferon.
I prefer to use local models instead of cloud models. If I use a local model with Xcode instead of a cloud model, what features do I miss? Will I just get slower? Will it just get slower or maybe less accurate answers? Or are there whole genetic features that are not possible with local models?
Well, there’s two things right there. The, the agents that you run and the model that it talks to. Right. And somehow you can, you know, mix and match, I want to say. Right. So from the very beginning, I think in Xcode, we, we added the capability to talk to local and local being, you know, on your own machine or on a local server, right? If you have a Big Mac, for example, you can use tools to run the model here and plug Xcode basically to to talk to those models.
So if you’re just using the, the model, the chat mode with the local model, well, you will get the chat experience. Now those local models are becoming really good, right? And so we get probably great results, but there will still be chat mode results that way, right? Now if you plug an agent and their open source local agent that you can use, plug them to local model, you can totally do that. And you will get a lot of those agentic tools using the local agents and the local models right here.
So essentially, kind of if I were to Tldr that because of ACP, it sounds like the toolset that Xcode provides. So all of the, the tools that are provided for our cloud Codex and Gemini agents, If you are using ACP, all those same toolsets, that that same toolset will be available to a local agent.
Yeah, absolutely. The same toolset will. The biggest difference is, of course, if a commercial model provider is going to give you a model that is so big, it has to be hosted on a really powerful GPU in its own special cluster that they have somewhere you’re not going to get the same super genius on your MacBook air. You know, it’s great, but you’re not. And that’s okay. Actually, you can get a lot done with this stuff. Now. The things that you can do with our computers are mind boggling to me.
It just means that you have to give it more guardrails, make sure that those validation steps that we were talking about before are really pristine, because those are going to be the things that it’s able to keep itself on track with when it’s not quite as smart. Yeah.
Yeah. And as a follow up question, we got a question from Pichaya tries around the same thing. Is it possible to connect the coding intelligence to a local MLM like the one hosting an ML LM dot server command and an agent not in a chat mode so that it would be more capable to handle stuff in Xcode without pointing. File to file. And as we just said, ACPi support. That’s basically how you want to approach it. And there are many open source tools and wrappers available with local model support like open code.
Yeah. And I’m really excited for ACPi also to be used to help other enterprises as you have your own configurations, regardless of what harness you talk to on the back end. ACPi is a great way to get all those inside of Xcode and working for your enterprise. Yeah. All right. We’re going to move on to a question from ants crashing. Great username.
What can you tell me about the privacy of the code of my app when it is accessed through a third party LLM via Xcode? Will the LLM be able to train on my code base and queries? Will it be able to store data short term or long term? This is a great question. Jerome. Yeah.
Well, so you know, when you when you enable a coating agent and a coating model was one of the partner we have, you will see their, you know, terms and conditions or how they use your code and you’re always in control of, you know, choosing if you allow the agent provider to use your code for training or not. Right. So it’s very clear here.
You know, and the way to do that is going to your account. And, you know, just in the settings of the model providers tells what you can and cannot do with the code you provided. It’s the same for chat and agentic here. So you’re always in control of what the model provider can do with your data.
That’s really important from from the beginning when we start creating this feature, right? Yeah. And the agents in Xcode don’t. Apple doesn’t see any of that. Yeah. It’s all through the the model provider that you use. Yeah. This is a direct call to the agent provider. Exactly. Yeah. In the loop. By design, that’s how we build these. Features. Yes.
All right. So as a kind of a quick summary for you ants crashing. Definitely check your provider for its privacy policies. Yes. Check out your accounts for the subscriptions you have for these for these providers. And see what kind of control you have to be able to limit the data that it uses for for training. But as for Apple. Apple does not see anything in as it’s sending these messages, as it’s sending these requests.
All that data is sent directly to your provider. With the one caveat that if you send us a feedback report saying, when I write this, it doesn’t work, we will see the thing that you told us you wrote. Yes. That’s true. If you if you click on the feedback assistant button, we will see that context. Yes.
All right. Great. Moving on to man, these usernames are fantastic stuff. MC has a question. What’s the best way to work with AI in Xcode while being offline? For example, in a train, while commuting, and without having an M5 Pro with 128 gigs of RAM. You kind of mentioned a little bit about this, Nathan, about providing like guardrails a little bit more, but do you have any other suggestions?
First of all, the best way to get one of those models running and get the most out of it is ML. And there’s a reason we have a whole session on how to use ML in this context. You can get a larger, more interesting model running with ML than any other technology on our devices, and I really strongly recommend watching that session and getting started with that.
The next thing though, is it is all about the guardrails. It’s all about the constraints, and you’d be surprised how much you can accomplish on your laptop on a train. If you make sure that the agent has to pass unit tests to move on, you know, and you write good unit tests with the agent all the time, then it can’t lie and cheat its way out of a situation if it happens not to be smart enough to figure it out the first time, it can keep working until it finds the solution and it will find the solution.
I think if the offline is is, you know, these temporary or you’re going, you know, on a commute or something like that, sometimes you can combine the two. So you can have, you can use a larger model before you know that you’re going to be offline to help with planning and requirements and setting things up.
Then you’re offline for a number of hours, number of days and have those local agents document all the things and all the assumptions that they make. Then when you’re back online, you can use a larger model to double check that those assumptions that were made all along the way actually match up.
Yeah. And this is this is like a very exciting area of ongoing research from a lot of our partners is the idea of using larger models to advise agents powered by smaller models. You can get a lot of that functionality and benefit just by asking agents to write things out to markdown files and then critique each other, and then they can talk back and forth and find things out. And Xcode makes it very easy to even run that simultaneously.
It’s a great feature of Xcode to be able to configure multiple agents in model and just start a new conversation with different. Agents. And models, right? So you can switch when you’re offline to a local version of this, and then go back to the other one when you’re online.
Great point. I wanted to point out, Nathan, you mentioned a session that would be great to watch. I believe the name of the session is Run Local Agentic AI on Mac using ML. Is the one you can. Take a look. Thank you. No problem. All right. Moving on to another question from Jay Rodan. I’ve been using cloud code in terminal for quite a while now. I find that I barely need to use Xcode anymore. What am I missing?
Go ahead. Yeah. No, I think one of the things that I think one thing that’s really important is everyone’s going to approach using agents in different ways, and there’s different kinds of experiences. And so I think the thing that we that we have built in Xcode is both a set of really powerful tools, and we built a great user experience on top of that. One of the things that’s really great about our user experience that we’re trying to really invest in is the difference between kind of like a, like a non-linear flow.
A terminal is just a lot of text flying by. It’s also very linear. So you’re understanding the story is kind of like unwrapping in that linear fashion. What I love about Xcode is that we try to pull out the bits of the story that are happening into the can do artifacts area next to the conversation. So you can see the evolution of the change kind of unfolding.
You can, you know, click around edit source code, etc. and then there’s all of xcode’s context. So the actual in-memory context of having the files that are open, the schemes that you have active, all that is information that we use to help to help you as you’re working. So even even natural language, things like, oh, this and that. It’s just very easy to point to what you’re working on. Currently selected.
For your project settings are. Things like. That. Yeah. It’s got, it’s not just a, you know, a source editor, you know, that can rent things. You know, it’s an ensemble of tools. You know, you have instruments, you have all the previous system, you have the device hub. Now that you know that the agent can control. Right. And so when you put all those tools together, you know, it really supercharges the developer experience given, you know, tools that are not possible to use in just the plain text view of the terminal.
Yeah, I think, I think the idea of you being able to write a great prompt is, is a practice that everyone’s doing now, especially with agent workflows, but to then also back it up with the entire context that Xcode can provide about your project, about what get history or crash data, things like that. I think it just really benefits and makes that first solution really closer to what you want to achieve. Yeah, I think also, I mean, a lot of it depends on how you want to work, right?
Like it doesn’t have to be all or nothing either, right? Going back to terminal sometimes maybe that’s the right answer. But when you’re in Xcode, you get a really visually rich experience. You get a richly rendered beautiful markdown, you get previews, so you get to see like the results in a very different way than you would get just in a regular terminal. With amazing color schemes as well. With great color. Great color themes. Neon noir.
All right, we can get a few more questions in before the end of today’s group lab. So let’s go move on to Jack 92 question. Is it possible to use local AI models for coding intelligence with Xcode 27? We talked a little bit about this. What would your suggestion be to balance speed, accuracy and privacy? So kind of going for the first question.
Again, watch run local Agentic AI on the Mac using ML. That’s the best way to approach it. But I think the interesting part that we could add here is what would you suggest to balance speed, accuracy and privacy? We talked a little bit about some solutions to that, including using the larger model first for planning, and then have the the local smaller models maybe keep track of its work or assumptions. Yeah, I think part of it is like there’s a lot of local models and they all have different, you know, there’s different quantizations, floating point, etc.. Part of it is kind of see what works for your project.
Absolutely. It could be totally different. Yeah. We spend a lot of time trying to figure out how to assess that. We are giving agents the right tools to do their jobs effectively, that when we provide them with additional context, it’s helping them and not hurting them, things like that. So we’ve become very experienced in benchmarking these agents and models.
And one of the things we’ve learned along the way has been that that gives you really powerful signal. And you can go online and read all sorts of spreadsheets that people put together of every variation with every letter of the alphabet combined in a very long name of each variant of these models. But the thing that ultimately is the determining factor of how you are drawn to this stuff is the vibes.
It’s how it feels to you. So the best way to figure out this balance for yourself, if you’re picking which kind of agent you want to use, which kind of model you want to pair with that agent, whether that’s from, you know, a commercial provider somewhere or it’s local on your machine is giving it a shot and seeing if you enjoy it and if it’s giving you things that you want to use.
I think a common pattern too, is that you can develop your own kind of scorecard. Like there are things that are really important to me that in my project that agents can, you know, or different models can get wrong. So I can develop this scorecard And then I can run through, you know, local models as new ones come out, try different settings and just see for my scorecard, how are they doing?
And it doesn’t have to be something that’s like super scientific and has a bunch of numbers behind it. It can be like Nathan said, it’s like vibes of like, oh, this one felt the best. It enabled me to feel the most creative and, and to, to work the fastest.
Yeah. And if you become a person who’s really into this stuff, you might find yourself asking the agent to help you create something that’s like a mechanistic scorecard that you can reuse and then you wind up chasing. Well, what do the vibes I felt correspond to in numbers and stuff like that? But yeah, just get started and see what you can feel out about what you want these tools to do for you because they’re so personal.
And maybe another thing would be it’s not always necessarily true that the bigger the model, the better the results. Definitely not. Like sometimes it’s actually good to check extremes of like, okay, I used all this memory to load this model, but it doesn’t actually give me like much better results or even any better results than something that’s much, much, much smaller.
It can dynamically change and have multiple models on your Mac and swap them. Exactly. Yeah. Or swap them depending on the task. Exactly. Yeah, absolutely. Another kind of related question from Ryan learns I don’t want to give access to anthropic, OpenAI or Google for privacy reasons. Is there a path to use foundation models as the agent for Xcode Coding intelligence?
I think it’s one of the things we’ve already been talking about, like using models, local agents. Yeah, run local Agentic AI on the Mac using ML. It’s exciting to hear all the excitement about this. The Mac is a great place to do this. Yeah, absolutely. Like on on just an M5 max. Pretty powerful already. If you have an array of Mac Studios, you know you could have one of the largest models on it. So absolutely, definitely try that out.
Okay. Let’s take a look at a couple more questions. We have one from C Prada. Is there a beginner’s guide or similar document that gives an overview of this topic that we’re talking about, as opposed to tutorials. For those of us who need a general map of a subject that they can fill in after with details, as opposed to jump in the middle of the subject hands on approach. So yeah, if someone wanted to try to figure out how to approach it or like a good roadmap for how to, how to approach using agents rather than just trying it out, as we’ve been suggesting.
If you’re a visual learner, one of the things that’s really cool about the the session, we keep mentioning this Xcode agents and use session is that there are lots of very illustrative diagrams of what is the agent actually doing right now that’s giving it an understanding of what’s happening. And when you start to sort of break down into pieces what it’s doing and understand what it’s what’s happening, that’s a very powerful thing. So I really do recommend that session a lot.
I don’t know. Do you have suggestions for other resources we provide today for this sort of thing? I think just talking to folks is a great way to learn too. I’m constantly learning things from, you know, like Nathan and Ken and Jerome, things that they’re trying or, you know. Yeah. Talk to other developers how they’re using it, exchange and, you know, the best practices, you know, just give it a try. And.
And I also say like, don’t, don’t you don’t like, don’t overthink it. Like it’s also like, it can, you know, sometimes it can feel overwhelming because it’s changing so rapidly and so fast, but because it’s changing rapidly and so fast, there’s also like, there’s just a lot that you can discover and it’s okay. Like you’re, there’s a lot of great kind of initial groundwork that we’ve done, you know, in our tools and the model providers have done to make it seamless to onboard.
Yeah. And while I think we generally have approached it by saying, like, just try it. One of the things that, you know, it’s really, really great about the way it’s integrated in Xcode is that you can try it without as high of a risk or impact on what you’re building or like.
Like I always talk about plan mode because there’s plan mode in lots of places, but plan mode really allows you to to ensure that you know exactly what it’s doing. And you could ask questions and like you made this plan, like, how did you actually approach this? But yes, Xcode agents and you does do a really great job in that session to walk through like, this is a prompt, this is what it’s working on, but this is also how it’s working behind the behind the scenes.
Really great way to approach it. One, going back to an earlier question, I mean, this kind of reminds me of one of the values of staying in Xcode is that you do you get that choice of like how much you want to buy in to the new workflow? You can just do a little bit.
You can do a lot. So as you’re, as you’re new to the experience, I think it’s a lot less disruptive than if you were to just go and be all in on terminal. Like, this is how I’m going to totally change how I do things. So I think that you have you have a much broader continuum of, you know, how you can work with it.
Yeah. And I would say maybe one other thing too is that the community has a lot of great resources out there, and one of the things we’ve worked really hard in Xcode 27 is that the way that you use agents in Xcode 27, there’s there’s a lot of transfer from other places that you use them.
So if there’s other techniques or things that are happening in other Ides or other tools, generally, those are just going to transfer just fine in Xcode too. So it doesn’t have to be that it’s only about look for resources that are about Xcode specifically. Just look in general, and you can do those techniques inside Xcode with Xcode 27.
I was going to mention documentation for the agent providers is a really great way or how people are using agent providers currently. And again, it’s one of the cool things is that there’s not a single right path. It’s, you’re not, you know, you’re not playing Mozart, you’re playing jazz. And you can sort of figure out what’s working for you by borrowing from everything you hear. Yeah. What a great quote. You’re not playing Mozart, you’re playing jazz. And kind of related to that, Kevin, you were mentioning models are changing all the time.
You know, like best practices right now might be different in the future. So it really is about trying it out and seeing how much you want to buy in or just testing things out depending on what you want to build. They do. I mean, they, every time a new model comes out, they literally change. The best practices change. So you have to sort of be aware of. Maybe there’s a new one, what we’re actually talking. So it. Could be. Yeah.
All right. I think we have time for one more question. Let’s see which one we could take. Actually, I wanted to add a question that we got in a previous group lab. I think we had a coding intelligence Apple Intelligence Group lab back in Tuesday evening here in Cupertino.
And there was a great question around how do we make sure that the most up to date APIs, like the things that we announced at dove this year, that agents are actually familiar with this? We talked about it very briefly, but I wanted to make sure that we say it out loud in this group lab. What’s the best way for new APIs to be in the agents context. Yeah. So we have a whole tool that’s dedicated to being able to look up new APIs and documentation.
So we have awesome teams that develop our, you know, amazing documentation for all of our new APIs. And then we’ve provided tools for Xcode to be able to search through that documentation. And we’ve experimented with a bunch of techniques to help make that as efficient as possible, so that you always know that you’re getting the latest APIs. When you don’t know the Xcode, you also download the latest documentation. It’s on device. And now it comes in like the version you can read, right? But also versions specifically for models, right?
To be very efficient, to be very fast and give you the best answers. Right. And so the, the agent, you know, when he doesn’t know about an API, will actually tap into that documentation and get all the resources from that documentation, add it to the context that now it can, it can, it can help you with that. We also shipping Xcode with a set of specialist right skills that we build.
For example, this one, the new resize ability feature that we’re shipping in iOS 27. And so, you know, so we’re going to help you when you ask this question of building this new API, the agent will bring that, that, that skills and have new contexts and new ways to build those features.
So yeah. The, the other thing is like, if you don’t have confidence in this yet, just give it a shot. Create an empty project and ask the agent to demonstrate a new set of iOS 27 APIs for you. I think foundation Models is a great choice here, actually, because it doesn’t happen to be one of these specialists for it. And part of that is because it’s so good at getting that information from this documentation index and working with it. They’ve done a great job on the documentation team of giving us what we need to be able to make that happen.
Yeah. And something else too is you can always ask for like search documentation and. Use documentation or there’s a new API in iOS 27. You know about this topic, you know, it will actually directly ask the model to go to the documentation, right? So I guess don’t feel shy about asking, asking the agent to like use these tools.
The model. Yeah, there we go. I think in particular, as we were talking about models changes, providers change. What’s great about Xcode providing this document document tool, documentation tool is that regardless of which provider you’re using, whether you’re using a local model or, say, Cloud Codex or Gemini, you, you are getting that information.
Xcode is providing that to whatever agent. Yes. So if the agent isn’t up to date with the API’s because we just announced it Xcode’s got your back on that one. And the great news is the documentation ships as an individual assets, right? So we’re going to update documentation as new APIs are coming. And you will get that automatically. Yes. As a new download in Xcode. That’s a great. Point. That’s a great point.
Well, what a great way to end our group lab. Unfortunately, that’s all the time we have. Thank you to my panelists, Nathan Kent, Jerome, Kevin. It’s so great to have you here to answer your questions, give your insights, and thank you to the team behind the scenes for helping triage the questions and keep this event running smoothly.
And of course, thank you to all of you who joined us, whether you asked the question or just tuned in. It’s great to have you, and we’re so privileged to be able to host this for you and answer questions for you today. If you didn’t get your question answered, check out the forums developer.apple.com/forums, and you could also check out the generative AI search experience in developer.apple.com to learn more about what we talked about today. If you have a code level question bug enhancement request, please submit in feedback assistant.apple.com. Again, thank you for joining us. Have a great WWDC.