Android 스튜디오의 Gemini 에이전트 모드는 Gemini와의 채팅으로 해결할 수 있는 작업보다 더 복잡한 다단계 개발 작업도 처리할 수 있도록 설계되었습니다. 고수준 목표를 설명하면 에이전트가 계획을 생성하고 실행하여 필요한 도구를 호출하고, 여러 파일에 걸쳐 변경사항을 적용하고, 버그를 반복적으로 수정합니다. 이 에이전트 지원 워크플로를 사용하면 복잡한 문제를 해결하여 개발 프로세스를 가속화할 수 있습니다.
그림 1: Android 스튜디오의 에이전트 모드에서 Gemini를 사용하고 있습니다.
시작하기
Android 스튜디오에서 에이전트 모드를 시작하려면 다음 단계를 따르세요.
도구 창 모음에서 Gemini를 클릭합니다. 필요한 경우 로그인하고 온보딩합니다.
에이전트 탭을 선택합니다.
에이전트가 수행할 작업을 설명합니다.
에이전트가 작업을 완료하는 동안 변경사항을 검토하고 승인합니다.
그림 2: 상담사 모드에서는 변경사항을 수락하거나 거부할 때까지 기다립니다.
선택사항: 변경사항을 자동으로 승인하려면 에이전트 옵션
> 변경사항 자동 승인을 선택합니다.
그림 3: 상담사가 제안한 변경사항을 자동 승인합니다.
사용 사례
다음은 에이전트가 지원할 수 있는 사용 사례의 몇 가지 예입니다.
빌드 오류를 수정합니다. '내 프로젝트의 빌드 오류 수정'과 같은 프롬프트를 사용하여 빌드 오류를 수정하도록 에이전트에게 요청하면 권장되는 수정사항을 적용하고, 프로젝트를 빌드하여 솔루션을 확인하고, 문제가 해결될 때까지 반복합니다.
그림 4: 에이전트가 프로젝트를 빌드하고 오류가 있는지 평가합니다.
UI 요소 추가 또는 업데이트 에이전트는 UI 요소를 추가하거나 업데이트할 수 있습니다.
예를 들어 에이전트에게 '사용자 환경설정에서 어두운 테마를 기본값으로 설정해 줘'라고 요청하면 관련 파일을 검색하고 작업을 완료하기 위한 변경사항을 제안합니다. Running devices 도구 창에서 UI 업데이트를 즉시 미리 볼 수 있습니다.
그림 5: UI 요소를 업데이트하는 에이전트
모의 데이터 생성 앱을 프로토타입으로 만들고 테스트할 때 에이전트에게 모의 데이터를 생성해 달라고 요청하여 직접 만들지 않아도 됩니다. 예를 들어 '가짜 데이터에 세션 두 개를 더 추가해'라는 메시지가 표시되면 에이전트는 관련 파일을 찾아 mockSessions 목록에 이벤트 두 개를 더 추가합니다.
그림 6: 모의 데이터를 생성하는 에이전트
사용해 볼 만한 다른 프롬프트:
'<module>의 <class>에 대한 단위 테스트를 작성해 줘.'
'열린 파일의 문서 생성'
'앱 제목을 <현재 이름>에서 <새 이름>으로 변경해 줘'
'null 포인터 예외 해결'
'<컴포저블 이름> 컴포저블을 새 파일로 이동하여 코드를 리팩터링해 줘. 모든 가져오기가 업데이트되었는지 확인하세요.'
'앱의 홈 화면에 '팔로우'라는 새 버튼을 추가하여 주제 목록으로 이동하세요.'
"<컴포저블 이름> 컴포저블에서 <수정자 이름> 수정자의 패딩을 줄여 줘."
'소셜 미디어에 공유할 공유 버튼을 만들어 줘'
에이전트 작동 방식
에이전트 모드에서는 사용 가능한 도구 목록과 함께 프롬프트가 Gemini API로 전송됩니다. 도구는 기술이라고 생각하면 됩니다. 파일 검색, 파일 읽기, 파일 내 텍스트 검색, 구성한 MCP 서버 사용 등의 기능을 포함합니다.
에이전트에게 작업을 부여하면 에이전트가 계획을 세우고 필요한 도구를 결정합니다. 이러한 도구 중 일부를 사용하려면 상담사가 사용하기 전에 권한을 부여해야 할 수 있습니다. 권한을 부여하면 에이전트는 도구를 사용하여 필요한 작업을 실행하고 결과를 Gemini API로 다시 전송합니다. Gemini는 작업 결과를 처리하고 다른 대답을 생성합니다. 이러한 작업과 평가 주기는 작업이 완료될 때까지 계속됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-09-03(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-09-03(UTC)"],[],[],null,["Gemini 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 creates and\nexecutes a plan, invoking the necessary [tools](#how-it-works), making changes\nacross multiple files, and iteratively fixing bugs. This agent-assisted workflow\nlets you tackle intricate challenges, accelerating your development\nprocess.\n**Figure 1:** Gemini in Android Studio's Agent Mode.\n\nGet started\n\nTo get started in Agent Mode in Android Studio, follow these steps:\n\n1. Click **Gemini** in the tool window 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. Review and approve any changes as the agent works to accomplish the task.\n\n**Figure 2:** Agent Mode waits for you to accept or reject a change.\n\n1. Optional: To automatically approve changes, select **Agent options\n \\\u003e Auto-approve changes**.\n\n**Figure 3:** Auto-approve changes suggested by the agent.\n\nUse cases\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 like \"Fix build errors in my project,\" it applies a recommended fix, builds the project to verify the solution, and iterates until the issue is resolved.\n\n**Figure 4:** The agent builds your project and assesses if there are errors.\n\n- **Add or update UI elements.** The agent can add or update UI elements. For example, ask the agent to \"Make dark theme the default in user preferences\" and it searches for the relevant files and suggests changes to accomplish the task. You can immediately preview the UI updates in the **Running devices** tool window.\n\n**Figure 5:** The agent updating UI elements.\n\n- **Generate mock data.** When prototyping and testing your app, you can ask the agent to generate mock data instead of manually creating it. For example, when prompted to \"Add two more sessions to the fake data,\" the agent finds the relevant file and adds two more events to the `mockSessions` list.\n\n**Figure 6:** The agent generating mock data.\n\nSome other prompts to try:\n\n- \"Write unit tests for \\\u003cclass\\\u003e in \\\u003cmodule\\\u003e\"\n- \"Generate documentation for the 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. Verify that 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\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 creates a plan and determines 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."]]