에이전트 모드
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 스튜디오의 에이전트 모드에 있는 Gemini는 Gemini와의 채팅으로 해결할 수 있는 작업보다 더 복잡하고 여러 단계로 구성된 개발 작업을 처리할 수 있도록 설계되었습니다. 고수준 목표를 설명하면 에이전트가 계획을 만들어 실행하고, 필요한 도구를 호출하고, 여러 파일에 걸쳐 변경사항을 적용하고, 버그를 반복적으로 수정합니다. 이 상담사 지원 워크플로를 통해 복잡한 문제를 해결하고 개발 프로세스를 가속화할 수 있습니다.
시작하기
Android 스튜디오에서 에이전트 모드를 시작하려면 다음 단계를 따르세요.
- 사이드바에서 Gemini
를 클릭합니다. 필요한 경우 로그인하고 온보딩합니다.
- 에이전트 탭을 선택합니다.
- 에이전트가 수행할 작업을 설명합니다.
상담사가 작업을 완료하는 단계를 진행하는 동안 변경사항을 검토하고 승인할 수 있습니다.
선택사항: 변경사항을 자동으로 승인하려면 에이전트 옵션
> 변경사항 자동 승인을 선택합니다.
사용 사례
다음은 에이전트가 지원할 수 있는 사용 사례의 몇 가지 예입니다.
빌드 오류를 수정합니다. '내 프로젝트의 빌드 오류 수정'과 같은 프롬프트를 사용하여 에이전트에게 빌드 오류를 수정해 달라고 요청하면 권장 수정사항이 적용되고, 솔루션을 확인하기 위해 프로젝트가 빌드되며, 문제가 해결될 때까지 이 과정이 반복됩니다.
에이전트 모드는 UI 요소를 자체적으로 추가하거나 업데이트할 수 있습니다. 예를 들어 에이전트에게 '사용자 환경설정에서 다크 모드를 기본값으로 설정해 줘'라고 요청하면 관련 파일을 검색하고 작업을 완료하기 위한 변경사항을 제안합니다. 실행 중인 기기 도구 창에서 UI 업데이트를 즉시 미리 볼 수 있습니다.
앱을 프로토타입으로 만들고 테스트할 때는 모의 데이터가 유용합니다. 가짜 데이터를 직접 수동으로 만드는 대신 에이전트에게 이 작업을 맡길 수 있습니다.
여기서는 에이전트에게 '가짜 데이터에 세션 두 개를 더 추가해'라고 요청했습니다. 관련 파일을 찾아 mockSessions
목록에 두 개의 이벤트를 더 추가합니다.
사용해 볼 만한 다른 프롬프트:
- '<module>의 <class>에 대한 단위 테스트를 작성해 줘.'
- '현재 열려 있는 파일의 문서를 생성해 줘.'
- '앱 제목을 <현재 이름>에서 <새 이름>으로 변경해 줘.'
- 'null 포인터 예외를 해결해 줘.'
- '<구성 가능한 이름> 구성 가능 항목을 새 파일로 이동하여 코드를 리팩터링해 줘.
모든 가져오기가 업데이트되었는지 확인하세요.'
- '앱의 홈 화면에 '팔로우'라는 새 버튼을 추가하여 주제 목록으로 이동합니다.'
- '<컴포저블 이름> 컴포저블에서 <수정자 이름> 수정자의 패딩을 줄여줘.'
- '소셜 미디어에 공유할 공유 버튼을 만들어 줘.'
에이전트 작동 방식
에이전트 모드에서는 사용 가능한 도구 목록과 함께 프롬프트가 Gemini API로 전송됩니다. 도구는 기술이라고 생각하면 됩니다. 파일 검색, 파일 읽기, 파일 내 텍스트 검색, 구성한 MCP 서버 사용 등의 기능을 포함합니다.
에이전트에게 작업을 부여하면 에이전트가 계획을 세우고 필요한 도구를 파악합니다. 이러한 도구 중 일부를 사용하려면 상담사가 사용하기 전에 권한을 부여해야 할 수 있습니다. 권한을 부여하면 에이전트는 도구를 사용하여 필요한 작업을 실행하고 결과를 Gemini API로 다시 전송합니다. Gemini는 작업 결과를 처리하고 다른 대답을 생성합니다. 이러한 작업과 평가 주기는 작업이 완료될 때까지 계속됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-05(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-05(UTC)"],[],[],null,["# Agent Mode\n\nGemini in Android Studio's Agent Mode is designed to handle complex, multi-stage\ndevelopment tasks that go beyond what you can experience by just chatting with\nGemini. You can describe a high-level goal, and the agent will create and\nexecute a plan, invoking the necessary [tools](#how-it-works), making changes\nacross multiple files, and iteratively fixing bugs. This agent-assisted workflow\nempowers you to tackle intricate challenges, accelerating your development\nprocess.\n\nGet started\n-----------\n\nTo get started in Agent Mode in Android Studio, follow these steps:\n\n1. Click **Gemini** in the side bar. Sign in and onboard if you need to.\n2. Select the **Agent** tab.\n3. Describe the task you want the agent to perform.\n4. As the agent goes through the steps to accomplish the task, you'll have the\n option to review and approve any changes.\n\n5. Optional: To automatically approve changes, select **Agent options\n \\\u003e Auto-approve changes**.\n\nUse cases\n---------\n\nHere are some examples of use cases that the agent can help you with:\n\n- Fix build errors. When you ask the agent to fix a build error using a prompt\n like \"Fix build errors in my project,\" it will apply a recommended fix, build\n the project to verify the solution, and iterate until the issue is resolved.\n\n- Agent Mode can add or update UI elements all on its own. For example, ask the\n agent to \"Make dark mode the default in user preferences\" and it'll search for\n the relevant files and suggest changes to accomplish the task. You can\n immediately preview the UI updates in the **Running devices** tool window.\n\n- It's helpful to have mock data when prototyping and testing your app. Instead\n of manually creating fake data yourself, you can give that task to the agent.\n Here we've asked the agent to \"Add two more sessions to the fake data.\" It\n finds the relevant file and adds two more events to the `mockSessions` list.\n\nSome other prompts to try:\n\n- \"Write unit tests for \\\u003cclass\\\u003e in \\\u003cmodule\\\u003e.\"\n- \"Generate documentation for the currently open file.\"\n- \"Change the app title from \\\u003ccurrent name\\\u003e to \\\u003cnew name\\\u003e.\"\n- \"Resolve the null pointer exception.\"\n- \"Refactor my code by moving the \\\u003ccomposable name\\\u003e composable to a new file. Ensure all imports are updated.\"\n- \"Add a new button to the app's home screen called 'Follow' that takes you to a list of topics.\"\n- \"In the \\\u003ccomposable name\\\u003e composable, reduce the padding of the \\\u003cmodifier name\\\u003e modifier.\"\n- \"Create a share button to share to social media.\"\n\nHow the agent works\n-------------------\n\nIn Agent Mode, your prompt is sent to the Gemini API with a list of *tools* that\nare available. You can think of tools as skills: they include the ability to\nsearch for files, read files, search the text within files, use any\n[MCP servers](/studio/gemini/add-mcp-server) you have configured, and more.\n\nWhen you give the agent a task, it comes up with a plan and figures out which\ntools are needed. Some of these tools might need you to grant permission before\nthe agent can use them. Once you grant permission, the agent uses the tool to\nperform the necessary action and sends the result back to the Gemini API. Gemini\nprocesses the result of the action and generates another response. This cycle of\naction and evaluation continues until the task is complete."]]